[OpenWrt-Devel] [PATCH v2 6/7] ipq40xx: specify "firmware" partition format for GL.iNet GL-B1300
Alberto Bursi
bobafetthotmail at gmail.com
Mon Dec 17 04:29:36 EST 2018
On 15/12/18 22:02, Christian Lamparter wrote:
> Specify firmware partition format by compatible string.
>
> Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
> ---
> .../files-4.14/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts
> index 53cb1b727f..39616ec2ac 100644
> --- a/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts
> +++ b/target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts
> @@ -210,6 +210,7 @@
> };
>
> firmware at 180000 {
> + compatible = "denx,fit";
> label = "firmware";
> reg = <0x180000 0x1e80000>;
> };
This patch prevents boot on my B1300. I compiled from latest sources.
Flashed the image with the sysupgrade and also again with with uboot
interface (after it was not booting fine)
This is serial bootlog of the non-booting firmware
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.14.88 (alby at openSUSE-xeon) (gcc version
7.4.0 (OpenWrt GCC 7.4.0 r8788-6b63595fec)) #0 SMP Mon Dec 17 07:16:28 2018
[ 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: GL.iNet GL-B1300
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] random: get_random_bytes called from
start_kernel+0x88/0x3c0 with crng_init=0
[ 0.000000] percpu: Embedded 15 pages/cpu @cfdb0000 s29324 r8192
d23924 u61440
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 64512
[ 0.000000] Kernel command line: rootfsname=rootfs rootwait
[ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072
bytes)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Memory: 249952K/260096K available (4237K kernel code,
137K rwdata, 1176K rodata, 1024K init, 228K bss, 10144K reserved, 0K
cma-reserved, 0K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xd0800000 - 0xff800000 ( 752 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0208000 - 0xc0723750 (5230 kB)
[ 0.000000] .init : 0xc0900000 - 0xc0a00000 (1024 kB)
[ 0.000000] .data : 0xc0a00000 - 0xc0a22740 ( 138 kB)
[ 0.000000] .bss : 0xc0a24000 - 0xc0a5d258 ( 229 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 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.000009] sched_clock: 56 bits at 48MHz, resolution 20ns, wraps
every 4398046511096ns
[ 0.000023] Switching to timer-based delay loop, resolution 20ns
[ 0.000239] Calibrating delay loop (skipped), value calculated using
timer frequency.. 96.00 BogoMIPS (lpj=480000)
[ 0.000258] pid_max: default: 32768 minimum: 301
[ 0.000398] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000416] Mountpoint-cache hash table entries: 1024 (order: 0, 4096
bytes)
[ 0.001028] CPU: Testing write buffer coherency: ok
[ 0.001712] Setting up static identity map for 0x80300000 - 0x80300060
[ 0.001858] Hierarchical SRCU implementation.
[ 0.002491] smp: Bringing up secondary CPUs ...
[ 0.005187] smp: Brought up 1 node, 4 CPUs
[ 0.005205] SMP: Total of 4 processors activated (384.00 BogoMIPS).
[ 0.005213] CPU: All CPU(s) started in SVC mode.
[ 0.009055] VFP support v0.3: implementor 41 architecture 2 part 30
variant 7 rev 5
[ 0.009229] clocksource: jiffies: mask: 0xffffffff max_cycles:
0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.009251] futex hash table entries: 1024 (order: 4, 65536 bytes)
[ 0.009450] pinctrl core: initialized pinctrl subsystem
[ 0.010397] NET: Registered protocol family 16
[ 0.010682] DMA: preallocated 256 KiB pool for atomic coherent
allocations
[ 0.011708] cpuidle: using governor ladder
[ 0.011748] cpuidle: using governor menu
[ 0.028670] usbcore: registered new interface driver usbfs
[ 0.028734] usbcore: registered new interface driver hub
[ 0.028809] usbcore: registered new device driver usb
[ 0.028854] pps_core: LinuxPPS API ver. 1 registered
[ 0.028863] pps_core: Software ver. 5.3.6 - Copyright 2005-2007
Rodolfo Giometti <giometti at linux.it>
[ 0.028887] PTP clock support registered
[ 0.030124] clocksource: Switched to clocksource arch_sys_counter
[ 0.030925] NET: Registered protocol family 2
[ 0.031541] TCP established hash table entries: 2048 (order: 1, 8192
bytes)
[ 0.031583] TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.031632] TCP: Hash tables configured (established 2048 bind 2048)
[ 0.031748] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.031784] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.031974] NET: Registered protocol family 1
[ 0.032978] No memory allocated for crashlog
[ 0.033154] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[ 0.036364] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.036377] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME)
(CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.041547] io scheduler noop registered
[ 0.041566] io scheduler deadline registered (default)
[ 0.044194] bam-dma-engine 8e04000.dma: num-channels unspecified in dt
[ 0.044214] bam-dma-engine 8e04000.dma: num-ees unspecified in dt
[ 0.044895] tcsr 1949000.tcsr: setting wifi_glb_cfg = 41000000
[ 0.044976] tcsr 194b000.tcsr: setting usb hs phy mode select = e700e7
[ 0.045056] tcsr 1953000.ess_tcsr: setting ess interface select = 0
[ 0.045130] tcsr 1957000.tcsr: setting wifi_noc_memtype_m0_m2 = 2222222
[ 0.045351] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 0.045903] msm_serial 78af000.serial: msm_serial: detected port #0
[ 0.045948] msm_serial 78af000.serial: uartclk = 1843200
[ 0.045997] 78af000.serial: ttyMSM0 at MMIO 0x78af000 (irq = 25,
base_baud = 115200) is a MSM
[ 0.046022] msm_serial: console setup on port #0
[ 0.554199] console [ttyMSM0] enabled
[ 0.559094] msm_serial: driver initialized
[ 0.566560] loop: module loaded
[ 0.567718] spi_qup 78b5000.spi: IN:block:16, fifo:64, OUT:block:16,
fifo:64
[ 0.570703] m25p80 spi0.0: mx25l25635e (32768 Kbytes)
[ 0.576792] 8 fixed-partitions partitions found on MTD device spi0.0
[ 0.581712] Creating 8 MTD partitions on "spi0.0":
[ 0.588126] 0x000000000000-0x000000040000 : "SBL1"
[ 0.593391] 0x000000040000-0x000000060000 : "MIBIB"
[ 0.598054] 0x000000060000-0x0000000c0000 : "QSEE"
[ 0.602861] 0x0000000c0000-0x0000000d0000 : "CDT"
[ 0.607648] 0x0000000d0000-0x0000000e0000 : "DDRPARAMS"
[ 0.612488] 0x0000000e0000-0x0000000f0000 : "APPSBLENV"
[ 0.617482] 0x0000000f0000-0x000000170000 : "APPSBL"
[ 0.622726] 0x000000170000-0x000000180000 : "ART"
[ 0.628529] libphy: ipq40xx_mdio: probed
[ 0.662780] ESS reset ok!
[ 0.695759] ESS reset ok!
[ 1.130566] libphy: Fixed MDIO Bus: probed
[ 1.230241] i2c /dev entries driver
[ 1.261125] NET: Registered protocol family 10
[ 1.262895] Segment Routing with IPv6
[ 1.264565] NET: Registered protocol family 17
[ 1.268669] 8021q: 802.1Q VLAN Support v1.8
[ 1.272678] Registering SWP/SWPB emulation handler
[ �[ 1.283203] Waiting for root device ...
It seems it does not see the "firmware" mtd partition, so it hangs
waiting for root indefinitely.
After I deleted the "compatible" line you added, it sees the "firmware"
partition and boots correctly. This is the serial boot log
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.14.88 (alby at openSUSE-xeon) (gcc version
7.4.0 (OpenWrt GCC 7.4.0 r8788-6b63595fec)) #0 SMP Mon Dec 17 07:16:28 2018
[ 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: GL.iNet GL-B1300
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] random: get_random_bytes called from
start_kernel+0x88/0x3c0 with crng_init=0
[ 0.000000] percpu: Embedded 15 pages/cpu @cfdb0000 s29324 r8192
d23924 u61440
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 64512
[ 0.000000] Kernel command line: rootfsname=rootfs rootwait
[ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072
bytes)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Memory: 249952K/260096K available (4237K kernel code,
137K rwdata, 1176K rodata, 1024K init, 228K bss, 10144K reserved, 0K
cma-reserved, 0K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xd0800000 - 0xff800000 ( 752 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0208000 - 0xc0723750 (5230 kB)
[ 0.000000] .init : 0xc0900000 - 0xc0a00000 (1024 kB)
[ 0.000000] .data : 0xc0a00000 - 0xc0a22740 ( 138 kB)
[ 0.000000] .bss : 0xc0a24000 - 0xc0a5d258 ( 229 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 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.000008] sched_clock: 56 bits at 48MHz, resolution 20ns, wraps
every 4398046511096ns
[ 0.000021] Switching to timer-based delay loop, resolution 20ns
[ 0.000237] Calibrating delay loop (skipped), value calculated using
timer frequency.. 96.00 BogoMIPS (lpj=480000)
[ 0.000254] pid_max: default: 32768 minimum: 301
[ 0.000391] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000407] Mountpoint-cache hash table entries: 1024 (order: 0, 4096
bytes)
[ 0.001026] CPU: Testing write buffer coherency: ok
[ 0.001712] Setting up static identity map for 0x80300000 - 0x80300060
[ 0.001855] Hierarchical SRCU implementation.
[ 0.002491] smp: Bringing up secondary CPUs ...
[ 0.005199] smp: Brought up 1 node, 4 CPUs
[ 0.005217] SMP: Total of 4 processors activated (384.00 BogoMIPS).
[ 0.005225] CPU: All CPU(s) started in SVC mode.
[ 0.009065] VFP support v0.3: implementor 41 architecture 2 part 30
variant 7 rev 5
[ 0.009237] clocksource: jiffies: mask: 0xffffffff max_cycles:
0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.009259] futex hash table entries: 1024 (order: 4, 65536 bytes)
[ 0.009451] pinctrl core: initialized pinctrl subsystem
[ 0.010409] NET: Registered protocol family 16
[ 0.010695] DMA: preallocated 256 KiB pool for atomic coherent
allocations
[ 0.011726] cpuidle: using governor ladder
[ 0.011770] cpuidle: using governor menu
[ 0.028681] usbcore: registered new interface driver usbfs
[ 0.028745] usbcore: registered new interface driver hub
[ 0.028824] usbcore: registered new device driver usb
[ 0.028871] pps_core: LinuxPPS API ver. 1 registered
[ 0.028880] pps_core: Software ver. 5.3.6 - Copyright 2005-2007
Rodolfo Giometti <giometti at linux.it>
[ 0.028903] PTP clock support registered
[ 0.030143] clocksource: Switched to clocksource arch_sys_counter
[ 0.030945] NET: Registered protocol family 2
[ 0.031557] TCP established hash table entries: 2048 (order: 1, 8192
bytes)
[ 0.031598] TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.031648] TCP: Hash tables configured (established 2048 bind 2048)
[ 0.031754] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.031790] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.031993] NET: Registered protocol family 1
[ 0.033016] No memory allocated for crashlog
[ 0.033200] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[ 0.036392] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.036406] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME)
(CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.041488] io scheduler noop registered
[ 0.041506] io scheduler deadline registered (default)
[ 0.044148] bam-dma-engine 8e04000.dma: num-channels unspecified in dt
[ 0.044166] bam-dma-engine 8e04000.dma: num-ees unspecified in dt
[ 0.044832] tcsr 1949000.tcsr: setting wifi_glb_cfg = 41000000
[ 0.044923] tcsr 194b000.tcsr: setting usb hs phy mode select = e700e7
[ 0.044997] tcsr 1953000.ess_tcsr: setting ess interface select = 0
[ 0.045079] tcsr 1957000.tcsr: setting wifi_noc_memtype_m0_m2 = 2222222
[ 0.045302] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 0.045847] msm_serial 78af000.serial: msm_serial: detected port #0
[ 0.045902] msm_serial 78af000.serial: uartclk = 1843200
[ 0.045950] 78af000.serial: ttyMSM0 at MMIO 0x78af000 (irq = 25,
base_baud = 115200) is a MSM
[ 0.045976] msm_serial: console setup on port #0
[ 0.554159] console [ttyMSM0] enabled
[ 0.559048] msm_serial: driver initialized
[ 0.566526] loop: module loaded
[ 0.567680] spi_qup 78b5000.spi: IN:block:16, fifo:64, OUT:block:16,
fifo:64
[ 0.570641] m25p80 spi0.0: mx25l25635e (32768 Kbytes)
[ 0.576753] 9 fixed-partitions partitions found on MTD device spi0.0
[ 0.581668] Creating 9 MTD partitions on "spi0.0":
[ 0.588083] 0x000000000000-0x000000040000 : "SBL1"
[ 0.593353] 0x000000040000-0x000000060000 : "MIBIB"
[ 0.598008] 0x000000060000-0x0000000c0000 : "QSEE"
[ 0.602823] 0x0000000c0000-0x0000000d0000 : "CDT"
[ 0.607601] 0x0000000d0000-0x0000000e0000 : "DDRPARAMS"
[ 0.612443] 0x0000000e0000-0x0000000f0000 : "APPSBLENV"
[ 0.617445] 0x0000000f0000-0x000000170000 : "APPSBL"
[ 0.622691] 0x000000170000-0x000000180000 : "ART"
[ 0.627831] 0x000000180000-0x000002000000 : "firmware"
[ 0.632777] 2 fit-fw partitions found on MTD device firmware
[ 0.636954] 0x000000180000-0x000000460000 : "kernel"
[ 0.643439] 0x000000453e04-0x000002000000 : "rootfs"
[ 0.648208] mtd: device 10 (rootfs) set to be root filesystem
[ 0.652826] 1 squashfs-split partitions found on MTD device rootfs
[ 0.658300] 0x000000a10000-0x000002000000 : "rootfs_data"
[ 0.665613] libphy: ipq40xx_mdio: probed
[ 0.700699] ESS reset ok!
[ 0.733674] ESS reset ok!
[ 1.063559] PHY 4 single test PSGMII issue happen!
[ 1.145289] PHY4 test see issue!
[ 1.169329] ESS reset ok!
[ 1.600558] libphy: Fixed MDIO Bus: probed
[ 1.700259] i2c /dev entries driver
[ 1.731133] NET: Registered protocol family 10
[ 1.732886] Segment Routing with IPv6
[ 1.734575] NET: Registered protocol family 17
[ 1.738617] 8021q: 802.1Q VLAN Support v1.8
[ 1.742701] Registering SWP/SWPB emulation handler
[ 1�[ 1.759539] VFS: Mounted root (squashfs filesystem) readonly
on device 31:10.
[ 1.761164] Freeing unused kernel memory: 1024K
and it goes on from here, I did not include the rest of the boot log.
I'm available to test any change you propose.
-Alberto
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list