Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#3750 - [21.02.0-rc1] ath79 UniFI uap-pro fails to find rootfs (bricked) using factory tftprecovery #8845

Closed
openwrt-bot opened this issue Apr 22, 2021 · 9 comments
Labels

Comments

@openwrt-bot
Copy link

walterav1984:

Device Ubiquiti UniFi AP Pro: https://openwrt.org/toh/hwdata/ubiquiti/ubiquiti_unifi_ap_pro

Cross flashing from ar71xx [19.07.7] to ath79 [21.02.0-rc1] (webinterface or cli) without keeping config/settings leads to a soft brick (tftp-recoverable)!
a1de9ee5aad1c768d8cdd2a396e3c1967c2b33084b73e121a45bb0be7ad2d250 openwrt-21.02.0-rc1-ath79-generic-ubnt_unifi-ap-pro-squashfs-sysupgrade.bin

Also flashing/recovering the OpenWrt "factory" ath79 [21.02.0-rc1] image via tftp still bricks it the same way (see log):
af4de7dc5ae2b7d243b8d567cde6808cde479d21331a9ba05d7620b0afa960ee openwrt-21.02.0-rc1-ath79-generic-ubnt_unifi-ap-pro-squashfs-factory.bin

Recovering via tftp to [19.07.7] ar71xx OpenWrt factory image fixes the device again:
d6d8dee5dca7363e3400f002b9f3bc30728fd23a5281417ff52aa6c465320a5a openwrt-19.07.7-ar71xx-generic-ubnt-uap-pro-squashfs-factory.bin

Serial LOG 21.02.0-rc1 broken:
U-Boot unifi-v1.6.15.278-g4ebbbcff (Mar 5 2018 - 23:40:54)

DRAM: 128 MB
Base:0x80000000, Top:0x88000000, Res logbuf:0xa7ffb000, log_magic:0xf0127109 kseg: 0xa0000000
Flash: 16 MB
PCIe WLAN Module found (tries: 1).
Net: eth0: 44:d9:e7:XX:YY:ZZ
eth0
Setting 0xb8116290 to 0x20402d0f
Board: Copyright Ubiquiti Networks Inc. 2014
Hit any key to stop autoboot: 0
Board: Ubiquiti Networks AR9344 board (e507-35.2123.0030.0030)
0. Name = u-boot, offset = 0, start_addr=9f000000, size=262144,start_sector=0, end_sector=3

  1. Name = u-boot-env, offset = 40000, start_addr=9f040000, size=65536,start_sector=4, end_sector=4
  2. Name = jffs2, offset = 50000, start_addr=9f050000, size=16121856,start_sector=5, end_sector=250
  3. Name = cfg, offset = fb0000, start_addr=9ffb0000, size=262144,start_sector=251, end_sector=254
  4. Name = EEPROM, offset = ff0000, start_addr=9fff0000, size=65536,start_sector=255, end_sector=255
    UBNT application initialized
    Scanning JFFS2 FS: . done.
    find_inode failed for name=kernel1
    ls: Failed to scan jffs2 file structure

Booting image at 81000000 ...

Image Name: MIPS OpenWrt Linux-5.4.111
Created: 2021-04-18 10:06:57 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 2033665 Bytes = 1.9 MB
Load Address: 80060000
Entry Point: 80060000
Verifying Checksum at 0x81000040 ...OK
Uncompressing Kernel Image ... OK

Starting kernel ...

[ 0.000000] Linux version 5.4.111 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16046-59980f7aaf)) #0 Sun Apr 18 10:06:57 21
[ 0.000000] printk: bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[ 0.000000] MIPS: machine is Ubiquiti UniFi AP Pro
[ 0.000000] SoC: Atheros AR9344 rev 3
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000000000000-0x0000000007ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000007ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 32480
[ 0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[ 0.000000] Writing ErrCtl register=00000000
[ 0.000000] Readback ErrCtl register=00000000
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 122248K/131072K available (5216K kernel code, 190K rwdata, 684K rodata, 1196K init, 205K bss, 8824K reserved, 0K cma)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS: 51
[ 0.000000] random: get_random_bytes called from 0x80655984 with crng_init=0
[ 0.000000] CPU clock: 560.000 MHz
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6825930166 ns
[ 0.000009] sched_clock: 32 bits at 280MHz, resolution 3ns, wraps every 7669584382ns
[ 0.008319] Calibrating delay loop... 278.78 BogoMIPS (lpj=557568)
[ 0.050865] pid_max: default: 32768 minimum: 301
[ 0.055947] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.063741] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.076719] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.087139] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[ 0.094503] pinctrl core: initialized pinctrl subsystem
[ 0.102692] NET: Registered protocol family 16
[ 0.132387] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[ 0.146500] clocksource: Switched to clocksource MIPS
[ 0.153196] NET: Registered protocol family 2
[ 0.158931] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[ 0.167900] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.176073] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.183591] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.190533] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.197517] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.205280] NET: Registered protocol family 1
[ 0.209990] PCI: CLS 0 bytes, default 32
[ 0.218111] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[ 0.232602] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.238860] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.263364] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[ 0.275433] pinctrl-single 1804002c.pinmux: 544 pins, size 68
[ 0.282639] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[ 0.292023] printk: console [ttyS0] disabled
[ 0.296682] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 9, base_baud = 2500000) is a 16550A
[ 0.305892] printk: console [ttyS0] enabled
[ 0.305892] printk: console [ttyS0] enabled
[ 0.314798] printk: bootconsole [early0] disabled
[ 0.314798] printk: bootconsole [early0] disabled
[ 0.334877] spi-nor spi0.0: mx25l12805d (16384 Kbytes)
[ 0.340193] 5 fixed-partitions partitions found on MTD device spi0.0
[ 0.346656] Creating 5 MTD partitions on "spi0.0":
[ 0.351549] 0x000000000000-0x000000040000 : "u-boot"
[ 0.357635] 0x000000040000-0x000000050000 : "u-boot-env"
[ 0.364056] 0x000000050000-0x000000fb0000 : "firmware"
[ 0.370312] 0x000000fb0000-0x000000ff0000 : "cfg"
[ 0.376132] 0x000000ff0000-0x000001000000 : "art"
[ 0.383994] libphy: Fixed MDIO Bus: probed
[ 0.728453] libphy: ag71xx_mdio: probed
[ 0.735659] switch0: Atheros AR8327 rev. 4 switch registered on mdio.0
[ 1.122492] random: fast init done
[ 1.320642] ag71xx 19000000.eth: connected to PHY at mdio.0:00 [uid=004dd034, driver=Atheros AR8216/AR8236/AR8316]
[ 1.331825] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: rgmii
[ 1.338540] i2c /dev entries driver
[ 1.344501] NET: Registered protocol family 10
[ 1.354587] Segment Routing with IPv6
[ 1.358450] NET: Registered protocol family 17
[ 1.363080] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you ne.
[ 1.376238] 8021q: 802.1Q VLAN Support v1.8
[ 1.381516] PCI host bridge /ahb/pcie-controller@180c0000 ranges:
[ 1.387782] MEM 0x0000000010000000..0x0000000013ffffff
[ 1.393105] IO 0x0000000000000000..0x0000000000000000
[ 1.398625] PCI host bridge to bus 0000:00
[ 1.402832] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[ 1.409817] pci_bus 0000:00: root bus resource [io 0x0000]
[ 1.415485] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[ 1.422382] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[ 1.430470] pci 0000:00:00.0: [168c:0033] type 00 class 0x028000
[ 1.436633] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x0001ffff 64bit]
[ 1.443578] pci 0000:00:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[ 1.450463] pci 0000:00:00.0: supports D1
[ 1.454550] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[ 1.461724] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[ 1.468496] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1001ffff 64bit]
[ 1.475949] pci 0000:00:00.0: BAR 6: assigned [mem 0x10020000-0x1002ffff pref]
[ 1.484289] hctosys: unable to open rtc device (rtc0)
[ 1.490612] /dev/root: Can't open blockdev
[ 1.494814] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[ 1.502415] Please append a correct "root=" boot option; here are the available partitions:
[ 1.510899] 1f00 256 mtdblock0
[ 1.510903] (driver?)
[ 1.517545] 1f01 64 mtdblock1
[ 1.517548] (driver?)
[ 1.524197] 1f02 15744 mtdblock2
[ 1.524200] (driver?)
[ 1.530850] 1f03 256 mtdblock3
[ 1.530852] (driver?)
[ 1.537494] 1f04 64 mtdblock4
[ 1.537496] (driver?)
[ 1.544145] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 1.552524] Rebooting in 1 seconds..

Serial Log 19.07.7 OK:

U-Boot unifi-v1.6.15.278-g4ebbbcff (Mar 5 2018 - 23:40:54)

DRAM: 128 MB
Base:0x80000000, Top:0x88000000, Res logbuf:0xa7ffb000, log_magic:0x8fb30028 kseg: 0xa0000000
Flash: 16 MB
PCIe WLAN Module found (tries: 1).
Net: eth0: 44:d9:e7:xx:yy:zz
eth0
Setting 0xb8116290 to 0x20402d0f
Board: Copyright Ubiquiti Networks Inc. 2014
Hit any key to stop autoboot: 0
Board: Ubiquiti Networks AR9344 board (e507-35.2123.0030.0030)
0. Name = u-boot, offset = 0, start_addr=9f000000, size=262144,start_sector=0, end_sector=3

  1. Name = u-boot-env, offset = 40000, start_addr=9f040000, size=65536,start_sector=4, end_sector=4
  2. Name = jffs2, offset = 50000, start_addr=9f050000, size=16121856,start_sector=5, end_sector=250
  3. Name = cfg, offset = fb0000, start_addr=9ffb0000, size=262144,start_sector=251, end_sector=254
  4. Name = EEPROM, offset = ff0000, start_addr=9fff0000, size=65536,start_sector=255, end_sector=255
    UBNT application initialized
    Scanning JFFS2 FS: . done.
    find_inode failed for name=kernel1
    ls: Failed to scan jffs2 file structure

Booting image at 81000000 ...

Image Name: MIPS OpenWrt Linux-4.14.221
Created: 2021-02-15 15:22:37 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 1589545 Bytes = 1.5 MB
Load Address: 80060000
Entry Point: 80060000
Verifying Checksum at 0x81000040 ...OK
Uncompressing Kernel Image ... OK

Starting kernel ...

[ 0.000000] Linux version 4.14.221 (builder@buildhost) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r11306-c4a6851c72)) #0 Mon Feb 15 15:22:37 1
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[ 0.000000] SoC: Atheros AR9344 rev 3
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 08000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000000000000-0x0000000007ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000007ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[ 0.000000] random: get_random_bytes called from 0x804f0740 with crng_init=0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 32512
[ 0.000000] Kernel command line: board=UAP-PRO mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,2048k(kernel),13696k(rootfs),256k(cfg)rd
[ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Writing ErrCtl register=00000000
[ 0.000000] Readback ErrCtl register=00000000
[ 0.000000] Memory: 124292K/131072K available (3955K kernel code, 192K rwdata, 516K rodata, 320K init, 212K bss, 6780K reserved, 0K cma-)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS: 51
[ 0.000000] Clocks: CPU:560.000MHz, DDR:450.000MHz, AHB:225.000MHz, Ref:40.000MHz
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6825930166 ns
[ 0.000009] sched_clock: 32 bits at 280MHz, resolution 3ns, wraps every 7669584382ns
[ 0.008323] Calibrating delay loop... 278.93 BogoMIPS (lpj=1394688)
[ 0.084943] pid_max: default: 32768 minimum: 301
[ 0.090067] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.097127] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.106814] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.117328] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.124962] NET: Registered protocol family 16
[ 0.131090] MIPS: machine is Ubiquiti UniFi AP Pro
[ 0.139407] registering PCI controller with io_map_base unset
[ 0.397193] PCI host bridge to bus 0000:00
[ 0.401564] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[ 0.408926] pci_bus 0000:00: root bus resource [io 0x0000]
[ 0.414852] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[ 0.422090] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[ 0.430571] pci 0000:00:00.0: invalid calibration data
[ 0.436482] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1001ffff 64bit]
[ 0.444279] pci 0000:00:00.0: BAR 6: assigned [mem 0x10020000-0x1002ffff pref]
[ 0.455282] clocksource: Switched to clocksource MIPS
[ 0.461686] NET: Registered protocol family 2
[ 0.467254] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.474680] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.481501] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.488404] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.494626] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.501579] NET: Registered protocol family 1
[ 0.509173] Crashlog allocated RAM at address 0x3f00000
[ 0.516081] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[ 0.528037] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.534244] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.554282] io scheduler noop registered
[ 0.558511] io scheduler deadline registered (default)
[ 0.564408] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[ 0.573299] console [ttyS0] disabled
[ 0.597207] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 2500000) is a 16550A
[ 0.606405] console [ttyS0] enabled
[ 0.606405] console [ttyS0] enabled
[ 0.613814] bootconsole [early0] disabled
[ 0.613814] bootconsole [early0] disabled
[ 0.628965] m25p80 spi0.0: found mx25l12805d, expected m25p80
[ 0.635597] m25p80 spi0.0: mx25l12805d (16384 Kbytes)
[ 0.640761] 7 cmdlinepart partitions found on MTD device spi0.0
[ 0.646808] Creating 7 MTD partitions on "spi0.0":
[ 0.651675] 0x000000000000-0x000000040000 : "u-boot"
[ 0.658416] 0x000000040000-0x000000050000 : "u-boot-env"
[ 0.665087] 0x000000050000-0x000000250000 : "kernel"
[ 0.672154] 0x000000250000-0x000000fb0000 : "rootfs"
[ 0.677989] mtd: device 3 (rootfs) set to be root filesystem
[ 0.683780] 1 squashfs-split partitions found on MTD device rootfs
[ 0.690118] 0x0000004b0000-0x000000fb0000 : "rootfs_data"
[ 0.697764] 0x000000fb0000-0x000000ff0000 : "cfg"
[ 0.703828] 0x000000ff0000-0x000001000000 : "EEPROM"
[ 0.710890] 0x000000050000-0x000000fb0000 : "firmware"
[ 0.718354] libphy: Fixed MDIO Bus: probed
[ 0.735630] switch0: Atheros AR8327 rev. 4 switch registered on ag71xx-mdio.0
[ 1.408859] libphy: ag71xx_mdio: probed
[ 2.036688] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd034, driver=Atheros AR8216/AR8236/AR8316]
[ 2.048049] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: rgmii
[ 2.056118] NET: Registered protocol family 10
[ 2.064919] Segment Routing with IPv6
[ 2.068815] NET: Registered protocol family 17
[ 2.073376] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you ne.
[ 2.087067] 8021q: 802.1Q VLAN Support v1.8
[ 2.092927] hctosys: unable to open rtc device (rtc0)
[ 2.102592] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[ 2.111264] Freeing unused kernel memory: 320K
[ 2.115805] This architecture does not have kernel memory protection.
[ 2.595296] random: fast init done
[ 2.841850] init: Console is alive
[ 2.845602] init: - watchdog -
[ 3.811487] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[ 3.871242] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[ 3.879817] init: - preinit -
[ 4.504183] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 4.532722] random: procd: uninitialized urandom read (4 bytes read)
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[ 5.566550] eth0: link up (1000Mbps/Full duplex)
[ 5.571320] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 7.846950] jffs2: notice: (427) jffs2_build_xattr_subsystem: complete building xattr subsystem, 4 of xdatum (0 unchecked, 2 orphan) and.
[ 7.863969] mount_root: switching to jffs2 overlay
[ 7.891384] overlayfs: upper fs does not support tmpfile.
[ 7.903119] urandom-seed: Seeding with /etc/urandom.seed
[ 8.089288] eth0: link down
[ 8.103972] procd: - early -
[ 8.107756] procd: - watchdog -
[ 8.752875] procd: - watchdog -
[ 8.756485] procd: - ubus -
[ 8.866058] random: ubusd: uninitialized urandom read (4 bytes read)
[ 8.874248] random: ubusd: uninitialized urandom read (4 bytes read)
[ 8.881228] random: ubusd: uninitialized urandom read (4 bytes read)
[ 8.888818] procd: - init -
Please press Enter to activate this console.
[ 9.671603] kmodloader: loading kernel modules from /etc/modules.d/*
[ 9.801100] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 9.823464] Loading modules backported from Linux version v4.19.161-0-gdaefdc9eb24b
[ 9.831305] Backport generated by backports.git v4.19.161-1-0-g4bb568fe
[ 9.857645] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 9.883373] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[ 10.007296] xt_time: kernel timezone is -0000
[ 10.117993] PPP generic driver version 2.4.2
[ 10.135135] urngd: v1.0.2 started.
[ 10.139557] NET: Registered protocol family 24
[ 10.219311] ieee80211 phy0: Atheros AR9340 Rev:3 mem=0xb8100000, irq=47
[ 10.226284] pci 0000:00:00.0: using irq 40 for pin 1
[ 10.231344] PCI: Enabling device 0000:00:00.0 (0000 -> 0002)
[ 10.256389] ieee80211 phy1: Atheros AR9300 Rev:4 mem=0xb0000000, irq=40
[ 10.435674] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 10.696838] random: crng init done
[ 10.700307] random: 6 urandom warning(s) missed due to ratelimiting
[ 25.019974] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 25.027301] eth0: link up (1000Mbps/Full duplex)
[ 25.031999] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 25.057283] br-lan: port 1(eth0.1) entered blocking state
[ 25.062775] br-lan: port 1(eth0.1) entered disabled state
[ 25.068751] device eth0.1 entered promiscuous mode
[ 25.073618] device eth0 entered promiscuous mode
[ 25.095649] br-lan: port 1(eth0.1) entered blocking state
[ 25.101143] br-lan: port 1(eth0.1) entered forwarding state
[ 25.107139] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[ 26.045698] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[ 27.268268] ath: EEPROM regdomain: 0x8210
[ 27.272342] ath: EEPROM indicates we should expect a country code
[ 27.278577] ath: doing EEPROM country->regdmn map search
[ 27.283968] ath: country maps to regdmn code: 0x37
[ 27.288843] ath: Country alpha2 being used: NL
[ 27.293346] ath: Regpair used: 0x37
[ 27.296915] ath: regdomain 0x8210 dynamically updated by user
[ 27.302835] ath: EEPROM regdomain: 0x8210
[ 27.306925] ath: EEPROM indicates we should expect a country code
[ 27.313104] ath: doing EEPROM country->regdmn map search
[ 27.318507] ath: country maps to regdmn code: 0x37
[ 27.323362] ath: Country alpha2 being used: NL
[ 27.327885] ath: Regpair used: 0x37
[ 27.331425] ath: regdomain 0x8210 dynamically updated by user
[ 29.343913] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 29.429205] br-lan: port 2(wlan0) entered blocking state
[ 29.434606] br-lan: port 2(wlan0) entered disabled state
[ 29.440367] device wlan0 entered promiscuous mode
[ 29.658886] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
[ 29.739222] br-lan: port 3(wlan1) entered blocking state
[ 29.744733] br-lan: port 3(wlan1) entered disabled state
[ 29.750579] device wlan1 entered promiscuous mode
[ 29.755627] br-lan: port 3(wlan1) entered blocking state
[ 29.761024] br-lan: port 3(wlan1) entered forwarding state
[ 30.256921] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready

Boot loader info:
U-Boot unifi-v1.6.15.278-g4ebbbcff (Mar 5 2018 - 23:40:54)

DRAM: 128 MB
Base:0x80000000, Top:0x88000000, Res logbuf:0xa7ffb000, log_magic:0xf0127109 kseg: 0xa0000000
Flash: 16 MB
PCIe WLAN Module found (tries: 1).
Net: eth0: 44:d9:e7:xx:yy:zz
eth0
Setting 0xb8116290 to 0x20402d0f
Board: Copyright Ubiquiti Networks Inc. 2014
Hit any key to stop autoboot: 0
ar7240> printenv
bootargs=console=tty0 panic=3
bootcmd=run ubntappinit ubntboot
bootdelay=1
ipaddr=192.168.1.20
serverip=192.168.1.254
ubntappinit=go ${ubntaddr} uappinit;go ${ubntaddr} ureset_button;urescue;go ${ubntaddr} uwrite
mtdparts=mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),15744k(jffs2),256k(cfg),64k(EEPROM)
ubntbootaddr=0x81000000
ubntboot=ubntfsboot ${ubntbootaddr} jffs2 kernel
stdin=serial
stdout=serial
stderr=serial
ethact=eth0
ubntaddr=80200020

Environment size: 449/65532 bytes
ar7240> mtdparts

device nor0 , # parts = 5
#: name size offset mask_flags
0: u-boot 0x00040000 0x00000000 0
1: u-boot-env 0x00010000 0x00040000 0
2: jffs2 0x00f60000 0x00050000 0
3: cfg 0x00040000 0x00fb0000 0
4: EEPROM 0x00010000 0x00ff0000 0

active partition: nor0,0 - (u-boot) 0x00040000 @ 0x00000000

defaults:
mtdids : nor0=ath-nor0
mtdparts: mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),15744k(jffs2),256k(cfg),64k(EEPROM)
ar7240>

ar7240> bdinfo
boot_params = 0x87F4BFB0
memstart = 0x80000000
memsize = 0x08000000
flashstart = 0x9F000000
flashsize = 0x01000000
flashoffset = 0x000321A8
ethaddr = 00:00:00:00:00:00
ip_addr = 192.168.1.20
baudrate = 115200 bps
ar7240> coninfo
List of available devices:
serial 80000003 SIO stdin stdout stderr
ar7240> flinfo

Bank # 1: mx25l128 (Id: 0xc22018)
Size: 16 MB in 256 sectors
ar7240> fsinfo

filesystem type is JFFS2

Scanning JFFS2 FS: done.
Compression: NONE
frag count: 0
compressed sum: 0
uncompressed sum: 0
Compression: ZERO
frag count: 0
compressed sum: 0
uncompressed sum: 0
Compression: RTIME
frag count: 0
compressed sum: 0
uncompressed sum: 0
Compression: RUBINMIPS
frag count: 0
compressed sum: 0
uncompressed sum: 0
Compression: COPY
frag count: 0
compressed sum: 0
uncompressed sum: 0
Compression: DYNRUBIN
frag count: 0
compressed sum: 0
uncompressed sum: 0
Compression: ZLIB
frag count: 0
compressed sum: 0
uncompressed sum: 0
ar7240> iminfo

Checking Image at 81000000 ...

Bad Magic Number
ar7240> ls
Scanning JFFS2 FS: done.
ar7240> ls /
Scanning JFFS2 FS: done.
ar7240> md
Usage:
md - memory display

ar7240> pci
Scanning PCI devices on bus 0
BusDevFun VendorId DeviceId Device Class Sub-Class


00.00.00 0x168c 0x0033 Network controller 0x80
00.01.00 0x168c 0x0033 Network controller 0x80
00.02.00 0x168c 0x0033 Network controller 0x80
00.03.00 0x168c 0x0033 Network controller 0x80
00.04.00 0x168c 0x0033 Network controller 0x80
00.05.00 0x168c 0x0033 Network controller 0x80
00.06.00 0x168c 0x0033 Network controller 0x80
00.07.00 0x168c 0x0033 Network controller 0x80
00.08.00 0x168c 0x0033 Network controller 0x80
00.09.00 0x168c 0x0033 Network controller 0x80
00.0a.00 0x168c 0x0033 Network controller 0x80
00.0b.00 0x168c 0x0033 Network controller 0x80
00.0c.00 0x168c 0x0033 Network controller 0x80
00.0d.00 0x168c 0x0033 Network controller 0x80
00.0e.00 0x168c 0x0033 Network controller 0x80
00.0f.00 0x168c 0x0033 Network controller 0x80
00.10.00 0x168c 0x0033 Network controller 0x80
00.11.00 0x168c 0x0033 Network controller 0x80
00.12.00 0x168c 0x0033 Network controller 0x80
00.13.00 0x168c 0x0033 Network controller 0x80
00.14.00 0x168c 0x0033 Network controller 0x80
00.15.00 0x168c 0x0033 Network controller 0x80
00.16.00 0x168c 0x0033 Network controller 0x80
00.17.00 0x168c 0x0033 Network controller 0x80
00.18.00 0x168c 0x0033 Network controller 0x80
00.19.00 0x168c 0x0033 Network controller 0x80
00.1a.00 0x168c 0x0033 Network controller 0x80
00.1b.00 0x168c 0x0033 Network controller 0x80
00.1c.00 0x168c 0x0033 Network controller 0x80
00.1d.00 0x168c 0x0033 Network controller 0x80
00.1e.00 0x168c 0x0033 Network controller 0x80
00.1f.00 0x168c 0x0033 Network controller 0x80

@openwrt-bot
Copy link
Author

walterav1984:

The issue might be that the root device cannot be found because of different partition layout?

[ 1.490612] /dev/root: Can't open blockdev [ 1.494814] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6 [ 1.502415] Please append a correct "root=" boot option; here are the available partitions: [ 1.510899] 1f00 256 mtdblock0 [ 1.510903] (driver?) [ 1.517545] 1f01 64 mtdblock1 [ 1.517548] (driver?) [ 1.524197] 1f02 15744 mtdblock2 [ 1.524200] (driver?) [ 1.530850] 1f03 256 mtdblock3 [ 1.530852] (driver?) [ 1.537494] 1f04 64 mtdblock4 [ 1.537496] (driver?) [ 1.544145] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

Comparing 19.07.7 and 21.02.0-rc1 shows that earlier there were 7 mtd partitions instead of 5mtd partitions:

[ 0.628965] m25p80 spi0.0: found mx25l12805d, expected m25p80 [ 0.635597] m25p80 spi0.0: mx25l12805d (16384 Kbytes) [ 0.640761] 7 cmdlinepart partitions found on MTD device spi0.0 [ 0.646808] Creating 7 MTD partitions on "spi0.0": [ 0.651675] 0x000000000000-0x000000040000 : "u-boot" [ 0.658416] 0x000000040000-0x000000050000 : "u-boot-env" [ 0.665087] 0x000000050000-0x000000250000 : "kernel" [ 0.672154] 0x000000250000-0x000000fb0000 : "rootfs" [ 0.677989] mtd: device 3 (rootfs) set to be root filesystem [ 0.683780] 1 squashfs-split partitions found on MTD device rootfs [ 0.690118] 0x0000004b0000-0x000000fb0000 : "rootfs_data" [ 0.697764] 0x000000fb0000-0x000000ff0000 : "cfg" [ 0.703828] 0x000000ff0000-0x000001000000 : "EEPROM" [ 0.710890] 0x000000050000-0x000000fb0000 : "firmware" [ 0.334877] spi-nor spi0.0: mx25l12805d (16384 Kbytes) [ 0.340193] 5 fixed-partitions partitions found on MTD device spi0.0 [ 0.346656] Creating 5 MTD partitions on "spi0.0": [ 0.351549] 0x000000000000-0x000000040000 : "u-boot" [ 0.357635] 0x000000040000-0x000000050000 : "u-boot-env" [ 0.364056] 0x000000050000-0x000000fb0000 : "firmware" [ 0.370312] 0x000000fb0000-0x000000ff0000 : "cfg" [ 0.376132] 0x000000ff0000-0x000001000000 : "art"

@openwrt-bot
Copy link
Author

walterav1984:

This commit introduced the ath79 support:
b7da0d2#diff-eb701754294458d67afa7f1600b78474b9314ea90b581346152acbe1a1deb369

Since direct ar71xx to ath79 crossflash is not supported, it should be supported by tftp-recovery according to the at79 support commit. Which in this case is still broken.

The 'dts' file shows 5 compatible= "fixed-partitions" and 2 sub partitions inside the "firmware" partition with also the compatible= "fixed-partitions":
https://github.com/openwrt/openwrt/blob/master/target/linux/ath79/dts/ar9344_ubnt_unifi-ap-pro.dts

It is mentioned as a comment @line85 that the kernel size may increase, but does that mean you have to adjust/code the kernel/rootfs accordingly to match addresses manually since its listed compatible= "fixed-partitions"? Just doing some guesses here...

/* Can be resized w/o issues. * U-Boot can load kernel from the * entirety of the "firmware" partition space. */

Overtime the kernel increased in size from 19.07.7 to 21.02.0-rc1:

## Booting image at 81000000 ... Image Name: MIPS OpenWrt Linux-4.14.221 Created: 2021-02-15 15:22:37 UTC Image Type: MIPS Linux Kernel Image (lzma compressed) Data Size: 1589545 Bytes = 1.5 MB Load Address: 80060000 Entry Point: 80060000

Booting image at 81000000 ...

Image Name: MIPS OpenWrt Linux-5.4.111
Created: 2021-04-18 10:06:57 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 2033665 Bytes = 1.9 MB
Load Address: 80060000
Entry Point: 80060000

@openwrt-bot
Copy link
Author

bjonglez:

As you noticed, upgrading from ar71xx 19.07 to ath79 21.02 is not supported, I have edited the title accordingly.

@openwrt-bot
Copy link
Author

walterav1984:

Thanks for adding the correct 21.02 label to the ticket, and focusing the title on the only supported tftp install method which still is reported broken in this ticket.

Further investigations of bootlog shows that kernel arguments changed significantly between ar71xx to ath79 but maybe the .dts file partly replaced this?

#ar71xx 19.07.7 [ 0.000000] Kernel command line: board=UAP-PRO mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,2048k(kernel),13696k(rootfs),256k(cfg)rd

#ath79 21.02.0-rc1
[ 0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2

@openwrt-bot
Copy link
Author

apcameron:

This bug Impacts multiple devices. See my report at [[https://bugs.openwrt.org/index.php?do=details&task_id=3782|https://bugs.openwrt.org/index.php?do=details&task_id=3782]]

@openwrt-bot
Copy link
Author

walterav1984:

A possible fix from mpratt14 is open for testing:
#4143

@openwrt-bot
Copy link
Author

walterav1984:

A possible similar affected device TP-Link CPE210 v1 (no boot log):
https://bugs.openwrt.org/index.php?do=details&task_id=3778

@openwrt-bot
Copy link
Author

walterav1984:

The rootfs detection/boot/brick issue is fixed in current May 11 snapshot of 21.02:

ubnt_unifi-ap-pro-squashfs-sysupgrade.bin a470a40fb98a1e39dc5ac958cf0a3890992f415fd9faa3a19b3b8bdf98181eb1 6208.3 KB Tue May 11 21:02:39 2021

Thanks to this patch from Rafał Miłecki:
4b89b90

Also crossflash via webinterface of ar71xx to ath79 is now working.

@openwrt-bot
Copy link
Author

walterav1984:

Sysupgrade to 21.02.0-rc2 was succesful.

Please Close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant