Status of WAC510 port

Something like this before running bootm. Can't remember if you need to escape anything or use quotes

setenv bootargs ubi.mtd=rootfs mtdparts=spi0.1:56m(rootfs),56m(rootfs_1),15m(var_config),768k(Oops_log)

kernel panic

U-Boot 2012.07-V1.2.0.0 [local,local] (Oct 26 2016 - 02:39:01)

smem ram ptable found: ver: 1 len: 3
DRAM:  256 MiB
machid : 0x8010100
NAND:  spi_nand: spi_nand_flash_probe SF NAND ID 0:ef:aa:21
SF: Detected W25N01GV with page size 2 KiB, total 128 MiB
SF: Detected W25Q16 with page size 4 KiB, total 2 MiB
ipq_spi: page_size: 0x100, sector_size: 0x1000, size: 0x200000
130 MiB
MMC:
In:    serial
Out:   serial
Err:   serial
Product ID: WAC510
machid: 8010100
flash_type: 0
Net:   MAC0 addr:38:94:ed:30:f1:2f
PHY ID1: 0x4d
PHY ID2: 0xd0b2
ipq40xx_ess_sw_init done
eth0
Hit any key to stop autoboot:  0
Saving Environment to NAND...
Erasing Nand...
Erasing at 0xef000 -- 100% complete.
Writing to Nand... done
Boot count=5
Creating 1 MTD partitions on "nand1":
0x000000000000-0x000003800000 : "mtd=0"
UBI: attaching mtd2 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    126976 bytes
UBI: smallest flash I/O unit:    2048
UBI: VID header offset:          2048 (aligned 2048)
UBI: data offset:                4096
UBI: attached mtd2 to ubi0
UBI: MTD device name:            "mtd=0"
UBI: MTD device size:            56 MiB
UBI: number of good PEBs:        448
UBI: number of bad PEBs:         0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     4
UBI: available PEBs:             16
UBI: total number of reserved PEBs: 432
UBI: number of PEBs reserved for bad PEB handling: 4
UBI: max/mean erase counter: 2/0
Read 0 bytes from volume kernel to 84000000
No size specified -> Using max size (3809280)
## Booting kernel from FIT Image at 84000000 ...
   Using 'config@5' configuration
   Trying 'kernel@1' kernel subimage
     Description:  ARM OpenWrt Linux-5.4.77
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x840000e4
     Data Size:    3726027 Bytes = 3.6 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x80208000
     Entry Point:  0x80208000
     Hash algo:    crc32
     Hash value:   4a4f8ac8
     Hash algo:    sha1
     Hash value:   69a3cc4aaa6320bccd992d13ab538da80b6a8efd
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Flattened Device Tree from FIT Image at 84000000
   Using 'config@5' configuration
   Trying 'fdt@1' FDT blob subimage
     Description:  ARM OpenWrt netgear_wac510 device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x8438dce8
     Data Size:    17330 Bytes = 16.9 KiB
     Architecture: ARM
     Hash algo:    crc32
     Hash value:   37631ab2
     Hash algo:    sha1
     Hash value:   e37163061ef1e13a890e1e5a76639bd01e06c372
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x8438dce8
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 86ff8000, end 86fff3b1 ... OK
ipq: fdt fixup unable to find compatible node
Using machid 0x8010100 from environment

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.4.77 (gingernut@MSI) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r14946+44-36434f6436)) #0 SMP Sat Nov 21 07:15:49 2020
[    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: Netgear WAC510
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 15 pages/cpu s30092 r8192 d23156 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64448
[    0.000000] Kernel command line: WAC510 ubi.mtd=rootfs mtdparts=spi0.1:56m(rootfs),56m(rootfs_1),15m(var_config),768k(Oops_log) ubi.mtd=rootfs roo                     t=mtd:ubi_rootfs rootfstype=squashfs mtdparts=spi0.1:56m(rootfs),56m(rootfs_1),15m(var_config),768k(Oops_log) rootwait
[    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: 248632K/260096K available (5487K kernel code, 183K rwdata, 1452K rodata, 1024K init, 230K bss, 11464K reserved, 0K cma-reserve                     d, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    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] random: get_random_bytes called from start_kernel+0x2f0/0x498 with crng_init=0
[    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.000022] Switching to timer-based delay loop, resolution 20ns
[    0.000234] Calibrating delay loop (skipped), value calculated using timer frequency.. 96.00 BogoMIPS (lpj=480000)
[    0.000251] pid_max: default: 32768 minimum: 301
[    0.000449] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.000467] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001464] CPU: Testing write buffer coherency: ok
[    0.002521] Setting up static identity map for 0x80300000 - 0x80300060
[    0.002660] rcu: Hierarchical SRCU implementation.
[    0.003100] smp: Bringing up secondary CPUs ...
[    0.006222] smp: Brought up 1 node, 4 CPUs
[    0.006242] SMP: Total of 4 processors activated (384.00 BogoMIPS).
[    0.006252] CPU: All CPU(s) started in SVC mode.
[    0.010964] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.011118] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.011143] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.011423] pinctrl core: initialized pinctrl subsystem
[    0.012523] NET: Registered protocol family 16
[    0.012895] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.014133] cpuidle: using governor ladder
[    0.014181] cpuidle: using governor menu
[    0.034316] cryptd: max_cpu_qlen set to 1000
[    0.037768] usbcore: registered new interface driver usbfs
[    0.037836] usbcore: registered new interface driver hub
[    0.037926] usbcore: registered new device driver usb
[    0.037975] pps_core: LinuxPPS API ver. 1 registered
[    0.037984] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.038011] PTP clock support registered
[    0.038696] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.039848] clocksource: Switched to clocksource arch_sys_counter
[    0.040753] thermal_sys: Registered thermal governor 'step_wise'
[    0.041041] NET: Registered protocol family 2
[    0.041679] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.041720] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.041758] TCP bind hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.041808] TCP: Hash tables configured (established 2048 bind 2048)
[    0.041926] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.041964] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.042199] NET: Registered protocol family 1
[    0.042242] PCI: CLS 0 bytes, default 64
[    0.044252] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[    0.049875] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.049893] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.106745] bam-dma-engine 8e04000.dma: num-channels unspecified in dt
[    0.106767] bam-dma-engine 8e04000.dma: num-ees unspecified in dt
[    0.107476] tcsr 1949000.tcsr: setting wifi_glb_cfg = 41000000
[    0.107565] tcsr 194b000.tcsr: setting usb hs phy mode select = e700e7
[    0.107656] tcsr 1953000.ess_tcsr: setting ess interface select = 0
[    0.107752] tcsr 1957000.tcsr: setting wifi_noc_memtype_m0_m2 = 2222222
[    0.108079] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.108650] msm_serial 78af000.serial: msm_serial: detected port #0
[    0.108692] msm_serial 78af000.serial: uartclk = 1843200
[    0.108741] 78af000.serial: ttyMSM0 at MMIO 0x78af000 (irq = 25, base_baud = 115200) is a MSM
[    0.108768] msm_serial: console setup on port #0
[    0.606187] printk: console [ttyMSM0] enabled
[    0.611129] msm_serial: driver initialized
[    0.620268] loop: module loaded
[    0.622526] spi_qup 78b5000.spi: IN:block:16, fifo:64, OUT:block:16, fifo:64
[    0.629499] random: fast init done
[    0.632370] spi-nor spi0.0: s25fl016k (2048 Kbytes)
[    0.632781] 9 fixed-partitions partitions found on MTD device spi0.0
[    0.637497] Creating 9 MTD partitions on "spi0.0":
[    0.644124] 0x000000000000-0x000000040000 : "0:SBL1"
[    0.649639] 0x000000040000-0x000000060000 : "0:MIBIB"
[    0.654676] 0x000000060000-0x0000000c0000 : "0:QSEE"
[    0.659546] 0x0000000c0000-0x0000000d0000 : "0:CDT"
[    0.664716] 0x0000000d0000-0x0000000e0000 : "0:DDRPARAMS"
[    0.669200] 0x0000000e0000-0x0000000f0000 : "0:APPSBLENV"
[    0.674820] 0x0000000f0000-0x0000001e0000 : "0:APPSBL"
[    0.680166] 0x0000001e0000-0x0000001f0000 : "0:MANUDATA"
[    0.685203] 0x0000001f0000-0x000000200000 : "0:ART"
[    0.691420] spi-nand spi0.1: Winbond SPI NAND was found.
[    0.694447] spi-nand spi0.1: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[    0.700380] 4 cmdlinepart partitions found on MTD device spi0.1
[    0.708069] Creating 4 MTD partitions on "spi0.1":
[    0.713755] 0x000000000000-0x000003800000 : "rootfs"
[    0.899089] mtd: device 9 (rootfs) set to be root filesystem
[    0.900447] mtdsplit: no squashfs found in "rootfs"
[    0.903841] 0x000003800000-0x000007000000 : "rootfs_1"
[    1.088367] 0x000007000000-0x000007f00000 : "var_config"
[    1.137209] 0x000007f00000-0x000007fc0000 : "Oops_log"
[    1.143405] libphy: ipq40xx_mdio: probed
[    1.174799] ESS reset ok!
[    1.207847] ESS reset ok!
[    1.626024] libphy: Fixed MDIO Bus: probed
[    1.630532] i2c /dev entries driver
[    1.632517] sdhci: Secure Digital Host Controller Interface driver
[    1.632826] sdhci: Copyright(c) Pierre Ossman
[    1.639075] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.647088] NET: Registered protocol family 10
[    1.650706] Segment Routing with IPv6
[    1.653576] NET: Registered protocol family 17
[    1.657264] 8021q: 802.1Q VLAN Support v1.8
[    1.661722] Registering SWP/SWPB emulation handler
[    1.675226] ubi0: attaching mtd9
[    2.412504] random: crng init done
[    3.242471] ubi0: scanning is finished
[    3.283618] ubi0: attached mtd9 (name "rootfs", size 56 MiB)
[    3.283691] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    3.288385] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    3.295229] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    3.301997] ubi0: good PEBs: 448, bad PEBs: 0, corrupted PEBs: 0
[    3.308697] ubi0: user volume: 4, internal volumes: 1, max. volumes count: 128
[    3.315018] ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 2120125054
[    3.322047] ubi0: available PEBs: 0, total reserved PEBs: 448, PEBs reserved for bad PEB handling: 20
[    3.331424] ubi0: background thread "ubi_bgt0d" started, PID 104
[    3.331536] ubi: mtd9 is already attached to ubi0
[    3.346431] UBI error: cannot attach mtd9
[    3.353232] block ubiblock0_2: created from ubi0:2(rootfs)
▒[    3.361735] mtd:ubi_rootfs: Can't open blockdev
[    3.361771] VFS: Cannot open root device "mtd:ubi_rootfs" or unknown-block(31,9): error -2
[    3.365074] Please append a correct "root=" boot option; here are the available partitions:
[    3.373506] 1f00             256 mtdblock0
[    3.373509]  (driver?)
[    3.385819] 1f01             128 mtdblock1
[    3.385822]  (driver?)
[    3.392341] 1f02             384 mtdblock2
[    3.392344]  (driver?)
[    3.398835] 1f03              64 mtdblock3
[    3.398837]  (driver?)
[    3.405351] 1f04              64 mtdblock4
[    3.405353]  (driver?)
[    3.411872] 1f05              64 mtdblock5
[    3.411875]  (driver?)
[    3.418367] 1f06             960 mtdblock6
[    3.418370]  (driver?)
[    3.424877] 1f07              64 mtdblock7
[    3.424880]  (driver?)
[    3.431401] 1f08              64 mtdblock8
[    3.431404]  (driver?)
[    3.437898] 1f09           57344 mtdblock9
[    3.437901]  (driver?)
[    3.444409] 1f0a           57344 mtdblock10
[    3.444411]  (driver?)
[    3.451281] 1f0b           15360 mtdblock11
[    3.451284]  (driver?)
[    3.457864] 1f0c             768 mtdblock12
[    3.457866]  (driver?)
[    3.464461] fe00            4464 ubiblock0_2
[    3.464463]  (driver?)
[    3.471069] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,9)
[    3.473331] CPU0: stopping
[    3.481565] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.77 #0
[    3.484341] Hardware name: Generic DT based system
[    3.490180] [<c030e544>] (unwind_backtrace) from [<c030afc0>] (show_stack+0x10/0x14)
[    3.495034] [<c030afc0>] (show_stack) from [<c0840798>] (dump_stack+0x94/0xa8)
[    3.502929] [<c0840798>] (dump_stack) from [<c030d7f8>] (handle_IPI+0x164/0x19c)
[    3.509960] [<c030d7f8>] (handle_IPI) from [<c05a2888>] (gic_handle_irq+0x8c/0x90)
[    3.517512] [<c05a2888>] (gic_handle_irq) from [<c0301a8c>] (__irq_svc+0x6c/0x90)
[    3.524883] Exception stack(0xc0b01f28 to 0xc0b01f70)
[    3.532437] 1f20:                   00000000 0002284c cfd78234 c0313c20 ffffe000 c0b04e68
[    3.537478] 1f40: c0b04ea8 00000001 00000000 c0a3ede8 c0b0de08 00000000 c0b04f10 c0b01f78
[    3.545631] 1f60: c03083e8 c03083ec 60000013 ffffffff
[    3.553794] [<c0301a8c>] (__irq_svc) from [<c03083ec>] (arch_cpu_idle+0x38/0x3c)
[    3.558833] [<c03083ec>] (arch_cpu_idle) from [<c0349b18>] (do_idle+0x1e4/0x21c)
[    3.566296] [<c0349b18>] (do_idle) from [<c0349de0>] (cpu_startup_entry+0x18/0x1c)
[    3.573678] [<c0349de0>] (cpu_startup_entry) from [<c0a00df4>] (start_kernel+0x488/0x498)
[    3.581055] [<c0a00df4>] (start_kernel) from [<00000000>] (0x0)
[    3.589292] CPU1: stopping
[    3.595016] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.4.77 #0
[    3.597792] Hardware name: Generic DT based system
[    3.603621] [<c030e544>] (unwind_backtrace) from [<c030afc0>] (show_stack+0x10/0x14)
[    3.608485] [<c030afc0>] (show_stack) from [<c0840798>] (dump_stack+0x94/0xa8)
[    3.616381] [<c0840798>] (dump_stack) from [<c030d7f8>] (handle_IPI+0x164/0x19c)
[    3.623413] [<c030d7f8>] (handle_IPI) from [<c05a2888>] (gic_handle_irq+0x8c/0x90)
[    3.630965] [<c05a2888>] (gic_handle_irq) from [<c0301a8c>] (__irq_svc+0x6c/0x90)
[    3.638336] Exception stack(0xcf861f60 to 0xcf861fa8)
[    3.645891] 1f60: 00000000 0000bec0 cfd87234 c0313c20 ffffe000 c0b04e68 c0b04ea8 00000002
[    3.650931] 1f80: 00000000 c0a3ede8 c0b0de08 00000000 c0b04e78 cf861fb0 c03083e8 c03083ec
[    3.659086] 1fa0: 60000013 ffffffff
[    3.667242] [<c0301a8c>] (__irq_svc) from [<c03083ec>] (arch_cpu_idle+0x38/0x3c)
[    3.670550] [<c03083ec>] (arch_cpu_idle) from [<c0349b18>] (do_idle+0x1e4/0x21c)
[    3.678187] [<c0349b18>] (do_idle) from [<c0349de0>] (cpu_startup_entry+0x18/0x1c)
[    3.685563] [<c0349de0>] (cpu_startup_entry) from [<803024ac>] (0x803024ac)
[    3.692939] CPU2: stopping
[    3.699791] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 5.4.77 #0
[    3.702568] Hardware name: Generic DT based system
[    3.708393] [<c030e544>] (unwind_backtrace) from [<c030afc0>] (show_stack+0x10/0x14)
[    3.713260] [<c030afc0>] (show_stack) from [<c0840798>] (dump_stack+0x94/0xa8)
[    3.721154] [<c0840798>] (dump_stack) from [<c030d7f8>] (handle_IPI+0x164/0x19c)
[    3.728187] [<c030d7f8>] (handle_IPI) from [<c05a2888>] (gic_handle_irq+0x8c/0x90)
[    3.735738] [<c05a2888>] (gic_handle_irq) from [<c0301a8c>] (__irq_svc+0x6c/0x90)
[    3.743111] Exception stack(0xcf863f60 to 0xcf863fa8)
[    3.750665] 3f60: 00000000 00012714 cfd96234 c0313c20 ffffe000 c0b04e68 c0b04ea8 00000004
[    3.755705] 3f80: 00000000 c0a3ede8 c0b0de08 00000000 c0b04e78 cf863fb0 c03083e8 c03083ec
[    3.763859] 3fa0: 60000013 ffffffff
[    3.772019] [<c0301a8c>] (__irq_svc) from [<c03083ec>] (arch_cpu_idle+0x38/0x3c)
[    3.775323] [<c03083ec>] (arch_cpu_idle) from [<c0349b18>] (do_idle+0x1e4/0x21c)
[    3.782962] [<c0349b18>] (do_idle) from [<c0349de0>] (cpu_startup_entry+0x18/0x1c)
[    3.790339] [<c0349de0>] (cpu_startup_entry) from [<803024ac>] (0x803024ac)
[    3.797718] Rebooting in 1 seconds..

@Lochnair

Been testing this a bit more but didn't get any further flashing the sysupgrade image unfortunately.

Maybe some changes are needed to the make file or DTS once merged with latest 5.4 trunk?

I'll have to look into if any relevant changes went in, wherever those would be :stuck_out_tongue:
But that boot log you posted above, that's just a normal boot from flash isn't it?

Oh btw, what UART adapter are you using? Just in case the ones I'm waiting on doesn't work.

The bootlog just above is after flashing a sysupgrade image from a booted initramfs. As you can see the kernel bails on a UBI error.

I tried to compile an image from @robimarko's 4.19 source but it fails on downloading the wireless drivers, I think links changed recently on Candelatech servers.

Thanks. I've got a CP2102 variant coming, so good chance I'll be able to test on my own devices soon as well :slight_smile:

Yeah that's what I thought. So adding the bootargs got the sysupgrade to actually write the image at least. That's something.

I see in this thread that @7604timo had similiar issues.

So based on that thread, this should probably work:

setenv bootargs root=/dev/ubiblock0_2
bootipq

If I understand correctly this might not be a good permanent solution though, because it won't support both FW partitions (i.e. primary and secondary). Although I am unsure about OpenWrt support for dual firmware.

Edit: A bit of Googling tells me that dual firmware is well supported. So getting this right is important

Edit 2: Or maybe setting root=/dev/ubiblock0_2 in the DTS would work. I see it's done like that for the Linksys EA8300

Edit 3: I'm hopeful that works, so I added it to the DTS. If setting the bootargs like that manually works, you can compile a new image with the latest commit and it should add it upon boot, that way you don't need to modify the U-boot env.

1 Like

Pulled in your latest commit but it still fails like before.

I've modified what you set in the DTS to exactly what @7604timo was told to do and have recompiled an image.

I'll test it later when I get some time.

chosen {

bootargs-append = "ubi.mtd=rootfs root=/dev/ubiblock0_2"

}

Damn. I'm not sure it'll make any difference, since that parameter is set automatically by U-boot (or is supposed to at least).

I saw it mentioned somewhere that you can do bootipq debug to get more verbose output from the boot process before the kernel takes over. This way you can see for example what bootargs it sets.

As far as I can see by default no bootargs are set by default when booting OpenWRT and are only set when booting with bootipq which loads the Netgear firmware.

If you look here https://github.com/7604timo/netgear-wac510/commit/67d2f380b07d12a9432a2a9c9bf6db45bab70514 it seems 7604timo got it working parsing these bootargs to kernel.

But bootipq should be what it does by default if you don't interrupt it no?

I'm having a hard time figuring out exactly what he ended up with in the end. Did the error message change with the newer image btw?

I figure the support for EA8300 should be something to draw from, cause it's the same target and has dual firmware: https://github.com/openwrt/openwrt/pull/1980/files

I see that the Linksys provides rootwait from U-boot, not having seen your latest bootlog, maybe we need to provide that so it has enough time to figure out the partitions.

bootipq is by default, I think 7604timo said that it's some boot script.

No change with your updated DTS unfortunately.

@robimarko said that he had things working using his source so maybe he could enlighten us.

I'll post more bootlogs later.

1 Like

Yeah bootipq is a builtin command in U-boot. Netgear added their on patches to it to support dual firmware and such (which is were I found the bootargs it sets).

I added the rootwait parameter to the DTS if you wanna try that when you get some time.

I had already added rootwait to the DTS but it's not working, or more like it doesn't always work.

I seems to flash correctly but it just reboots to the Netgear firmware.

At one point it rebooted to Openwrt in flash but it seems that it had nothing to do with the bootargs added by us to the DTS or Uboot.

I'm not sure but I think it might have something to do with which partition is active as I built a new image with the bootargs commited out and also with no bootargrs set in Uboot and it still rebooted to Openwrt.

While testing different sysupgrade builds it just rebooted back to the Netgear firmware for some reason.

Now I can't get it to boot back to Openwrt in flash.

Ok, as I see that there is interest in supporting this device I have adapted stuff for 5.4 kernel.

Hopefully, I will have it done by the weekend for a PR.

3 Likes

Thank you.

Testing later.

Pushed some updates to it.
Most stuff should work, but first-time install will still need to be via initramfs

2 Likes

Fresh builds from your source, the initramfs image boots fine but after sucessfully flashing the sysupgrade image it just reboots to stock firmware.

Here are logs of the process I been using, maybe I'm doing something wrong.

initramfs

(IPQ40xx) # tftpboot openwrt-ipq40xx-generic-netgear_wac510-initramfs-fit-uImage.itb
eth0 PHY0 Down Speed :10 Half duplex
eth0 PHY1 Down Speed :10 Half duplex
eth0 PHY2 Down Speed :10 Half duplex
eth0 PHY3 up Speed :1000 Full duplex
eth0 PHY4 Down Speed :10 Half duplex
Using eth0 device
TFTP from server 192.168.1.15; our IP address is 192.168.1.11
Filename 'openwrt-ipq40xx-generic-netgear_wac510-initramfs-fit-uImage.itb'.
Load address: 0x84000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ################################################################
done
Bytes transferred = 9515512 (9131f8 hex)
(IPQ40xx) # bootm
## Booting kernel from FIT Image at 84000000 ...
   Using 'config@5' configuration
   Trying 'kernel@1' kernel subimage
     Description:  ARM OpenWrt Linux-5.4.79
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x840000e4
     Data Size:    9495883 Bytes = 9.1 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x80208000
     Entry Point:  0x80208000
     Hash algo:    crc32
     Hash value:   e7e85939
     Hash algo:    sha1
     Hash value:   976652b80ba0ff16803dbf2686cb91198d15feb2
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Flattened Device Tree from FIT Image at 84000000
   Using 'config@5' configuration
   Trying 'fdt@1' FDT blob subimage
     Description:  ARM OpenWrt netgear_wac510 device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x8490e768
     Data Size:    17757 Bytes = 17.3 KiB
     Architecture: ARM
     Hash algo:    crc32
     Hash value:   ecfacb31
     Hash algo:    sha1
     Hash value:   6c0fad580a4236c25d242b7577dc201b9031a138
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x8490e768
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 86ff8000, end 86fff55c ... OK
ipq: fdt fixup unable to find compatible node
Using machid 0x8010100 from environment

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.4.79 (gingernut@MSI) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r15037-48d4894357)) #0 SMP Wed Nov 25 13:24:03 2020
[    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: Netgear WAC510
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 15 pages/cpu s30092 r8192 d23156 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64448
[    0.000000] Kernel command line:  root=/dev/ubiblock0_1
[    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: 235320K/260096K available (5488K kernel code, 183K rwdata, 1452K rodata, 14336K init, 230K bss, 24776K 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] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] random: get_random_bytes called from start_kernel+0x2f0/0x498 with crng_init=0
[    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.000007] sched_clock: 56 bits at 48MHz, resolution 20ns, wraps every 4398046511096ns
[    0.000022] Switching to timer-based delay loop, resolution 20ns
[    0.000244] Calibrating delay loop (skipped), value calculated using timer frequency.. 96.00 BogoMIPS (lpj=480000)
[    0.000261] pid_max: default: 32768 minimum: 301
[    0.000461] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.000479] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001465] CPU: Testing write buffer coherency: ok
[    0.002525] Setting up static identity map for 0x80300000 - 0x80300060
[    0.002664] rcu: Hierarchical SRCU implementation.
[    0.003112] smp: Bringing up secondary CPUs ...
[    0.006269] smp: Brought up 1 node, 4 CPUs
[    0.006288] SMP: Total of 4 processors activated (384.00 BogoMIPS).
[    0.006297] CPU: All CPU(s) started in SVC mode.
[    0.011025] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.011181] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.011207] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.011484] pinctrl core: initialized pinctrl subsystem
[    0.012571] NET: Registered protocol family 16
[    0.012865] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.014143] cpuidle: using governor ladder
[    0.014189] cpuidle: using governor menu
[    0.034454] cryptd: max_cpu_qlen set to 1000
[    0.037887] usbcore: registered new interface driver usbfs
[    0.037952] usbcore: registered new interface driver hub
[    0.038039] usbcore: registered new device driver usb
[    0.038086] pps_core: LinuxPPS API ver. 1 registered
[    0.038095] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.038121] PTP clock support registered
[    0.038820] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.039914] clocksource: Switched to clocksource arch_sys_counter
[    0.040795] thermal_sys: Registered thermal governor 'step_wise'
[    0.041086] NET: Registered protocol family 2
[    0.041705] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.041748] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.041785] TCP bind hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.041834] TCP: Hash tables configured (established 2048 bind 2048)
[    0.041950] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.041991] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.042225] NET: Registered protocol family 1
[    0.042265] PCI: CLS 0 bytes, default 64
[    0.259588] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[    0.265252] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.265267] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.316510] bam-dma-engine 8e04000.dma: num-channels unspecified in dt
[    0.316531] bam-dma-engine 8e04000.dma: num-ees unspecified in dt
[    0.317803] tcsr 1949000.tcsr: setting wifi_glb_cfg = 41000000
[    0.317893] tcsr 194b000.tcsr: setting usb hs phy mode select = e700e7
[    0.317978] tcsr 1953000.ess_tcsr: setting ess interface select = 0
[    0.318060] tcsr 1957000.tcsr: setting wifi_noc_memtype_m0_m2 = 2222222
[    0.318390] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.318972] msm_serial 78af000.serial: msm_serial: detected port #0
[    0.319016] msm_serial 78af000.serial: uartclk = 1843200
[    0.319069] 78af000.serial: ttyMSM0 at MMIO 0x78af000 (irq = 25, base_baud = 115200) is a MSM
[    0.319095] msm_serial: console setup on port #0
[    0.798201] printk: console [ttyMSM0] enabled
[    0.803126] msm_serial: driver initialized
[    0.812319] loop: module loaded
[    0.814487] spi_qup 78b5000.spi: IN:block:16, fifo:64, OUT:block:16, fifo:64
[    0.821447] random: fast init done
[    0.824238] spi-nor spi0.0: s25fl016k (2048 Kbytes)
[    0.824824] 9 fixed-partitions partitions found on MTD device spi0.0
[    0.829547] Creating 9 MTD partitions on "spi0.0":
[    0.836181] 0x000000000000-0x000000040000 : "0:SBL1"
[    0.841704] 0x000000040000-0x000000060000 : "0:MIBIB"
[    0.846660] 0x000000060000-0x0000000c0000 : "0:QSEE"
[    0.851674] 0x0000000c0000-0x0000000d0000 : "0:CDT"
[    0.856651] 0x0000000d0000-0x0000000e0000 : "0:DDRPARAMS"
[    0.861346] 0x0000000e0000-0x0000000f0000 : "0:APPSBLENV"
[    0.866812] 0x0000000f0000-0x0000001e0000 : "0:APPSBL"
[    0.872252] 0x0000001e0000-0x0000001f0000 : "0:MANUDATA"
[    0.877223] 0x0000001f0000-0x000000200000 : "0:ART"
[    0.883499] spi-nand spi0.1: Winbond SPI NAND was found.
[    0.886499] spi-nand spi0.1: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[    0.892454] 4 fixed-partitions partitions found on MTD device spi0.1
[    0.900153] Creating 4 MTD partitions on "spi0.1":
[    0.906470] 0x000000000000-0x000003800000 : "rootfs"
[    1.084181] mtd: device 9 (rootfs) set to be root filesystem
[    1.085135] mtdsplit: no squashfs found in "rootfs"
[    1.088932] 0x000003800000-0x000007000000 : "rootfs_1"
[    1.266502] 0x000007000000-0x000007f00000 : "var_config"
[    1.313599] 0x000007f00000-0x000007fc0000 : "Oops_log"
[    1.319791] libphy: ipq40xx_mdio: probed
[    1.413573] ESS reset ok!
[    1.446618] ESS reset ok!
[    1.864823] libphy: Fixed MDIO Bus: probed
[    1.869247] i2c /dev entries driver
[    1.871350] sdhci: Secure Digital Host Controller Interface driver
[    1.871544] sdhci: Copyright(c) Pierre Ossman
[    1.877790] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.885768] NET: Registered protocol family 10
[    1.889323] Segment Routing with IPv6
[    1.892335] NET: Registered protocol family 17
[    1.895984] 8021q: 802.1Q VLAN Support v1.8
[    1.900376] Registering SWP/SWPB emulation handler
[    1.91390▒[    1.934838] Freeing unused kernel memory: 14336K
[    1.992863] Run /init as init process
[    2.021305] init: Console is alive
[    2.021545] init: - watchdog -
[    2.037300] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.043054] dwc3-qcom 8af8800.usb3: IRQ hs_phy_irq not found
[    2.043100] dwc3-qcom 8af8800.usb3: IRQ dp_hs_phy_irq not found
[    2.048816] dwc3-qcom 8af8800.usb3: IRQ dm_hs_phy_irq not found
[    2.054515] dwc3-qcom 8af8800.usb3: IRQ ss_phy_irq not found
[    2.062141] dwc3-qcom 60f8800.usb2: IRQ hs_phy_irq not found
[    2.066263] dwc3-qcom 60f8800.usb2: IRQ dp_hs_phy_irq not found
[    2.071934] dwc3-qcom 60f8800.usb2: IRQ dm_hs_phy_irq not found
[    2.077544] dwc3-qcom 60f8800.usb2: IRQ ss_phy_irq not found
[    2.085817] dwc3 8a00000.dwc3: Failed to get clk 'ref': -2
[    2.214822] dwc3 6000000.dwc3: Failed to get clk 'ref': -2
[    2.319155] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    2.319238] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[    2.323896] xhci-hcd xhci-hcd.0.auto: hcc params 0x0228f665 hci version 0x100 quirks 0x0000000002010010
[    2.331271] xhci-hcd xhci-hcd.0.auto: irq 94, io mem 0x08a00000
[    2.343057] hub 1-0:1.0: USB hub found
[    2.346425] hub 1-0:1.0: 1 port detected
[    2.350576] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[    2.354295] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[    2.359582] xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
[    2.367267] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    2.374329] hub 2-0:1.0: USB hub found
[    2.382120] hub 2-0:1.0: 1 port detected
[    2.386017] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    2.389626] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 3
[    2.395157] xhci-hcd xhci-hcd.1.auto: hcc params 0x0220f665 hci version 0x100 quirks 0x0000000002010010
[    2.402554] xhci-hcd xhci-hcd.1.auto: irq 95, io mem 0x06000000
[    2.412718] hub 3-0:1.0: USB hub found
[    2.417776] hub 3-0:1.0: 1 port detected
[    2.421897] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    2.425651] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 4
[    2.430971] xhci-hcd xhci-hcd.1.auto: Host supports USB 3.0 SuperSpeed
[    2.438600] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    2.445656] hub 4-0:1.0: USB hub found
[    2.453390] hub 4-0:1.0: config failed, hub doesn't have any ports! (err -19)
[    2.459581] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    2.465128] init: - preinit -
[    2.719319] random: jshn: uninitialized urandom read (4 bytes read)
[    2.770266] random: jshn: uninitialized urandom read (4 bytes read)
[    2.797669] random: jshn: uninitialized urandom read (4 bytes read)
[    2.940011] ess_edma c080000.edma: eth0: GMAC Link is down
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
[    6.091570] ess_edma c080000.edma: eth0: GMAC Link is up with phy_speed=1000
[    6.092487] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    7.185876] ess_edma c080000.edma: eth0: GMAC Link is down
[    7.193268] procd: - early -
[    7.193413] procd: - watchdog -
[    7.737587] procd: - watchdog -
[    7.741209] procd: - ubus -
[    7.765995] urandom_read: 5 callbacks suppressed
[    7.766006] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.793793] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.796834] procd: - init -
Please press Enter to activate this console.
[    8.132916] kmodloader: loading kernel modules from /etc/modules.d/*
[    8.145865] urngd: v1.0.2 started.
[    8.161783] Mirror/redirect action on
[    8.167881] u32 classifier
[    8.167905]     input device check on
[    8.169475]     Actions configured
[    8.181901] Loading modules backported from Linux version v5.8-0-gbcf876870b95
[    8.181937] Backport generated by backports.git v5.8-1-0-g79400d9e
[    8.210863] xt_time: kernel timezone is -0000
[    8.212803] random: crng init done
[    8.250012] PPP generic driver version 2.4.2
[    8.251106] NET: Registered protocol family 24
[    8.290063] ath10k_mac_create, priv_size: 924  hw: 773f9313  hw->priv: c7ccfdc2
[    8.948334] ath10k_ahb a000000.wifi: qca4019 hw1.0 target 0x01000000 chip_id 0x003b00ff sub 0000:0000
[    8.948384] ath10k_ahb a000000.wifi: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[    8.961327] ath10k_ahb a000000.wifi: firmware ver 10.4b-ct-4019-fW-13-8c5b2baa2 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 1f3ed50f
[    9.012368] ath10k_ahb a000000.wifi: board_file api 2 bmi_id 0:16 crc32 b5a85a38
[   10.320017] ath10k_ahb a000000.wifi: unsupported HTC service id: 1536
[   10.321448] ath10k_ahb a000000.wifi: 10.4 wmi init: vdevs: 16  peers: 48  tid: 96
[   10.325449] ath10k_ahb a000000.wifi: msdu-desc: 2500  skid: 32
[   10.373860] ath10k_ahb a000000.wifi: wmi print 'P 48/48 V 16 K 144 PH 176 T 186  msdu-desc: 2500  sw-crypt: 0 ct-sta: 0'
[   10.374864] ath10k_ahb a000000.wifi: wmi print 'free: 53252 iram: 13576 sram: 35752'
[   10.514460] ath10k_ahb a000000.wifi: htt-ver 2.2 wmi-op 6 htt-op 4 cal pre-cal-file max-sta 32 raw 0 hwcrypto 1
[   10.673850] ath10k_mac_create, priv_size: 924  hw: aa79fa0e  hw->priv: 3c74fbdd
[   11.434466] ath10k_ahb a800000.wifi: qca4019 hw1.0 target 0x01000000 chip_id 0x003b00ff sub 0000:0000
[   11.434512] ath10k_ahb a800000.wifi: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[   11.453707] ath10k_ahb a800000.wifi: firmware ver 10.4b-ct-4019-fW-13-8c5b2baa2 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 1f3ed50f
[   11.500223] ath10k_ahb a800000.wifi: board_file api 2 bmi_id 0:17 crc32 b5a85a38
[   12.807345] ath10k_ahb a800000.wifi: unsupported HTC service id: 1536
[   12.808213] ath10k_ahb a800000.wifi: 10.4 wmi init: vdevs: 16  peers: 48  tid: 96
[   12.812841] ath10k_ahb a800000.wifi: msdu-desc: 2500  skid: 32
[   12.849476] ath10k_ahb a800000.wifi: wmi print 'P 48/48 V 16 K 144 PH 176 T 186  msdu-desc: 2500  sw-crypt: 0 ct-sta: 0'
[   12.851219] ath10k_ahb a800000.wifi: wmi print 'free: 53252 iram: 13576 sram: 35752'
[   12.972955] ath10k_ahb a800000.wifi: htt-ver 2.2 wmi-op 6 htt-op 4 cal pre-cal-file max-sta 32 raw 0 hwcrypto 1
[   13.128524] kmodloader: done loading kernel modules from /etc/modules.d/*
[   23.894810] ess_edma c080000.edma: eth0: GMAC Link is up with phy_speed=1000
[   23.896060] br-lan: port 1(eth0) entered blocking state
[   23.901008] br-lan: port 1(eth0) entered disabled state
[   23.906251] device eth0 entered promiscuous mode
[   23.926764] ess_edma c080000.edma: eth1: GMAC Link is down
[   24.971216] br-lan: port 1(eth0) entered blocking state
[   24.971257] br-lan: port 1(eth0) entered forwarding state
[   24.976030] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready

sysupgrade

Watchdog handover: fd=3
- watchdog -
killall: telnetd: no process killed
killall: ash: no process killed
Wed Nov 25 13:24:45 UTC 2020 upgrade: Sending TERM to remaining processes ... hostapd wpa_supplicant netifd odhcpd uhttpd ubusd askfirst sh collectd sh urngd sh sleep dnsmasq lua sh nslookup logd rpcd
Wed Nov 25 13:24:49 UTC 2020 upgrade: Sending KILL to remaining processes ...
Wed Nov 25 13:24:50 UTC 2020 upgrade: Performing system upgrade...
[   55.623725] ubi0: attaching mtd9
[   56.460602] ubi0: scanning is finished
[   56.488561] ubi0: attached mtd9 (name "rootfs", size 56 MiB)
[   56.488637] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[   56.493524] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[   56.500090] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[   56.506869] ubi0: good PEBs: 448, bad PEBs: 0, corrupted PEBs: 0
[   56.513702] ubi0: user volume: 4, internal volumes: 1, max. volumes count: 128
[   56.519898] ubi0: max/mean erase counter: 6/2, WL threshold: 4096, image sequence number: 1198823755
[   56.526932] ubi0: available PEBs: 0, total reserved PEBs: 448, PEBs reserved for bad PEB handling: 20
[   56.536400] ubi0: background thread "ubi_bgt0d" started, PID 3239
UBI device number 0, total 448 LEBs (56885248 bytes, 54.2 MiB), available 0 LEBs (0 bytes), LEB size 126976 bytes (124.0 KiB)
Volume ID 0, size 30 LEBs (3809280 bytes, 3.6 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "kernel", alignment 1
Volume ID 2, size 36 LEBs (4571136 bytes, 4.3 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "rootfs", alignment 1
Set volume size to 28569600
Volume ID 3, size 225 LEBs (28569600 bytes, 27.2 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "rootfs_data", alignment 1
sysupgrade successful
umount: can't unmount /dev: Resource busy
umount: can't unmount /tmp: Resource busy
umount: can't unmount /: Invalid argument
[
Format: Log Type - Time(microsec) - Message - Optional Info
Log Type: B - Since Boot(Power On Reset),  D - Delta,  S - Statistic
S - QC_IMAGE_VERSION_STRING=BOOT.BF.3.1.1-00096
S - IMAGE_VARIANT_STRING=DAABANAZA
S - OEM_IMAGE_VERSION_STRING=CRM
S - Boot Config, 0x00000021
S - Core 0 Frequency, 0 MHz
B -       261 - PBL, Start
B -      1338 - bootable_media_detect_entry, Start
B -      1678 - bootable_media_detect_success, Start
B -      1692 - elf_loader_entry, Start
B -      5069 - auth_hash_seg_entry, Start
B -      7211 - auth_hash_seg_exit, Start
B -    572127 - elf_segs_hash_verify_entry, Start
B -    687066 - PBL, End
B -    687090 - SBL1, Start
B -    775425 - pm_device_init, Start
D -         6 - pm_device_init, Delta
B -    776935 - boot_flash_init, Start
D -     62890 - boot_flash_init, Delta
B -    844014 - boot_config_data_table_init, Start
D -      3843 - boot_config_data_table_init, Delta - (419 Bytes)
B -    851233 - clock_init, Start
D -      7565 - clock_init, Delta
B -    863320 - CDT version:2,Platform ID:8,Major ID:1,Minor ID:1,Subtype:0
B -    866809 - sbl1_ddr_set_params, Start
B -    871796 - cpr_init, Start
D -         2 - cpr_init, Delta
B -    876289 - Pre_DDR_clock_init, Start
D -         4 - Pre_DDR_clock_init, Delta
D -     13149 - sbl1_ddr_set_params, Delta
B -    889991 - pm_driver_init, Start
D -         2 - pm_driver_init, Delta
B -    960404 - sbl1_wait_for_ddr_training, Start
D -        29 - sbl1_wait_for_ddr_training, Delta
B -    976013 - Image Load, Start
D -    135009 - QSEE Image Loaded, Delta - (262104 Bytes)
B -   1111520 - Image Load, Start
D -      1446 - SEC Image Loaded, Delta - (2048 Bytes)
B -   1121897 - Image Load, Start
D -    213660 - APPSBL Image Loaded, Delta - (436880 Bytes)
B -   1335981 - QSEE Execution, Start
D -        58 - QSEE Execution, Delta
B -   1342176 - SBL1, End
D -    657197 - SBL1, Delta
S - Flash Throughput, 2004 KB/s  (701451 Bytes,  349977 us)
S - DDR Frequency, 537 MHz


U-Boot 2012.07-V1.2.0.0 [local,local] (Oct 26 2016 - 02:39:01)

smem ram ptable found: ver: 1 len: 3
DRAM:  256 MiB
machid : 0x8010100
NAND:  spi_nand: spi_nand_flash_probe SF NAND ID 0:ef:aa:21
SF: Detected W25N01GV with page size 2 KiB, total 128 MiB
SF: Detected W25Q16 with page size 4 KiB, total 2 MiB
ipq_spi: page_size: 0x100, sector_size: 0x1000, size: 0x200000
130 MiB
MMC:
In:    serial
Out:   serial
Err:   serial
Product ID: WAC510
machid: 8010100
flash_type: 0
Net:   MAC0 addr:38:94:ed:30:f1:2f
PHY ID1: 0x4d
PHY ID2: 0xd0b2
ipq40xx_ess_sw_init done
eth0
Hit any key to stop autoboot:  0
Saving Environment to NAND...
Erasing Nand...
Erasing at 0xef000 -- 100% complete.
Writing to Nand... done
Boot count=2
Creating 1 MTD partitions on "nand1":
0x000003800000-0x000007000000 : "mtd=0"
UBI: attaching mtd2 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    126976 bytes
UBI: smallest flash I/O unit:    2048
UBI: VID header offset:          2048 (aligned 2048)
UBI: data offset:                4096
UBI: attached mtd2 to ubi0
UBI: MTD device name:            "mtd=0"
UBI: MTD device size:            56 MiB
UBI: number of good PEBs:        448
UBI: number of bad PEBs:         0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     2
UBI: available PEBs:             275
UBI: total number of reserved PEBs: 173
UBI: number of PEBs reserved for bad PEB handling: 4
UBI: max/mean erase counter: 1/0
Read 0 bytes from volume kernel to 84000000
No size specified -> Using max size (4063232)
## Booting kernel from FIT Image at 84000000 ...
   Using 'config@5' configuration
   Trying 'kernel@1' kernel subimage
     Description:  ARM OpenWrt Linux-3.14.77
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x840000e4
     Data Size:    3617479 Bytes = 3.4 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x80208000
     Entry Point:  0x80208000
     Hash algo:    crc32
     Hash value:   8a2dfbd8
     Hash algo:    sha1
     Hash value:   5d40959115bfd5151422e978df5f5cbbbe3272d3
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Flattened Device Tree from FIT Image at 84000000
   Using 'config@5' configuration
   Trying 'fdt@5' FDT blob subimage
     Description:  ARM OpenWrt qcom-ipq40xx-ap.dkxx device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x8439b084
     Data Size:    34510 Bytes = 33.7 KiB
     Architecture: ARM
     Hash algo:    crc32
     Hash value:   1a439836
     Hash algo:    sha1
     Hash value:   5a6ffece1cc7084b8b630205173d5f7660d992f6
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x8439b084
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 86ff4000, end 86fff6cd ... OK
Using machid 0x8010100 from environment

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 3.14.77-V9.0.0.21 (root@willywonka) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.01 r43761) ) #3 SMP PREEMPT Mon Jul 20 12:42:22 GMT 2020
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: Qualcomm Technologies, Inc. IPQ40xx/AP-DK01.1-C2
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] PERCPU: Embedded 7 pages/cpu @cfdca000 s8000 r8192 d12480 u32768
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 63744
[    0.000000] Kernel command line: WAC510 ubi.mtd=rootfs_1 root=mtd:ubi_rootfs rootfstype=squashfs mtdparts=spi0.1:56m(rootfs),56m(rootfs_1),15m(var_config),768k(Oops_log) rootwait clk_ignore_unused
[    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: 245384K/257024K available (5284K kernel code, 411K rwdata, 1824K rodata, 191K init, 529K bss, 11640K reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xd0800000 - 0xff000000   ( 744 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 - 0xc09f1220   (8101 kB)
[    0.000000]       .init : 0xc0a00000 - 0xc0a2ff40   ( 192 kB)
[    0.000000]       .data : 0xc0b00000 - 0xc0b66dc8   ( 412 kB)
[    0.000000]        .bss : 0xc0b66dc8 - 0xc0beb5c0   ( 530 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] Architected cp15 timer(s) running at 48.00MHz (virt).
[    0.000009] sched_clock: 56 bits at 48MHz, resolution 20ns, wraps every 2863311552512ns
[    0.000019] Switching to timer-based delay loop
[    0.000216] Calibrating delay loop (skipped), value calculated using timer frequency.. 96.00 BogoMIPS (lpj=480000)
[    0.000234] pid_max: default: 32768 minimum: 301
[    0.000488] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000502] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.010797] CPU: Testing write buffer coherency: ok
[    0.011172] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.011248] Setting up static identity map for 0x8030aed0 - 0x8030af28
[    0.090628] CPU1: Booted secondary processor
[    0.090674] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.110593] CPU2: Booted secondary processor
[    0.110627] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.130632] CPU3: Booted secondary processor
[    0.130666] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.130803] Brought up 4 CPUs
[    0.130846] SMP: Total of 4 processors activated (384.00 BogoMIPS).
[    0.130855] CPU: All CPU(s) started in SVC mode.
[    0.141281] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.141685] pinctrl core: initialized pinctrl subsystem
[    0.142113] regulator-dummy: no parameters
[    0.142775] NET: Registered protocol family 16
[    0.144364] DMA: preallocated 2048 KiB pool for atomic coherent allocations
[    0.145006] cpuidle: using governor ladder
[    0.145020] cpuidle: using governor menu
[    0.155882] <CORE> glink_init: unable to create log context
[    0.156470] sps:sps is ready.
[    0.162392] bio: create slab <bio-0> at 0
[    0.164765] SCSI subsystem initialized
[    0.165632] msm_bus_fabric_init_driver
[    0.165798] msm_bus_device 580000.ad-hoc-bus: Util-fact is missing, default to 100
[    0.165815] msm_bus_device 580000.ad-hoc-bus: Vrail-comp is missing, default to 100
[    0.165834] msm_bus_device 580000.ad-hoc-bus: Failed to get bus clk for bus4096 ctx1
[    0.165878] msm_bus_device 580000.ad-hoc-bus: Util-fact is missing, default to 100
[    0.165892] msm_bus_device 580000.ad-hoc-bus: Vrail-comp is missing, default to 100
[    0.165909] msm_bus_device 580000.ad-hoc-bus: Failed to get bus clk for bus1024 ctx1
[    0.191416] Advanced Linux Sound Architecture Driver Initialized.
[    0.192469] Switched to clocksource arch_sys_counter
[    0.194266] NET: Registered protocol family 2
[    0.195605] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    0.195653] TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
[    0.195702] TCP: Hash tables configured (established 2048 bind 2048)
[    0.195759] TCP: reno registered
[    0.195779] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.195813] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.196154] NET: Registered protocol family 1
[    0.196780]
[    0.196780] Version Rollback Feature Disabled
[    0.197311] Proc : LED control created !!
[    0.197324] WAC5xx: saved_command_line : WAC510 ubi.mtd=rootfs_1 root=mtd:ubi_rootfs rootfstype=squashfs mtdparts=spi0.1:56m(rootfs),56m(rootfs_1),15m(var_config),768k(Oops_log) rootwait clk_ignore_unused
[    0.197340] WAC5xx: Product is WAC510
[    0.197354] WAC5xx: shipping mode
[    0.197363] WAC5xx: platform_gpio_init: Not an WAC505 product !!!
[    0.198285] WAC5xx: platform_gpio_init: shipping mode GPIO request for WAC510
[    0.198297] WAC5xx: platform_gpio_init: sw reset mode GPIO request WAC510 !!!
[    0.198566] WAC5xx: rst_button_init: SW reset GPIO->63
[    0.198718] WAC5xx: rst_button_init success
[    0.198730] WAC5xx: platform_gpio_init : GPIO platform init successful!!!
[    0.199883] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.209061] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.209079] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.210047] msgmni has been set to 479
[    0.211452] Key type asymmetric registered
[    0.211468] Asymmetric key parser 'x509' registered
[    0.211513] io scheduler noop registered
[    0.211524] io scheduler deadline registered (default)
[    0.213031] tcsr 194b000.tcsr: setting usb hs phy mode select = e700e7
[    0.213098] tcsr 1953000.ess_tcsr: setting ess interface select = 0
[    0.213170] tcsr 1949000.tcsr: setting wifi_glb_cfg = 41000000
[    0.213237] tcsr 1957000.tcsr: setting wifi_noc_memtype_m0_m2 = 2222222
[    0.214337] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.215407] msm_serial_hsl_probe: detected port #0 (ttyMSM0)
[    0.215448] msm_serial_hsl_probe: Bus scaling is disabled
[    0.215601] 78af000.serial: ttyMSM0 at MMIO 0x78af000 (irq = 139, base_baud = 115200) is a MSM
[    0.215695] msm_hsl_console_setup: console setup on port #0
[    0.837270] console [ttyMSM0] enabled
[    0.841314] msm_serial_hsl_init: driver initialized
[    0.846195] msm_serial_hs module loaded
[    0.849922] qca_serial_hs module loaded
[    0.854687] brd: module loaded
[    0.859681] sps: BAM device 0x07884000 is not registered yet.
[    0.864430] sps:BAM 0x07884000 is registered.
[    0.868774] sps:BAM 0x07884000 (va:0xd0b40000) enabled: ver:0x19, number of pipes:12
[    0.876912] m25p80 spi0.0: found s25fl016k, expected n25q128a11
[    0.882374] m25p80 spi0.0: s25fl016k (2048 Kbytes)
[    0.887214] 9 ofpart partitions found on MTD device spi0.0
[    0.892623] Creating 9 MTD partitions on "spi0.0":
[    0.897388] 0x000000000000-0x000000040000 : "0:SBL1"
[    0.903512] 0x000000040000-0x000000060000 : "0:MIBIB"
[    0.908627] 0x000000060000-0x0000000c0000 : "0:QSEE"
[    0.913704] 0x0000000c0000-0x0000000d0000 : "0:CDT"
[    0.918650] 0x0000000d0000-0x0000000e0000 : "0:DDRPARAMS"
[    0.924202] 0x0000000e0000-0x0000000f0000 : "0:APPSBLENV"
[    0.929643] 0x0000000f0000-0x0000001e0000 : "0:APPSBL"
[    0.934667] 0x0000001e0000-0x0000001f0000 : "0:MANUDATA"
[    0.939959] 0x0000001f0000-0x000000200000 : "0:ART"
[    0.956697] libphy: ipq40xx_mdio: probed
[    0.963120] ipq40xx-mdio 90000.mdio: ipq40xx-mdio driver was registered
[    0.968758] tun: Universal TUN/TAP device driver, 1.6
[    0.973758] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    0.980024] i2c /dev entries driver
[    0.985439] sdhci: Secure Digital Host Controller Interface driver
[    0.990587] sdhci: Copyright(c) Pierre Ossman
[    0.994952] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.003868] nand: device found, Manufacturer ID: 0xef, Chip ID: 0xaa
[    1.009188] nand: Winbond W25N01GV 128MiB 3.3V
[    1.013652] nand: 128MiB, SLC, page size: 2048, OOB size: 64
[    1.019267] Scanning device for bad blocks
[    1.268799] random: nonblocking pool is initialized
[    1.871742] 4 cmdlinepart partitions found on MTD device spi0.1
[    1.876648] Creating 4 MTD partitions on "spi0.1":
[    1.881420] 0x000000000000-0x000003800000 : "rootfs"
[    1.887518] mtd: device 9 (rootfs) set to be root filesystem
[    1.893557] mtdsplit: no squashfs found in "rootfs"
[    1.897403] mtdsplit: no squashfs found in "spi0.1"
[    1.902268] 0x000003800000-0x000007000000 : "rootfs_1"
[    1.908497] 0x000007000000-0x000007f00000 : "var_config"
[    1.913826] 0x000007f00000-0x000007fc0000 : "Oops_log"
[    2.004828] mtdoops: Attached to MTD device 12
[    2.011924] nf_conntrack version 0.5.0 (3834 buckets, 15336 max)
[    2.017773] ip_tables: (C) 2000-2006 Netfilter Core Team
[    2.022318] TCP: cubic registered
[    2.026147] NET: Registered protocol family 10
[    2.031028] NET: Registered protocol family 17
[    2.034600] Bridge firewalling registered
[    2.038442] bridge_nlevent_init: Initializing Bridge HTTP redirect event mechanism
[    2.046092] br: HTTP redirect disabled
[    2.049720] 8021q: 802.1Q VLAN Support v1.8
[    2.054098] Registering SWP/SWPB emulation handler
[    2.059749] regulator-dummy: disabling
[    2.062952] UBI: attaching mtd10 to ubi0
[    3.675965] UBI: scanning is finished
[    3.720323] UBI: attached mtd10 (name "rootfs_1", size 56 MiB) to ubi0
[    3.725853] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    3.732606] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    3.739273] UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
[    3.746145] UBI: good PEBs: 448, bad PEBs: 0, corrupted PEBs: 0
[    3.752034] UBI: user volume: 2, internal volumes: 1, max. volumes count: 128
[    3.759168] UBI: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 1198823755
[    3.768196] UBI: available PEBs: 259, total reserved PEBs: 189, PEBs reserved for bad PEB handling: 20
[    3.777503] UBI: background thread "ubi_bgt0d" started, PID 71
[    3.779690] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[    3.783164] clk: Not disabling unused clocks
[    3.783169] ALSA device list:
[    3.783171]   No soundcards found.
[    3.813162] VFS: Mounted root (squashfs filesystem) readonly on device 31:14.
[    3.819618] Freeing unused kernel memory: 188K (c0a00000 - c0a2f000)
Tue Mar  3 00:00:00 UTC 2020

Mounting etc to ramfs..
(IPQ40xx) # printenv
baudrate=115200
boot_cnt=3
bootcmd=bootipq
bootdelay=2
bootpart=3800000
delenv=sf probe && sf erase 0x000e0000 +0x10000
ethact=eth0
fdt_high=0x87000000
fileaddr=84000000
filesize=90E15C
flash_type=0
fw_upgrade=0
install_cal_to_end_of_nor=sf probe && sf read 0x84000000 0x170000 0x10000 && sf erase 0x1f0000 +0x10000 && sf write 0x84000000 0x1f0000 0x10000
ipaddr=192.168.1.11
machid=8010100
nand_erasesize=20000
nand_oobsize=40
nand_writesize=800
primary=3800000
proceed_upgrade=0
product_id=WAC510
secondary=0
serverip=192.168.1.15
show_cal_at_end_of_nor=sf probe && sf read 0x84000000 0x1f0000 0x10000 && md.b 0x84001000 0x40
stderr=serial
stdin=serial
stdout=serial

Environment size: 724/65532 bytes
1 Like

You can use sysupgrade for first flash yet as ubi volumes are different.
Use ubiformat

1 Like