Hello Gentlemen,
I have sitting in front or me a M4V3EU with an attached serial interface and I have built Oklona's branch successfully. I had a quick look at the M4 boot log and the partition layout is a bit more complicated than what is stored in the M5 dts file. Can anyone offer me guidance on the structure of the dts please? The M5 init-ramfs gets as far as loading the kernel and then it hangs so I am hopeful! Any help would be appreciated.
OK, I was looking in the wrong place. I have now matched the partition layout to what the original boot log indicated. Let's see what happens.
There is a slight difference in the layout and interestingly both rootfs partitions are a different size:
Creating 16 MTD partitions on "spi0.0":
0x000000000000-0x000000030000 : "0:SBL1"
0x000000030000-0x000000040000 : "0:BOOTCONFIG"
0x000000040000-0x000000050000 : "0:MIBIB"
0x000000050000-0x000000060000 : "0:BOOTCONFIG1"
0x000000060000-0x0000000c0000 : "0:QSEE"
0x0000000c0000-0x0000000d0000 : "0:CDT"
0x0000000d0000-0x0000000e0000 : "0:DDRPARAMS"
0x0000000e0000-0x0000000f0000 : "0:APPSBLENV"
0x0000000f0000-0x000000170000 : "0:APPSBL"
0x000000170000-0x000000180000 : "0:ART"
0x000000180000-0x000000240000 : "OPAQUE"
0x000000240000-0x000000560000 : "0:HLOS"
0x000000560000-0x000000fa0000 : "0:rootfs"
0x000000fa0000-0x000001020000 : "0:APPSBL_1"
0x000001020000-0x000001340000 : "1:HLOS"
0x000001340000-0x000002000000 : "1:rootfs"
rootfs0 is 0xa40000 and rootfs1 is 0xcc0000 long
EUREKA!
That was easier than I thought. At least it's booting but I still have some work to do! Initial attempts to load the image at 0x80800000 failed but I noticed if you typed tftpboot
by itself, it defaulted to 0x84000000
(IPQ40xx) # tftpboot 0x84000000 initramfs-kernel.bin
eth0 PHY0 Down Speed :10 Half duplex
eth0 PHY1 Down Speed :10 Half duplex
eth0 PHY2 Down Speed :10 Half duplex
eth0 PHY3 Down Speed :10 Half duplex
eth0 PHY4 up Speed :1000 Full duplex
Using eth0 device
TFTP from server 192.168.0.2; our IP address is 192.168.0.1
Filename 'initramfs-kernel.bin'.
Load address: 0x84000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
##
done
Bytes transferred = 9560496 (91e1b0 hex)
(IPQ40xx) # bootm
## Booting kernel from FIT Image at 84000000 ...
Using 'config@1' configuration
Trying 'kernel-1' kernel subimage
Description: ARM OpenWrt Linux-5.15.123
Type: Kernel Image
Compression: gzip compressed
Data Start: 0x840000e4
Data Size: 9539729 Bytes = 9.1 MiB
Architecture: ARM
OS: Linux
Load Address: 0x80208000
Entry Point: 0x80208000
Hash algo: crc32
Hash value: 2c406a1f
Hash algo: sha1
Hash value: e5f8c2233a287fac7e6e71b3b937397c5a2ec3b2
Verifying Hash Integrity ... crc32+ sha1+ OK
## Flattened Device Tree from FIT Image at 84000000
Using 'config@1' configuration
Trying 'fdt-1' FDT blob subimage
Description: ARM OpenWrt tplink_deco-m4-v3 device tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x849192b4
Data Size: 18870 Bytes = 18.4 KiB
Architecture: ARM
Hash algo: crc32
Hash value: bf7ec192
Hash algo: sha1
Hash value: 82f540ba3902bf8343794c924223a94ca7f7181b
Verifying Hash Integrity ... crc32+ sha1+ OK
Booting using the fdt blob at 0x849192b4
Uncompressing Kernel Image ... OK
Loading Device Tree to 862a7000, end 862ae9b5 ... OK
ipq: fdt fixup unable to find compatible node
Device nand0 not found!
eth0 MAC Address from ART is not valid
eth1 MAC Address from ART is not valid
Using machid 0x8010001 from environment
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.15.123 (kfs@locarno.local) (arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 12.3.0 r23001+330-38c150612c) 12.3.0, GNU ld (GNU Binutils) 2.40.0) #0 SMP Wed Aug 9 12:35:21 2023
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: TP-Link Deco M4V3
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000080000000-0x000000008fffffff]
[ 0.000000] HighMem empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000080000000-0x0000000087dfffff]
[ 0.000000] node 0: [mem 0x0000000087e00000-0x0000000087ffffff]
[ 0.000000] node 0: [mem 0x0000000088000000-0x000000008fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x000000008fffffff]
[ 0.000000] percpu: Embedded 11 pages/cpu s16268 r8192 d20596 u45056
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 64960
[ 0.000000] Kernel command line: root=/dev/mtdblock16
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 232888K/262144K available (6519K kernel code, 608K rwdata, 1668K rodata, 14336K init, 240K bss, 29256K reserved, 0K cma-reserved, 0K highmem)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] Tracing variant of Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] arch_timer: cp15 timer(s) running at 48.00MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0xb11fd3bfb, max_idle_ns: 440795203732 ns
[ 0.000001] sched_clock: 56 bits at 48MHz, resolution 20ns, wraps every 4398046511096ns
[ 0.000024] Switching to timer-based delay loop, resolution 20ns
[ 0.000317] Calibrating delay loop (skipped), value calculated using timer frequency.. 96.00 BogoMIPS (lpj=480000)
[ 0.000345] pid_max: default: 32768 minimum: 301
[ 0.001238] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.001268] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.002812] CPU: Testing write buffer coherency: ok
[ 0.003265] qcom_scm: convention: smc legacy
[ 0.004470] Setting up static identity map for 0x80300000 - 0x8030003c
[ 0.004640] rcu: Hierarchical SRCU implementation.
[ 0.005224] smp: Bringing up secondary CPUs ...
[ 0.008620] smp: Brought up 1 node, 4 CPUs
[ 0.008658] SMP: Total of 4 processors activated (384.00 BogoMIPS).
[ 0.008673] CPU: All CPU(s) started in SVC mode.
[ 0.015056] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.015220] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.015254] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[ 0.015615] pinctrl core: initialized pinctrl subsystem
[ 0.017657] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.018030] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.019363] thermal_sys: Registered thermal governor 'step_wise'
[ 0.019791] cpuidle: using governor ladder
[ 0.019853] cpuidle: using governor menu
[ 0.045053] cryptd: max_cpu_qlen set to 1000
[ 0.049643] usbcore: registered new interface driver usbfs
[ 0.049720] usbcore: registered new interface driver hub
[ 0.049781] usbcore: registered new device driver usb
[ 0.049868] pps_core: LinuxPPS API ver. 1 registered
[ 0.049884] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.049919] PTP clock support registered
[ 0.052085] clocksource: Switched to clocksource arch_sys_counter
[ 0.053333] NET: Registered PF_INET protocol family
[ 0.053551] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.054311] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[ 0.054364] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.054388] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[ 0.054434] TCP bind hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.054490] TCP: Hash tables configured (established 2048 bind 2048)
[ 0.054630] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.054703] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.055037] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.055094] PCI: CLS 0 bytes, default 64
[ 0.058860] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[ 0.065155] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.065193] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.204323] bam-dma-engine 8e04000.dma: num-channels unspecified in dt
[ 0.204361] bam-dma-engine 8e04000.dma: num-ees unspecified in dt
[ 0.205212] tcsr 194b000.tcsr: setting usb hs phy mode select = e700e7
[ 0.205341] tcsr 1953000.ess_tcsr: setting ess interface select = 0
[ 0.205476] tcsr 1949000.tcsr: setting wifi_glb_cfg = 41000000
[ 0.205577] tcsr 1957000.tcsr: setting wifi_noc_memtype_m0_m2 = 2222222
[ 0.205916] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 0.206614] msm_serial 78af000.serial: msm_serial: detected port #0
[ 0.206671] msm_serial 78af000.serial: uartclk = 1843200
[ 0.206730] 78af000.serial: ttyMSM0 at MMIO 0x78af000 (irq = 34, base_baud = 115200) is a MSM
[ 0.206770] msm_serial: console setup on port #0
[ 0.746027] printk: console [ttyMSM0] enabled
[ 0.751313] msm_serial 78b0000.serial: msm_serial: detected port #1
[ 0.755016] msm_serial 78b0000.serial: uartclk = 1843200
[ 0.761106] 78b0000.serial: ttyMSM1 at MMIO 0x78b0000 (irq = 35, base_baud = 115200) is a MSM
[ 0.767008] msm_serial: driver initialized
[ 0.780935] loop: module loaded
[ 0.782150] spi_qup 78b5000.spi: IN:block:16, fifo:64, OUT:block:16, fifo:64
[ 0.784701] spi-nor spi0.0: gd25q256 (32768 Kbytes)
[ 0.790262] 16 fixed-partitions partitions found on MTD device spi0.0
[ 0.794845] Creating 16 MTD partitions on "spi0.0":
[ 0.801387] 0x000000000000-0x000000030000 : "0:SBL1"
[ 0.806707] 0x000000030000-0x000000040000 : "0:BOOTCONFIG"
[ 0.811825] 0x000000040000-0x000000050000 : "0:MIBIB"
[ 0.817204] 0x000000050000-0x000000060000 : "0:BOOTCONFIG1"
[ 0.822351] 0x000000060000-0x0000000c0000 : "0:QSEE"
[ 0.827637] 0x0000000c0000-0x0000000d0000 : "0:CDT"
[ 0.832916] 0x0000000d0000-0x0000000e0000 : "0:DDRPARAMS"
[ 0.837378] 0x0000000e0000-0x0000000f0000 : "0:APPSBLENV"
[ 0.842962] 0x0000000f0000-0x000000170000 : "0:APPSBL"
[ 0.848424] 0x000000170000-0x000000180000 : "0:ART"
[ 0.853383] 0x000000180000-0x000000240000 : "OPAQUE"
[ 0.858271] 0x000000240000-0x000000560000 : "0:HLOS"
[ 0.863574] 0x000000560000-0x000000fa0000 : "0:rootfs"
[ 0.868279] 0x000000fa0000-0x000001020000 : "0:APPSBL_1"
[ 0.873266] 0x000001020000-0x000001340000 : "1:HLOS"
[ 0.878783] 0x000001340000-0x000002000000 : "1:rootfs"
[ 0.967796] i2c_dev: i2c /dev entries driver
[ 0.968054] i2c_qup 78b7000.i2c: using default clock-frequency 100000
[ 0.973994] sdhci: Secure Digital Host Controller Interface driver
[ 0.977484] sdhci: Copyright(c) Pierre Ossman
[ 0.983586] sdhci-pltfm: SDHCI platform and OF driver helper
[ 1.451320] lp5521 0-0032: device detection err: -5
[ 1.451725] lp5521: probe of 0-0032 failed with error -5
[ 1.474707] NET: Registered PF_INET6 protocol family
[ 1.476665] Segment Routing with IPv6
[ 1.478848] In-situ OAM (IOAM) with IPv6
[ 1.482582] NET: Registered PF_PACKET protocol family
[ 1.486682] 8021q: 802.1Q VLAN Support v1.8
[ 1.491338] Registering SWP/SWPB emulation handler
[ 1.550008] Freeing unused kernel image (initmem) memory: 14336K
[ 1.626230] Run /init as init process
[ 2.114980] init: Console is alive
[ 2.115374] init: - watchdog -
[ 2.127132] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[ 2.368831] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[ 2.368914] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[ 2.373499] xhci-hcd xhci-hcd.0.auto: hcc params 0x0228f665 hci version 0x100 quirks 0x0000000002010010
[ 2.380888] xhci-hcd xhci-hcd.0.auto: irq 71, io mem 0x08a00000
[ 2.390395] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[ 2.396135] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[ 2.401632] xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
[ 2.412709] hub 1-0:1.0: USB hub found
[ 2.415819] hub 1-0:1.0: 1 port detected
[ 2.419924] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[ 2.424233] hub 2-0:1.0: USB hub found
[ 2.431696] hub 2-0:1.0: 1 port detected
[ 2.435800] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[ 2.439316] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 3
[ 2.444904] xhci-hcd xhci-hcd.1.auto: hcc params 0x0220f665 hci version 0x100 quirks 0x0000000002010010
[ 2.452234] xhci-hcd xhci-hcd.1.auto: irq 72, io mem 0x06000000
[ 2.461688] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[ 2.467505] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 4
[ 2.473016] xhci-hcd xhci-hcd.1.auto: Host supports USB 3.0 SuperSpeed
[ 2.482712] hub 3-0:1.0: USB hub found
[ 2.487163] hub 3-0:1.0: 1 port detected
[ 2.491272] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[ 2.495569] hub 4-0:1.0: USB hub found
[ 2.503075] hub 4-0:1.0: config failed, hub doesn't have any ports! (err -19)
[ 2.508488] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[ 2.518790] init: - preinit -
[ 2.806653] random: jshn: uninitialized urandom read (4 bytes read)
/bin/board_detect: /etc/board.d/02_network: line 110: syntax error: unexpected ")" (expecting ";;")
[ 2.889698] random: jshn: uninitialized urandom read (4 bytes read)
[ 2.907229] random: jshn: uninitialized urandom read (4 bytes read)
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[ 5.257370] procd: - early -
[ 5.257630] procd: - watchdog -
[ 5.813170] procd: - watchdog -
[ 5.816854] procd: - ubus -
[ 5.869130] random: ubusd: uninitialized urandom read (4 bytes read)
[ 5.870081] random: ubusd: uninitialized urandom read (4 bytes read)
[ 5.874918] random: ubusd: uninitialized urandom read (4 bytes read)
[ 5.885539] procd: - init -
Please press Enter to activate this console.
[ 6.351893] kmodloader: loading kernel modules from /etc/modules.d/*
[ 6.361135] Loading modules backported from Linux version v6.1.24-0-g0102425ac76b
[ 6.361188] Backport generated by backports.git v5.15.92-1-44-gd6ea70fafd36
[ 6.367344] urngd: v1.0.2 started.
[ 6.458014] PPP generic driver version 2.4.2
[ 6.458175] random: crng init done
[ 6.459171] NET: Registered PF_PPPOX protocol family
[ 6.461364] random: 27 urandom warning(s) missed due to ratelimiting
[ 7.442360] ath10k_ahb a000000.wifi: qca4019 hw1.0 target 0x01000000 chip_id 0x003b00ff sub 0000:0000
[ 7.442433] ath10k_ahb a000000.wifi: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[ 7.455148] ath10k_ahb a000000.wifi: firmware ver 10.4b-ct-4019-fW-13-5ae337bb1 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc32 6b2b5c5b
[ 7.482680] ath10k_ahb a000000.wifi: Loading BDF type 0
[ 7.491254] ath10k_ahb a000000.wifi: failed to fetch board data for bus=ahb,vendor=0000,device=0000,subsystem-vendor=0000,subsystem-device=0000,variant=TP-Link_Deco_M5 from ath10k/QCA4019/hw1.0/board-2.bin
[ 7.692250] ath10k_ahb a000000.wifi: failed to fetch board-2.bin or board.bin from ath10k/QCA4019/hw1.0
[ 7.692314] ath10k_ahb a000000.wifi: failed to fetch board file: -12
[ 7.700695] ath10k_ahb a000000.wifi: could not probe fw (-12)
[ 8.613806] ath10k_ahb a800000.wifi: qca4019 hw1.0 target 0x01000000 chip_id 0x003b00ff sub 0000:0000
[ 8.613876] ath10k_ahb a800000.wifi: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[ 8.627643] ath10k_ahb a800000.wifi: firmware ver 10.4b-ct-4019-fW-13-5ae337bb1 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc32 6b2b5c5b
[ 8.654144] ath10k_ahb a800000.wifi: Loading BDF type 0
[ 8.663220] ath10k_ahb a800000.wifi: failed to fetch board data for bus=ahb,vendor=0000,device=0000,subsystem-vendor=0000,subsystem-device=0000,variant=TP-Link_Deco_M5 from ath10k/QCA4019/hw1.0/board-2.bin
[ 8.878868] ath10k_ahb a800000.wifi: failed to fetch board-2.bin or board.bin from ath10k/QCA4019/hw1.0
[ 8.878942] ath10k_ahb a800000.wifi: failed to fetch board file: -12
[ 8.887404] ath10k_ahb a800000.wifi: could not probe fw (-12)
[ 8.903215] kmodloader: done loading kernel modules from /etc/modules.d/*
BusyBox v1.36.1 (2023-08-07 15:48:08 UTC) built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt 23.05-SNAPSHOT, r23001+335-38c150612c
-----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/#
I'm gonna quit for the night but it has been an interesting journey so far and just so there is no confusion, this is a M4R V3 EU or M4 V3 EU model.
Tomorrow is another day. Any suggestions on how to proceed most welcome.