Status of WAC510 port

So, the only way to flash OpenWRT is over a serial connection? Was hoping to save some time opening the case.

Thx

Got some time to give this a test.

I sent the initramfs-fit-uImage over tftpboot and it loads but I haven't tested anything.

Just tried from the booted initramfs image to flash the openwrt sysupgrade image, but it fails.

Sat Nov 21 07:17:38 UTC 2020 upgrade: Sending TERM to remaining processes ... hostapd wpa_supplicant netifd odhcpd uhttpd sh ubusd askfirst collectd sh urngd sh sle                                                    ep dnsmasq logd rpcd
Sat Nov 21 07:17:41 UTC 2020 upgrade: Sending KILL to remaining processes ...
Sat Nov 21 07:17:42 UTC 2020 upgrade: Performing system upgrade...
cannot find ubi mtd partition rootfs
libubi: error!: "/dev/" is not a character device
ubiupdatevol: error!: error while probing "/dev/"
              error 22 (Invalid argument)
tar: write error: Broken pipe
libubi: error!: "/dev/" is not a character device
ubiupdatevol: error!: error while probing "/dev/"
              error 22 (Invalid argument)
tar: write error: Broken pipe
sysupgrade successful
umount: can't unmount /dev: Resource busy
umount: can't unmount /tmp: Resource busy
umount: can't unmount /: Invalid argument
[

Also tried the openwrt from factory image, but that also fails:

killall: telnetd: no process killed
killall: ash: no process killed
Sat Nov 21 07:19:20 UTC 2020 upgrade: Sending TERM to remaining processes ... hostapd wpa_supplicant netifd odhcpd uhttpd ubusd askfirst c                           ollectd urngd dnsmasq ntpd logd rpcd
Sat Nov 21 07:19:23 UTC 2020 upgrade: Sending KILL to remaining processes ... ntpd
Sat Nov 21 07:19:25 UTC 2020 upgrade: Performing system upgrade...
tar: invalid tar magic
cannot find ubi mtd partition rootfs
ubiupdatevol: error!: file size must be specified if input is stdin
tar: invalid tar magic
sysupgrade successful
umount: can't unmount /dev: Resource busy
umount: can't unmount /tmp: Resource busy
umount: can't unmount /: Invalid argument
[

I'm probably doing something wrong so suggestions are welcome.

1 Like

@Lochnair @robimarko

Any ideas on how to permanently flash OpenWRT once I got the initramfs booting?

I think the problem is that there is no rootfs


 OpenWrt SNAPSHOT, r14946+44-36434f6436
 -----------------------------------------------------
=== 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:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00010000 "0:SBL1"
mtd1: 00020000 00010000 "0:MIBIB"
mtd2: 00060000 00010000 "0:QSEE"
mtd3: 00010000 00010000 "0:CDT"
mtd4: 00010000 00010000 "0:DDRPARAMS"
mtd5: 00010000 00010000 "0:APPSBLENV"
mtd6: 000f0000 00010000 "0:APPSBL"
mtd7: 00010000 00010000 "0:MANUDATA"
mtd8: 00010000 00010000 "0:ART"
mtd9: 08000000 00020000 "spi0.1"

In the DTS it says that flash should be filled by the bootloader. Not sure where it gets it from.

Edit: I see it's defined in uboot source.

mt29f@1 {
		status = "okay";
		compatible = "spi-nand";
		reg = <1>;
		spi-max-frequency = <24000000>;
		/* Auto filled by bootloader */
};

In original bootlog:

[    2.866902] 4 cmdlinepart partitions found on MTD device spi0.1
[    2.871813] Creating 4 MTD partitions on "spi0.1":
[    2.876570] 0x000000000000-0x000003800000 : "rootfs"
[    2.882610] mtd: device 9 (rootfs) set to be root filesystem
[    2.889419] mtdsplit: no squashfs found in "rootfs"
[    2.893300] mtdsplit: no squashfs found in "spi0.1"
[    2.898131] 0x000003800000-0x000007000000 : "rootfs_1"
[    2.904342] 0x000007000000-0x000007f00000 : "var_config"
[    2.909583] 0x000007f00000-0x000007fc0000 : "Oops_log"
1 Like

What command did you use to boot?

I used tftpboot to transfer the image and then bootm to run it.

Try to use bootipq instead of bootm. That adds the right bootargs and stuff.

But bootipq boots from flash and not transferred image in memory.

Ah right you can't specify on that one.

Relevant parts from U-boot code. Can try and add at least the mtdparts to your bootargs. Maybe ubi.mtd=rootfs as well.

       if (simple_strtol((getenv("primary")), NULL, 16) == 0) {
               spi_bootargs = "ubi.mtd=rootfs root=mtd:ubi_rootfs rootfstype=squashfs mtdparts=spi0.1:56m(rootfs),56m(rootfs_1),15m(var_config),768k(Oops_log)";
       } else {
               spi_bootargs = "ubi.mtd=rootfs_1 root=mtd:ubi_rootfs rootfstype=squashfs mtdparts=spi0.1:56m(rootfs),56m(rootfs_1),15m(var_config),768k(Oops_log)";
       }

Sorry, but I'm not too sure what I'm supposed to do?

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.