AeroHive AP121 doesn't boot after fresh install

Hi, I installed OpenWRT on AeroHive HiveAP 121. Following the tftp installation process using binary 19.07.6 release.

Once the firmware was done, the AP boots up but doesn't starts sucessfully the root filesystem:

Resetting...U-boot DB120
DRAM:  
sri
Wasp 1.2
wasp_ddr_initial_config(259): (32bit) ddr2 init
128 MB
Top of RAM usable for U-Boot at: 88000000
Reserving 324k for U-Boot at: 87fac000
Reserving 136k for malloc() at: 87f8a000
Reserving 44 Bytes for Board Info at: 87f89fd4
Reserving 36 Bytes for Global Data at: 87f89fb0
Reserving 128k for boot params() at: 87f69fb0
Stack Pointer at: 87f69f98
relocating and jumping to code in DRAM
Now running in RAM - U-Boot at: 0x87fac000
Flash:  1 MB
*** Warning - bad CRC, using default environment

ag934x_enet_initialize...
 wasp  reset mask:c03300 
WASP  ----> F1 PHY *
: cfg1 0xf cfg2 0x7114
eth0: 00:19:77:ff:00:00
F1Phy reg init 
ATHR_AUTONEG_ADVERT:1DE1
ATHR_1000BASET_CONTROL:200
ATHR_PHY_CONTROL:3100
ATHRSF1_PHY: Port 0, Neg Success
ATHRSF1_PHY: unit 0 phy addr 0 eth0 up

Atheros on-chip NAND FLash Controller Driver, Version 0.1 (c) 2010 Atheros Communications, Ltd.
Ath Nand ID[87ff4178]: 1d:00:f1:ad:1d
Hynix NAND 128MiB 3,3V 8-bit [128MB]

chip #0: First 0xa last 0xa sector size 0x10000                                                                                                                                                                                                                                                                   10
Hit the space bar to stop the autoboot process:  0 
Hit any key to interrupt boot from flash:  0 

Loading kernel from device 0: ath-nand (offset 0x800000) ... done
Loading rootfs from device 0: ath-nand (offset 0x1200000) ... done
   Uncompressing Kernel Image ... No initrd
## Transferring control to Linux (at address 80060000) ...
commandline console=ttyS0,9600 root=01:00 init=/sbin/init  console=ttyS0,9600 rd_start=0x80500000 rd_size=0x01900000
## Giving linux memsize in bytes, 134217728
[    0.000000] Linux version 4.14.215 (builder@buildhost) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r11278-8055e38794)) #0 Tue Jan 19 13:10:02 2021
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] SoC: Atheros AR9344 rev 2
[    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 0x8053c740 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line:  board=HiveAP-121 mtdparts=spi0.0:512k(u-boot)ro,64k(u-boot-env),64k(hw-info)ro,64k(boot-info)ro,64k(boot-sinfo)ro;ar934x-nfc:4096k(u-boot-1),4096k(u-boot-env-1),5m(kernel),111m(ubi),4096k(wifi-info)ro console=ttyS0,9600 rootfstype=squashfs noinitrd
[    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: 124100K/131072K available (4263K kernel code, 177K rwdata, 528K rodata, 208K init, 213K bss, 6972K reserved, 0K cma-reserved)
[    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:400.000MHz, AHB:200.000MHz, Ref:40.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6825930166 ns
[    0.000010] sched_clock: 32 bits at 280MHz, resolution 3ns, wraps every 7669584382ns
[    0.092729] Calibrating delay loop... 278.93 BogoMIPS (lpj=1394688)
[    0.237628] pid_max: default: 32768 minimum: 301
[    0.293078] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.372230] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.458851] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.576505] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.650612] NET: Registered protocol family 16
[    0.705163] MIPS: machine is Aerohive HiveAP-121
[    1.005229] registering PCI controller with io_map_base unset
[    1.087656] i2c-gpio i2c-gpio.0: using pins 13 (SDA) and 12 (SCL)
[    1.160853] PCI host bridge to bus 0000:00
[    1.209864] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    1.292094] pci_bus 0000:00: root bus resource [io  0x0000]
[    1.358758] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    1.439981] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    1.534783] pci 0000:00:00.0: invalid calibration data
[    1.596652] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1001ffff 64bit]
[    1.684116] pci 0000:00:00.0: BAR 6: assigned [mem 0x10020000-0x1002ffff pref]
[    1.774288] clocksource: Switched to clocksource MIPS
[    1.835801] NET: Registered protocol family 2
[    1.888861] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    1.972204] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    2.048195] TCP: Hash tables configured (established 1024 bind 1024)
[    2.124371] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    2.194122] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    2.269343] NET: Registered protocol family 1
[    2.324589] Crashlog allocated RAM at address 0x3f00000
[    2.388491] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    2.471053] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.540858] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    2.668627] io scheduler noop registered
[    2.715577] io scheduler deadline registered (default)
[    2.777465] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    2.855807] console [ttyS0] disabled
[    2.918679] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 2500000) is a 16550A
[    3.021788] console [ttyS0] enabled
[    3.021788] console [ttyS0] enabled
[    3.105071] bootconsole [early0] disabled
[    3.105071] bootconsole [early0] disabled
[    3.207526] m25p80 spi0.0: found mx25l8005, expected m25p80
[    3.274916] m25p80 spi0.0: mx25l8005 (1024 Kbytes)
[    3.332279] 5 cmdlinepart partitions found on MTD device spi0.0
[    3.403032] Creating 5 MTD partitions on "spi0.0":
[    3.460340] 0x000000000000-0x000000080000 : "u-boot"
[    3.521161] 0x000000080000-0x000000090000 : "u-boot-env"
[    3.586823] 0x000000090000-0x0000000a0000 : "hw-info"
[    3.648647] 0x0000000a0000-0x0000000b0000 : "boot-info"
[    3.713300] 0x0000000b0000-0x0000000c0000 : "boot-sinfo"
[    3.779790] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xf1
[    3.855879] nand: Hynix NAND 128MiB 3,3V 8-bit
[    3.908993] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    3.999936] Scanning device for bad blocks
[    4.052186] random: fast init done
[    4.174275] 5 cmdlinepart partitions found on MTD device ar934x-nfc
[    4.249273] Creating 5 MTD partitions on "ar934x-nfc":
[    4.310752] 0x000000000000-0x000000400000 : "u-boot-1"
[    4.373619] 0x000000400000-0x000000800000 : "u-boot-env-1"
[    4.441283] 0x000000800000-0x000000d00000 : "kernel"
[    4.502099] 0x000000d00000-0x000007c00000 : "ubi"
[    4.561082] 0x000007c00000-0x000008000000 : "wifi-info"
[    4.625791] libphy: Fixed MDIO Bus: probed
[    4.681595] libphy: ag71xx_mdio: probed
[    5.454515] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd072, driver=Atheros 8035 ethernet]
[    5.574873] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: rgmii
[    5.650732] NET: Registered protocol family 10
[    5.708487] Segment Routing with IPv6
[    5.752436] NET: Registered protocol family 17
[    5.805601] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    5.961182] 8021q: 802.1Q VLAN Support v1.8
[    6.015482] UBI error: unable to read from mtd8
[    6.069742] hctosys: unable to open rtc device (rtc0)
[    6.130562] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    6.220115] Please append a correct "root=" boot option; here are the available partitions:
[    6.320038] 1f00             512 mtdblock0 
[    6.320044]  (driver?)
[    6.398235] 1f01              64 mtdblock1 
[    6.398241]  (driver?)
[    6.476459] 1f02              64 mtdblock2 
[    6.476466]  (driver?)
[    6.554652] 1f03              64 mtdblock3 
[    6.554657]  (driver?)
[    6.632858] 1f04              64 mtdblock4 
[    6.632864]  (driver?)
[    6.711066] 1f05            4096 mtdblock5 
[    6.711072]  (driver?)
[    6.789274] 1f06            4096 mtdblock6 
[    6.789279]  (driver?)
[    6.867483] 1f07            5120 mtdblock7 
[    6.867489]  (driver?)
[    6.945691] 1f08          113664 mtdblock8 
[    6.945696]  (driver?)
[    7.023898] 1f09            4096 mtdblock9 
[    7.023904]  (driver?)
[    7.102104] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    7.202057] Rebooting in 1 seconds..
U-boot DB120
DRAM:  
sri
Wasp 1.2...

Then restarts all over again with the same error.

I check if the NAND has the rootfs partition and it does:

ar7240> mtdparts

device nor0 <ath-nor0>, # parts = 5
 #: name                        size            offset          mask_flags
 0: u-boot                      0x00080000      0x00000000      0
 1: u-boot-env                  0x00010000      0x00080000      0
 2: hw-info                     0x00010000      0x00090000      0
 3: boot-info                   0x00010000      0x000a0000      0
 4: boot-sinfo                  0x00010000      0x000b0000      0

device nand0 <ath-nand0>, # parts = 8
 #: name                        size            offset          mask_flags
 0: u-boot-1                    0x00400000      0x00000000      0
 1: u-boot-env-1                0x00400000      0x00400000      0
 2: kernel                      0x00500000      0x00800000      0
 3: kernel-1                    0x00500000      0x00d00000      0
 4: rootfs                      0x01900000      0x01200000      0
 5: rootfs-1                    0x01900000      0x02b00000      0
 6: jffs2                       0x03800000      0x04400000      0
 7: wifi-info                   0x00400000      0x07c00000      0

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

defaults:
mtdids  : nor0=ath-nor0,nand0=ath-nand0
mtdparts: mtdparts=ath-nor0:512k(u-boot),64k(u-boot-env),64k(hw-info),64k(boot-info),64k(boot-sinfo);ath-nand0:4096k(u-boot-1),4096k(u-boot-env-1),5m(kernel),5m(kernel-1),25m(rootfs),25m(rootfs-1),56m(jffs2),4096k(wifi-info)


This the boot environment variables

ar7240> printenv 
bootargs=console=ttyS0,9600 root=01:00 init=/sbin/init 
bootcmd=nboot 0x81000000 0 0x00800000
bootdelay=4
baudrate=9600
ethaddr=0x00:0xaa:0xbb:0xcc:0xdd:0xee
ipaddr=192.168.1.1
serverip=192.168.1.10
mtdids=nor0=ath-nor0,nand0=ath-nand0
mtdparts=mtdparts=ath-nor0:512k(u-boot),64k(u-boot-env),64k(hw-info),64k(boot-info),64k(boot-sinfo);ath-nand0:4096k(u-boot-1),4096k(u-boot-env-1),5m(kernel),5m(kernel-1),25m(rootfs),25m(rootfs-1),56m(jffs2),4096k(wifi-info)
netretry=once
stdin=serial
stdout=serial
stderr=serial
ethact=eth0
bootfile=
partition=nor0,0
mtddevnum=0
mtddevname=u-boot

Environment size: 584/8188 bytes

And the hardware version:

ar7240> dump_hw_info
MAC Addr:    40:18:b1:43:61:c0
Serial Num:  12112112203298
Cntry Code:  0000
HW Rev:      01
Prod Name:   HiveAP121
HW ID:       00
Mft Date:    20121122
Num of MACs: 64
HW Ver:      1
Ant ID:      0000
Key:         xxxxxxxxxxxxxx

I tried previous releases 19.07.X and previous versions 18.06.X and I get the same results. I tried a device from the same lot and the results are the same. What am i doing wrong or there is another hardware thing to take note?

The uboot installation process that i follow is this:

ar7240> dhcp;
ar7240> setenv serverip 192.168.15.5;
ar7240> tftpboot 0x81000000 openwrt-firmware-file.bin;
ar7240> nand erase 0x800000 0x800000;
ar7240> nand write 0x81000000 0x800000 0x800000;
ar7240> reset;

Thanks for your help.

According to the log,

the firmware partition is at 0x800000-0x7c00000, so the size is 0x7400000.

But you only erased and wrote the first 0x800000.

The actual commands should be like

nand erase 0x800000 0x7400000
nand write 0x81000000 0x800000 <insert firmware size>
1 Like

That is ... interesting. Sorry for editing, I had a different reply here before. But I went back and double-checked and the factory image is indeed larger than 8 MiB. So the OP didn't actually flash the whole image.

And ... neither did I. Which makes me wonder how and why the heck my three AP121s are working just fine. I did exactly the same: flash the factory image with length 0x800000. I checked my file archive and the exact image I wrote is actually 0x880000 bytes, of which I apparantly only wrote the first 0x800000. (Without thinking about it too much I followed the flashing instructions of the 2017 initial commit, at which point the OpenWrt image was probably a bit smaller. I then took this process that worked fine for me over into the Wiki page, and never bothered to check if the sizes are still correct.)

This should probably be corrected in the Wiki, and why not erase the whole flash where Kernel + UBI sit, even if strictly speaking it's not necessary.

Thanks for your help. I followed the change on the installation process but still getting the same result, the device does not boot successfully. This is what i have done:

ar7240> dhcp;
ar7240> setenv serverip 192.168.15.5;
ar7240> tftpboot 0x81000000 openwrt-19.07.6-ar71xx-nand-hiveap-121-squashfs-factory.bin;

Following the @takimata advice, I clean the nand memory.

ar7240> nand erase;
ar7240> nand write 0x81000000 0x800000 0x880000;
ar7240> reset; 

Resetting...U-boot DB120
DRAM:  
sri
Wasp 1.2
wasp_ddr_initial_config(259): (32bit) ddr2 init
128 MB
Top of RAM usable for U-Boot at: 88000000
Reserving 324k for U-Boot at: 87fac000
Reserving 136k for malloc() at: 87f8a000
Reserving 44 Bytes for Board Info at: 87f89fd4
Reserving 36 Bytes for Global Data at: 87f89fb0
Reserving 128k for boot params() at: 87f69fb0
Stack Pointer at: 87f69f98
relocating and jumping to code in DRAM
Now running in RAM - U-Boot at: 0x87fac000
Flash:  1 MB
*** Warning - bad CRC, using default environment

ag934x_enet_initialize...
 wasp  reset mask:c03300 
WASP  ----> F1 PHY *
: cfg1 0xf cfg2 0x7114
eth0: 00:19:77:ff:00:00
F1Phy reg init 
ATHR_AUTONEG_ADVERT:1DE1
ATHR_1000BASET_CONTROL:200
ATHR_PHY_CONTROL:3100
ATHRSF1_PHY: Port 0, Neg Success
ATHRSF1_PHY: unit 0 phy addr 0 eth0 up

Atheros on-chip NAND FLash Controller Driver, Version 0.1 (c) 2010 Atheros Communications, Ltd.
Ath Nand ID[87ff4178]: 1d:00:f1:ad:1d
Hynix NAND 128MiB 3,3V 8-bit [128MB]

chip #0: First 0xa last 0xa sector size 0x10000                                                                                                                                                                                                                                                                   10
Hit the space bar to stop the autoboot process:  0 
Hit any key to interrupt boot from flash:  0 

Loading kernel from device 0: ath-nand (offset 0x800000) ... done
Loading rootfs from device 0: ath-nand (offset 0x1200000) ... done
   Uncompressing Kernel Image ... No initrd
## Transferring control to Linux (at address 80060000) ...
commandline console=ttyS0,9600 root=01:00 init=/sbin/init  console=ttyS0,9600 rd_start=0x80500000 rd_size=0x01900000
## Giving linux memsize in bytes, 134217728
[    0.000000] Linux version 4.14.215 (builder@buildhost) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r11278-8055e38794)) #0 Tue Jan 19 13:10:02 2021
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] SoC: Atheros AR9344 rev 2
[    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 0x8053c740 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line:  board=HiveAP-121 mtdparts=spi0.0:512k(u-boot)ro,64k(u-boot-env),64k(hw-info)ro,64k(boot-info)ro,64k(boot-sinfo)ro;ar934x-nfc:4096k(u-boot-1),4096k(u-boot-env-1),5m(kernel),111m(ubi),4096k(wifi-info)ro console=ttyS0,9600 rootfstype=squashfs noinitrd
[    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: 124100K/131072K available (4263K kernel code, 177K rwdata, 528K rodata, 208K init, 213K bss, 6972K reserved, 0K cma-reserved)
[    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:400.000MHz, AHB:200.000MHz, Ref:40.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6825930166 ns
[    0.000010] sched_clock: 32 bits at 280MHz, resolution 3ns, wraps every 7669584382ns
[    0.092728] Calibrating delay loop... 278.93 BogoMIPS (lpj=1394688)
[    0.237628] pid_max: default: 32768 minimum: 301
[    0.293078] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.372230] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.458853] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.576505] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.650612] NET: Registered protocol family 16
[    0.705160] MIPS: machine is Aerohive HiveAP-121
[    1.005224] registering PCI controller with io_map_base unset
[    1.087540] i2c-gpio i2c-gpio.0: using pins 13 (SDA) and 12 (SCL)
[    1.160750] PCI host bridge to bus 0000:00
[    1.209760] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    1.291990] pci_bus 0000:00: root bus resource [io  0x0000]
[    1.358653] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    1.439877] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    1.534679] pci 0000:00:00.0: invalid calibration data
[    1.596549] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1001ffff 64bit]
[    1.684011] pci 0000:00:00.0: BAR 6: assigned [mem 0x10020000-0x1002ffff pref]
[    1.774181] clocksource: Switched to clocksource MIPS
[    1.835700] NET: Registered protocol family 2
[    1.888755] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    1.972099] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    2.048091] TCP: Hash tables configured (established 1024 bind 1024)
[    2.124266] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    2.194018] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    2.269239] NET: Registered protocol family 1
[    2.324482] Crashlog allocated RAM at address 0x3f00000
[    2.388550] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    2.471150] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.540962] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    2.668723] io scheduler noop registered
[    2.715681] io scheduler deadline registered (default)
[    2.777568] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    2.855916] console [ttyS0] disabled
[    2.918780] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 2500000) is a 16550A
[    3.021862] console [ttyS0] enabled
[    3.021862] console [ttyS0] enabled
[    3.105145] bootconsole [early0] disabled
[    3.105145] bootconsole [early0] disabled
[    3.207575] m25p80 spi0.0: found mx25l8005, expected m25p80
[    3.274966] m25p80 spi0.0: mx25l8005 (1024 Kbytes)
[    3.332355] 5 cmdlinepart partitions found on MTD device spi0.0
[    3.403211] Creating 5 MTD partitions on "spi0.0":
[    3.460519] 0x000000000000-0x000000080000 : "u-boot"
[    3.521338] 0x000000080000-0x000000090000 : "u-boot-env"
[    3.587008] 0x000000090000-0x0000000a0000 : "hw-info"
[    3.648820] 0x0000000a0000-0x0000000b0000 : "boot-info"
[    3.713482] 0x0000000b0000-0x0000000c0000 : "boot-sinfo"
[    3.779970] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xf1
[    3.856057] nand: Hynix NAND 128MiB 3,3V 8-bit
[    3.909172] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    4.000117] Scanning device for bad blocks
[    4.052371] random: fast init done
[    4.174581] 5 cmdlinepart partitions found on MTD device ar934x-nfc
[    4.249568] Creating 5 MTD partitions on "ar934x-nfc":
[    4.311035] 0x000000000000-0x000000400000 : "u-boot-1"
[    4.373906] 0x000000400000-0x000000800000 : "u-boot-env-1"
[    4.441671] 0x000000800000-0x000000d00000 : "kernel"
[    4.502485] 0x000000d00000-0x000007c00000 : "ubi"
[    4.561476] 0x000007c00000-0x000008000000 : "wifi-info"
[    4.626153] libphy: Fixed MDIO Bus: probed
[    4.681986] libphy: ag71xx_mdio: probed
[    5.454406] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd072, driver=Atheros 8035 ethernet]
[    5.574751] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: rgmii
[    5.650597] NET: Registered protocol family 10
[    5.708357] Segment Routing with IPv6
[    5.752302] NET: Registered protocol family 17
[    5.805468] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    5.961044] 8021q: 802.1Q VLAN Support v1.8
[    6.015322] UBI error: unable to read from mtd8
[    6.069504] hctosys: unable to open rtc device (rtc0)
[    6.130323] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    6.219878] Please append a correct "root=" boot option; here are the available partitions:
[    6.319799] 1f00             512 mtdblock0 
[    6.319806]  (driver?)
[    6.397999] 1f01              64 mtdblock1 
[    6.398005]  (driver?)
[    6.476216] 1f02              64 mtdblock2 
[    6.476222]  (driver?)
[    6.554414] 1f03              64 mtdblock3 
[    6.554419]  (driver?)
[    6.632622] 1f04              64 mtdblock4 
[    6.632628]  (driver?)
[    6.710830] 1f05            4096 mtdblock5 
[    6.710835]  (driver?)
[    6.789037] 1f06            4096 mtdblock6 
[    6.789042]  (driver?)
[    6.867245] 1f07            5120 mtdblock7 
[    6.867251]  (driver?)
[    6.945453] 1f08          113664 mtdblock8 
[    6.945458]  (driver?)
[    7.023661] 1f09            4096 mtdblock9 
[    7.023666]  (driver?)
[    7.101868] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    7.201830] Rebooting in 1 seconds..

Then I tried the snapshot firmware file, which it is a slightly bigger:

ar7240> dhcp;
ar7240> tftpboot 0x81000000 openwrt-ath79-nand-aerohive_hiveap-121-squashfs-factory.bin;
ar7240> nand erase;
ar7240> nand write 0x81000000 0x800000 0x8c0000;
ar7240> reset; 


Resetting...U-boot DB120
DRAM:  
sri
Wasp 1.2
wasp_ddr_initial_config(259): (32bit) ddr2 init
128 MB
Top of RAM usable for U-Boot at: 88000000
Reserving 324k for U-Boot at: 87fac000
Reserving 136k for malloc() at: 87f8a000
Reserving 44 Bytes for Board Info at: 87f89fd4
Reserving 36 Bytes for Global Data at: 87f89fb0
Reserving 128k for boot params() at: 87f69fb0
Stack Pointer at: 87f69f98
relocating and jumping to code in DRAM
Now running in RAM - U-Boot at: 0x87fac000
Flash:  1 MB
*** Warning - bad CRC, using default environment

ag934x_enet_initialize...
 wasp  reset mask:c03300 
WASP  ----> F1 PHY *
: cfg1 0xf cfg2 0x7114
eth0: 00:19:77:ff:00:00
F1Phy reg init 
ATHR_AUTONEG_ADVERT:1DE1
ATHR_1000BASET_CONTROL:200
ATHR_PHY_CONTROL:3100
ATHRSF1_PHY: Port 0, Neg Success
ATHRSF1_PHY: unit 0 phy addr 0 eth0 up

Atheros on-chip NAND FLash Controller Driver, Version 0.1 (c) 2010 Atheros Communications, Ltd.
Ath Nand ID[87ff4178]: 1d:00:f1:ad:1d
Hynix NAND 128MiB 3,3V 8-bit [128MB]

chip #0: First 0xa last 0xa sector size 0x10000                                                                                                                                                                                                                                                                   10
Hit the space bar to stop the autoboot process:  0 
Hit any key to interrupt boot from flash:  0 

Loading kernel from device 0: ath-nand (offset 0x800000) ... done
Loading rootfs from device 0: ath-nand (offset 0x1200000) ... done
   Uncompressing Kernel Image ... No initrd
## Transferring control to Linux (at address 80060000) ...
commandline console=ttyS0,9600 root=01:00 init=/sbin/init  console=ttyS0,9600 rd_start=0x80500000 rd_size=0x01900000
## Giving linux memsize in bytes, 134217728
[    0.000000] Linux version 5.4.92 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r15637-7d12f29ae1)) #0 Thu Jan 28 11:01:14 2021
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] MIPS: machine is Aerohive HiveAP 121
[    0.000000] SoC: Atheros AR9344 rev 2
[    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,9600 rootfstype=squashfs,jffs2
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 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: 121408K/131072K available (5493K kernel code, 179K rwdata, 1208K rodata, 1240K init, 210K bss, 9664K reserved, 0K cma-reserved)
[    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 start_kernel+0x32c/0x520 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.092730] Calibrating delay loop... 278.78 BogoMIPS (lpj=557568)
[    0.202578] pid_max: default: 32768 minimum: 301
[    0.257984] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.345386] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.443226] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.559872] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.641195] pinctrl core: initialized pinctrl subsystem
[    0.705126] NET: Registered protocol family 16
[    0.790839] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.909753] clocksource: Switched to clocksource MIPS
[    0.971375] NET: Registered protocol family 2
[    1.024504] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    1.124530] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    1.216196] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    1.300530] TCP: Hash tables configured (established 1024 bind 1024)
[    1.376680] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    1.454812] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    1.538401] NET: Registered protocol family 1
[    1.590535] PCI: CLS 0 bytes, default 32
[    1.641583] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[    1.726235] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.796011] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    1.928139] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    2.020871] pinctrl-single 1804002c.pinmux: 544 pins, size 68
[    2.090713] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    2.169284] printk: console [ttyS0] disabled
[    2.220396] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 9, base_baud = 2500000) is a 16550A
[    2.323492] printk: console [ttyS0] enabled
[    2.323492] printk: console [ttyS0] enabled
[    2.423408] printk: bootconsole [early0] disabled
[    2.423408] printk: bootconsole [early0] disabled
[    2.548013] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xf1
[    2.624064] nand: Hynix NAND 128MiB 3,3V 8-bit
[    2.677170] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    2.767863] Scanning device for bad blocks
[    2.820670] random: fast init done
[    2.943436] 5 fixed-partitions partitions found on MTD device ar934x-nand
[    3.024636] Creating 5 MTD partitions on "ar934x-nand":
[    3.087153] 0x000000000000-0x000000400000 : "u-boot1"
[    3.148609] 0x000000400000-0x000000800000 : "u-boot-env1"
[    3.214300] 0x000000800000-0x000000d00000 : "kernel"
[    3.274763] 0x000000d00000-0x000007c00000 : "ubi"
[    3.332614] 0x000007c00000-0x000008000000 : "wifi-info"
[    3.401480] spi-nor spi0.0: mx25l8005 (1024 Kbytes)
[    3.459863] 5 fixed-partitions partitions found on MTD device spi0.0
[    3.535899] Creating 5 MTD partitions on "spi0.0":
[    3.593206] 0x000000000000-0x000000080000 : "u-boot"
[    3.653611] 0x000000080000-0x000000090000 : "u-boot-env"
[    3.718319] 0x000000090000-0x0000000a0000 : "hw-info"
[    3.779789] 0x0000000a0000-0x0000000b0000 : "boot-info"
[    3.843320] 0x0000000b0000-0x0000000c0000 : "boot-sinfo"
[    3.908841] libphy: Fixed MDIO Bus: probed
[    4.279681] libphy: ag71xx_mdio: probed
[    4.327838] ag71xx 19000000.eth: connected to PHY at mdio.0:00 [uid=004dd072, driver=Atheros 8035 ethernet]
[    4.445195] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: rgmii-id
[    4.524375] NET: Registered protocol family 10
[    4.582337] Segment Routing with IPv6
[    4.626295] NET: Registered protocol family 17
[    4.679450] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    4.834558] 8021q: 802.1Q VLAN Support v1.8
[    4.887297] GPIO line 20 (hiveap-121:ext:lna0) hogged as output/low
[    4.962312] GPIO line 19 (hiveap-121:ext:lna1) hogged as output/low
[    5.037264] GPIO line 15 (hiveap-121:power:usb) hogged as output/high
[    5.114772] PCI host bridge /ahb/pcie-controller@180c0000 ranges:
[    5.187686]  MEM 0x0000000010000000..0x0000000013ffffff
[    5.250137]   IO 0x0000000000000000..0x0000000000000000
[    5.312819] PCI host bridge to bus 0000:00
[    5.361860] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    5.444089] pci_bus 0000:00: root bus resource [io  0x0000]
[    5.510752] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    5.591975] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    5.686760] pci 0000:00:00.0: [168c:0030] type 00 class 0x028000
[    5.758637] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x0001ffff 64bit]
[    5.839862] pci 0000:00:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    5.920072] pci 0000:00:00.0: supports D1
[    5.968043] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    6.038095] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    6.117203] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1001ffff 64bit]
[    6.204667] pci 0000:00:00.0: BAR 6: assigned [mem 0x10020000-0x1002ffff pref]
[    6.295052] UBI error: unable to read from mtd3
[    6.350106] /dev/root: Can't open blockdev
[    6.399163] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    6.488662] Please append a correct "root=" boot option; here are the available partitions:
[    6.588615] 1f00            4096 mtdblock0 
[    6.588619]  (driver?)
[    6.666816] 1f01            4096 mtdblock1 
[    6.666819]  (driver?)
[    6.745024] 1f02            5120 mtdblock2 
[    6.745027]  (driver?)
[    6.823233] 1f03          113664 mtdblock3 
[    6.823236]  (driver?)
[    6.901439] 1f04            4096 mtdblock4 
[    6.901443]  (driver?)
[    6.979648] 1f05             512 mtdblock5 
[    6.979651]  (driver?)
[    7.057854] 1f06              64 mtdblock6 
[    7.057857]  (driver?)
[    7.136062] 1f07              64 mtdblock7 
[    7.136065]  (driver?)
[    7.214271] 1f08              64 mtdblock8 
[    7.214275]  (driver?)
[    7.292479] 1f09              64 mtdblock9 
[    7.292482]  (driver?)
[    7.370685] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    7.469582] Rebooting in 1 seconds..

Getting almost the same results.

Checking the kernel dump from 19.07.6 release and the snapshot release, the problem i guess it's the same, the kernel cannot read ubi volume so cannot find the rootfs right partition. Checking for similar issues with another nand devices I found this in the forum:

https://forum.openwrt.org/t/solved-wheres-my-rootfs/12686/4

I am new to this platform, so i am little lost in finding the solution. Do i have to work the boot parameter editing for this kernel or do i have to check how the image binary process is made to inspect and fix the ubi volume issue?

Thanks in advance for your help.

I would like to point out that it was @LGA1150 who noticed that, not me. Credit where credit is due.

And again with this post, sorry for the edit. After a more thorough inspection, I am thinking that your serial connection is directly going to the board via UART, not via the external "console" port? That might be the reason why it is so much more verbose in the beginning.

Is worth fixing. Boot into uboot and save the default configuration using saveenv, after that this error should disappear.

I am inclined to think that your problem is still the flashing process, not correctly writing the UBI partition to the flash. 0x880000 should be the correct size, so something else is going wrong there. Maybe an error in transferring the image file?

In order not to leave this thread dangling in the breeze: Did you manage to fix your problems?

Well, I am using the serial console port, not UART. The device is made by AeroHive Networks. It is the same exact model that you refer, the same FCC ID and IC, only that the casing has AeroHive Networks printed. I am connecting back the device and start doing the debug process, checking the boot enviroment variables. I'll update this post with the data.

That's rather curious then, your "pre-boot" bootlog looks different from what I see on all of my AP121s. I wonder if yours might have a different bootloader altogether.

If you have the thing connected and are in u-boot, you could try the version command, and I'll hook up one of mine to serial to compare.

Answering (in part) to myself. Also, again, not to leave this thread hanging ...

I completely forgot I already did and I even entered it into the wiki: For comparison, my devices show the following:

For version

Aerohive Boot Loader v1.0.0.50, Build time Thu Aug 25 08:26:50 2016

For dump_hw_info

MAC Addr:    40:18:b1:(redacted)
Serial Num:  (redacted)
Cntry Code:  0
HW Rev:      01
Prod Name:   HiveAP121
HW ID:       00
Mft Date:    20140125
Num of MACs: 64
HW Ver:      1
Ant ID:      0000
Key:         xxxxxxxxxxxxxx

Hello,

Same problem here: exact same panic error. My boot loader version is v1.0.0.25.
Any idea what is wrong ?
Also, if I want to boot up back to the backup partition (and restore the OEM firmware), is this possible and how ?
Thanks

That's vital information, and I am inclined to believe that this is the problem: an older, incompatible boot loader.

I could see two ways to solve this issue:
a) flash a newer bootloader (e.g. v1.0.0.50), pulled from another device. This is rather risky, any error will probably result in a complete brick.
b) upgrade the device while it is still running its original firmware in the hopes it will also upgrade the bootloader. Since the AP121s come with a dual-firmware scheme and have duplicate everything (bootloader, boot environment, kernel, rootfs), the original firmware probably has provisions to make sure the bootloader can safely be updated.

If you tried to flash OpenWrt, you have overwritten the "backup partition". OpenWrt uses its space, too.

If you made a backup before you tried to flash OpenWrt, it should be possible to flash it just like one would flash an OpenWrt image, with careful consideration of offsets and binary sizes. Did you draw such a backup before you tried to flash OpenWrt?

It may also be possible to flash an original firmware file after some preparation, but as far as I know noone checked yet, and the files were never publicly available.

I don't have another device and if this is my only option I would need a little bit of guidance to perform this operation safely.

As you probably understood I already tried to apply the OpenWrt firwmare that resulted into this situation. Thus, I can't really consider this option.

I'm posting the full boot up sequence in case someone has an idea on what went wrong and a proposed next steps:

Resetting...U-boot DB120
DRAM:
sri
Wasp 1.2
wasp_ddr_initial_config(259): (32bit) ddr2 init
128 MB
Top of RAM usable for U-Boot at: 88000000
Reserving 324k for U-Boot at: 87fac000
Reserving 136k for malloc() at: 87f8a000
Reserving 44 Bytes for Board Info at: 87f89fd4
Reserving 36 Bytes for Global Data at: 87f89fb0
Reserving 128k for boot params() at: 87f69fb0
Stack Pointer at: 87f69f98
relocating and jumping to code in DRAM
Now running in RAM - U-Boot at: 0x87fac000
Flash:  1 MB
ag934x_enet_initialize...
 wasp  reset mask:c03300
WASP  ----> F1 PHY *
: cfg1 0xf cfg2 0x7114
eth0: 00:19:77:ff:00:00
F1Phy reg init
ATHR_AUTONEG_ADVERT:1DE1
ATHR_1000BASET_CONTROL:200
ATHR_PHY_CONTROL:3100
ATHRSF1_PHY: Port 0, Neg Success
ATHRSF1_PHY: unit 0 phy addr 0 eth0 up

Atheros on-chip NAND FLash Controller Driver, Version 0.1 (c) 2010 Atheros Communications, Ltd.
Ath Nand ID[87ff4178]: 1d:00:f1:ad:1d
Hynix NAND 128MiB 3,3V 8-bit [128MB]

chip #0: First 0xa last 0xa sector size 0x10000                                                                 10
Hit the space bar to stop the autoboot process:  0
Hit any key to interrupt boot from flash:  0

Loading kernel from device 0: ath-nand (offset 0x800000) ... done
Loading rootfs from device 0: ath-nand (offset 0x1200000) ... done
   Uncompressing Kernel Image ... No initrd
## Transferring control to Linux (at address 80060000) ...
commandline console=ttyS0,9600 root=01:00 init=/sbin/init  console=ttyS0,9600 rd_start=0x80500000 rd_size=0x01900000
## Giving linux memsize in bytes, 134217728
[    0.000000] Linux version 4.9.243 (buildbot@d6b0edf6d597) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r8077-7cbbab7246) ) #0 Wed Nov 11 20:09:58 2020
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] SoC: Atheros AR9344 rev 2
[    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] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line:  board=HiveAP-121 mtdparts=spi0.0:512k(u-boot)ro,64k(u-boot-env),64k(hw-info)ro,64k(boot-info)ro,64k(boot-sinfo)ro;ar934x-nfc:4096k(u-boot-1),4096k(u-boot-env-1),5m(kernel),111m(ubi),4096k(wifi-info)ro console=ttyS0,9600 rootfstype=squashfs noinitrd
[    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: 124748K/131072K available (3688K kernel code, 163K rwdata, 460K rodata, 224K init, 209K bss, 6324K reserved, 0K cma-reserved)
[    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:400.000MHz, AHB:200.000MHz, Ref:40.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6825930166 ns
[    0.000010] sched_clock: 32 bits at 280MHz, resolution 3ns, wraps every 7669584382ns
[    0.092733] Calibrating delay loop... 278.93 BogoMIPS (lpj=1394688)
[    0.237730] pid_max: default: 32768 minimum: 301
[    0.293075] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.372209] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.459352] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.577030] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.651179] NET: Registered protocol family 16
[    0.705810] MIPS: machine is Aerohive HiveAP-121
[    1.005880] registering PCI controller with io_map_base unset
[    1.086864] i2c-gpio i2c-gpio.0: using pins 13 (SDA) and 12 (SCL)
[    1.160008] PCI host bridge to bus 0000:00
[    1.209022] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    1.291258] pci_bus 0000:00: root bus resource [io  0x0000]
[    1.357922] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    1.439146] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    1.533938] pci 0000:00:00.0: invalid calibration data
[    1.595782] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1001ffff 64bit]
[    1.683275] pci 0000:00:00.0: BAR 6: assigned [mem 0x10020000-0x1002ffff pref]
[    1.769671] pci 0000:00:00.0: using irq 40 for pin 1
[    1.832628] clocksource: Switched to clocksource MIPS
[    1.894173] NET: Registered protocol family 2
[    1.947278] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    2.030652] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    2.106636] TCP: Hash tables configured (established 1024 bind 1024)
[    2.182737] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    2.252572] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    2.327783] NET: Registered protocol family 1
[    2.382951] Crashlog allocated RAM at address 0x3f00000
[    2.446785] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    2.531216] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.600962] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    2.727916] io scheduler noop registered
[    2.774854] io scheduler deadline registered (default)
[    2.836729] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    2.915585] console [ttyS0] disabled
[    2.978358] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 2500000) is a 16550A
[    3.081439] console [ttyS0] enabled
[    3.081439] console [ttyS0] enabled
[    3.164727] bootconsole [early0] disabled
[    3.164727] bootconsole [early0] disabled
[    3.266580] m25p80 spi0.0: found mx25l8005, expected m25p80
[    3.333781] m25p80 spi0.0: mx25l8005 (1024 Kbytes)
[    3.391106] 5 cmdlinepart partitions found on MTD device spi0.0
[    3.461856] Creating 5 MTD partitions on "spi0.0":
[    3.519165] 0x000000000000-0x000000080000 : "u-boot"
[    3.580557] 0x000000080000-0x000000090000 : "u-boot-env"
[    3.646204] 0x000000090000-0x0000000a0000 : "hw-info"
[    3.708748] 0x0000000a0000-0x0000000b0000 : "boot-info"
[    3.773469] 0x0000000b0000-0x0000000c0000 : "boot-sinfo"
[    3.840535] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xf1
[    3.916574] nand: Hynix NAND 128MiB 3,3V 8-bit
[    3.969691] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    4.060316] Scanning device for bad blocks
[    4.112596] random: fast init done
[    4.233868] 5 cmdlinepart partitions found on MTD device ar934x-nfc
[    4.308837] Creating 5 MTD partitions on "ar934x-nfc":
[    4.370310] 0x000000000000-0x000000400000 : "u-boot-1"
[    4.433818] 0x000000400000-0x000000800000 : "u-boot-env-1"
[    4.501643] 0x000000800000-0x000000d00000 : "kernel"
[    4.563289] 0x000000d00000-0x000007c00000 : "ubi"
[    4.622298] 0x000007c00000-0x000008000000 : "wifi-info"
[    4.687696] libphy: Fixed MDIO Bus: probed
[    4.743034] libphy: ag71xx_mdio: probed
[    5.512850] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd072, driver=Atheros 8035 ethernet]
[    5.633329] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    5.708087] NET: Registered protocol family 10
[    5.765194] NET: Registered protocol family 17
[    5.818391] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    5.973570] 8021q: 802.1Q VLAN Support v1.8
[    6.027917] UBI error: unable to read from mtd8
[    6.082080] hctosys: unable to open rtc device (rtc0)
[    6.142924] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    6.232445] Please append a correct "root=" boot option; here are the available partitions:
[    6.332375] 1f00             512 mtdblock0 [    6.380304]  (driver?)
[    6.408495] 1f01              64 mtdblock1 [    6.456431]  (driver?)
[    6.484622] 1f02              64 mtdblock2 [    6.532557]  (driver?)
[    6.560749] 1f03              64 mtdblock3 [    6.608699]  (driver?)
[    6.636888] 1f04              64 mtdblock4 [    6.684816]  (driver?)
[    6.713007] 1f05            4096 mtdblock5 [    6.760942]  (driver?)
[    6.789134] 1f06            4096 mtdblock6 [    6.837071]  (driver?)
[    6.865263] 1f07            5120 mtdblock7 [    6.913199]  (driver?)
[    6.941390] 1f08          113664 mtdblock8 [    6.989327]  (driver?)
[    7.017519] 1f09            4096 mtdblock9 [    7.065455]  (driver?)
[    7.093645] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    7.193729] Rebooting in 1 seconds..

Maybe some naive questions :

  • is the VFS error related to a file system issue or to the fact that the factory image I used (openwrt-19.07.4-ar71xx-nand-hiveap-121-squashfs-factory.bin but I also tried the latest one 19.07.7) is problematic for such device with the current boot loader ?
  • Would it make sense to try to use an older version of OpenWrt/lede (from the 17.x branch version for example) ?
  • I also saw a comment that the image should be built as an initramfs image (https://bugs.openwrt.org/index.php?do=details&task_id=1264). Would also this be something that could be my issue ?

As I'm a little bit new to OpenWrt my level of understanding of image/firmware patching is still a little bit low, so any educated guidance would be appreciated.

Thanks

Can you, while in the bootloader command line, issue the command printenv and paste the output here? I might have an idea, but I can't confirm or disprove it without the exact info.

here it is:

7240> printenv
bootargs=console=ttyS0,9600 root=01:00 init=/sbin/init
bootcmd=nboot 0x81000000 0 0x00800000
bootdelay=4
baudrate=9600
ethaddr=0x00:0xaa:0xbb:0xcc:0xdd:0xee
mtdids=nor0=ath-nor0,nand0=ath-nand0
mtdparts=mtdparts=ath-nor0:512k(u-boot),64k(u-boot-env),64k(hw-info),64k(boot-info),64k(boot-sinfo);ath-nand0:4096k(u-boot-1),4096k(u-boot-env-1),5m(kernel),5m(kernel-1),25m(rootfs),25m(rootfs-1),56m(jffs2),4096k(wifi-info)
partition=nor0,0
mtddevnum=0
mtddevname=u-boot
netretry=once
stdin=serial
stdout=serial
stderr=serial
bootfile=
ethact=eth0
gatewayip=192.168.0.254
netmask=255.255.255.0
ipaddr=192.168.0.204
serverip=192.168.1.10

Environment size: 632/8188 bytes

An additional piece of information: the image used for the boot sequence log posted 9h ago was openwrt-18.06.9-ar71xx-nand-hiveap-121-squashfs-factory.bin. Note that it is the same issue with the current latest release.

points to an error reading the UBI partition from flash. I'm very much out of my depth here, this is the realm of the devs, so I can't pinpoint it any further.

It's a longshot, but ... did you try a current snapshot? ar71xx is no more there, the target has moved to ath79, and presumably a much more modern codebase. Maybe it fares better?
https://downloads.openwrt.org/snapshots/targets/ath79/nand/

Just tried, same issue but with a different UBI mounting point location:

ar7240> tftpboot 0x81000000 openwrt-ath79-nand-aerohive_hiveap-121-squashfs-factory.bin
Trying eth0
dup 1 speed 1000
WASP  ----> F1 PHY *
: cfg1 0xf cfg2 0x7315
dup 1 speed 1000
Using eth0 device
TFTP from server 192.168.0.100; our IP address is 192.168.0.204
Filename 'openwrt-ath79-nand-aerohive_hiveap-121-squashfs-factory.bin'.
Load address: 0x81000000
Loading: #T T T T T ################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ######################################
done
Bytes transferred = 9175040 (8c0000 hex)
ar7240> nand erase 0x800000 0x7400000

NAND erase: device 0 offset 0x800000, size 0x7400 927, skipped 0 bad blocks

OK
ar7240> nand write 0x81000000 0x800000 0x${filesize}

NAND write: device 0 offset 0x800000, size 9175040 ...  9175040 bytes written: OK
ar7240> reset

Resetting...U-boot DB120
DRAM:
sri
Wasp 1.2
wasp_ddr_initial_config(259): (32bit) ddr2 init
128 MB
Top of RAM usable for U-Boot at: 88000000
Reserving 324k for U-Boot at: 87fac000
Reserving 136k for malloc() at: 87f8a000
Reserving 44 Bytes for Board Info at: 87f89fd4
Reserving 36 Bytes for Global Data at: 87f89fb0
Reserving 128k for boot params() at: 87f69fb0
Stack Pointer at: 87f69f98
relocating and jumping to code in DRAM
Now running in RAM - U-Boot at: 0x87fac000
Flash:  1 MB
ag934x_enet_initialize...
 wasp  reset mask:c03300
WASP  ----> F1 PHY *
: cfg1 0xf cfg2 0x7114
eth0: 00:19:77:ff:00:00
F1Phy reg init
ATHR_AUTONEG_ADVERT:1DE1
ATHR_1000BASET_CONTROL:200
ATHR_PHY_CONTROL:3100
ATHRSF1_PHY: Port 0, Neg Success
ATHRSF1_PHY: unit 0 phy addr 0 eth0 up

Atheros on-chip NAND FLash Controller Driver, Version 0.1 (c) 2010 Atheros Communications, Ltd.
Ath Nand ID[87ff4178]: 1d:00:f1:ad:1d
Hynix NAND 128MiB 3,3V 8-bit [128MB]

chip #0: First 0xa last 0xa sector size 0x10000                                                                 10
Hit the space bar to stop the autoboot process:  0
Hit any key to interrupt boot from flash:  0

Loading kernel from device 0: ath-nand (offset 0x800000) ... done
Loading rootfs from device 0: ath-nand (offset 0x1200000) ... done
   Uncompressing Kernel Image ... No initrd
## Transferring control to Linux (at address 80060000) ...
commandline console=ttyS0,9600 root=01:00 init=/sbin/init  console=ttyS0,9600 rd_start=0x80500000 rd_size=0x01900000
## Giving linux memsize in bytes, 134217728
[    0.000000] Linux version 5.4.105 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16264-df26c29629)) #0 Fri Mar 19 10:00:19 2021
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] MIPS: machine is Aerohive HiveAP 121
[    0.000000] SoC: Atheros AR9344 rev 2
[    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,9600 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: 121344K/131072K available (5535K kernel code, 180K rwdata, 1228K rodata, 1240K init, 210K bss, 9728K reserved, 0K cma-reserved)
[    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 start_kernel+0x308/0x4fc 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.092730] Calibrating delay loop... 278.78 BogoMIPS (lpj=557568)
[    0.202580] pid_max: default: 32768 minimum: 301
[    0.257986] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.345390] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.443318] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.559973] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.641301] pinctrl core: initialized pinctrl subsystem
[    0.706584] NET: Registered protocol family 16
[    0.792972] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.911919] clocksource: Switched to clocksource MIPS
[    0.973622] NET: Registered protocol family 2
[    1.026808] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    1.126817] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    1.218482] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    1.302818] TCP: Hash tables configured (established 1024 bind 1024)
[    1.378974] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    1.457092] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    1.540681] NET: Registered protocol family 1
[    1.592829] PCI: CLS 0 bytes, default 32
[    1.643744] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[    1.728525] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.798299] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    1.930062] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    2.022800] pinctrl-single 1804002c.pinmux: 544 pins, size 68
[    2.092756] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    2.171338] printk: console [ttyS0] disabled
[    2.222479] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 9, base_baud = 2500000) is a 16550A
[    2.325574] printk: console [ttyS0] enabled
[    2.325574] printk: console [ttyS0] enabled
[    2.425491] printk: bootconsole [early0] disabled
[    2.425491] printk: bootconsole [early0] disabled
[    2.550032] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xf1
[    2.626040] nand: Hynix NAND 128MiB 3,3V 8-bit
[    2.679151] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    2.769843] Scanning device for bad blocks
[    2.822718] random: fast init done
[    2.946022] 5 fixed-partitions partitions found on MTD device ar934x-nand
[    3.027237] Creating 5 MTD partitions on "ar934x-nand":
[    3.089754] 0x000000000000-0x000000400000 : "u-boot1"
[    3.151250] 0x000000400000-0x000000800000 : "u-boot-env1"
[    3.216877] 0x000000800000-0x000000d00000 : "kernel"
[    3.277300] 0x000000d00000-0x000007c00000 : "ubi"
[    3.335045] 0x000007c00000-0x000008000000 : "wifi-info"
[    3.403868] spi-nor spi0.0: mx25l8005 (1024 Kbytes)
[    3.462259] 5 fixed-partitions partitions found on MTD device spi0.0
[    3.538293] Creating 5 MTD partitions on "spi0.0":
[    3.595603] 0x000000000000-0x000000080000 : "u-boot"
[    3.656112] 0x000000080000-0x000000090000 : "u-boot-env"
[    3.720751] 0x000000090000-0x0000000a0000 : "hw-info"
[    3.782196] 0x0000000a0000-0x0000000b0000 : "boot-info"
[    3.845794] 0x0000000b0000-0x0000000c0000 : "boot-sinfo"
[    3.911361] libphy: Fixed MDIO Bus: probed
[    4.281842] libphy: ag71xx_mdio: probed
[    4.329947] ag71xx 19000000.eth: connected to PHY at mdio.0:00 [uid=004dd072, driver=Atheros 8035 ethernet]
[    4.447253] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: rgmii-id
[    4.526533] NET: Registered protocol family 10
[    4.584458] Segment Routing with IPv6
[    4.628378] NET: Registered protocol family 17
[    4.681543] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    4.836641] 8021q: 802.1Q VLAN Support v1.8
[    4.889435] GPIO line 20 (hiveap-121:ext:lna0) hogged as output/low
[    4.964496] GPIO line 19 (hiveap-121:ext:lna1) hogged as output/low
[    5.039436] GPIO line 15 (hiveap-121:power:usb) hogged as output/high
[    5.116974] PCI host bridge /ahb/pcie-controller@180c0000 ranges:
[    5.189873]  MEM 0x0000000010000000..0x0000000013ffffff
[    5.252325]   IO 0x0000000000000000..0x0000000000000000
[    5.314998] PCI host bridge to bus 0000:00
[    5.364043] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    5.446276] pci_bus 0000:00: root bus resource [io  0x0000]
[    5.512939] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    5.594161] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    5.688949] pci 0000:00:00.0: [168c:0030] type 00 class 0x028000
[    5.760824] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x0001ffff 64bit]
[    5.842045] pci 0000:00:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    5.922258] pci 0000:00:00.0: supports D1
[    5.970230] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    6.040418] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    6.119600] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1001ffff 64bit]
[    6.207058] pci 0000:00:00.0: BAR 6: assigned [mem 0x10020000-0x1002ffff pref]
[    6.297511] UBI error: unable to read from mtd3
[    6.352600] /dev/root: Can't open blockdev
[    6.401668] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    6.491159] Please append a correct "root=" boot option; here are the available partitions:
[    6.591113] 1f00            4096 mtdblock0
[    6.591117]  (driver?)
[    6.669314] 1f01            4096 mtdblock1
[    6.669317]  (driver?)
[    6.747520] 1f02            5120 mtdblock2
[    6.747523]  (driver?)
[    6.825729] 1f03          113664 mtdblock3
[    6.825732]  (driver?)
[    6.903935] 1f04            4096 mtdblock4
[    6.903938]  (driver?)
[    6.982144] 1f05             512 mtdblock5
[    6.982147]  (driver?)
[    7.060351] 1f06              64 mtdblock6
[    7.060354]  (driver?)
[    7.138559] 1f07              64 mtdblock7
[    7.138562]  (driver?)
[    7.216767] 1f08              64 mtdblock8
[    7.216770]  (driver?)
[    7.294975] 1f09              64 mtdblock9
[    7.294978]  (driver?)
[    7.373181] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    7.472078] Rebooting in 1 seconds..

Should I tried the openwrt-ath79-nand-aerohive_hiveap-121-initramfs-kernel.bin image first ?

Yeah, why not, if it doesn't help it also doesn't hurt. Keep in mind the initramfs image is not for flashing, but for executing in-memory, so after transfering it with tftpboot you would run it using (if I remember correctly) bootm 0x81000000

If it runs (and I think it will, it doesn't use UBI), you can ssh into OpenWrt and try to sysupgrade using the factory image.

I'mg getting a bad data crc when trying to boot the image from RAM:

ar7240> tftpboot 0x81000000 openwrt-ath79-nand-aerohive_hiveap-121-initramfs-kernel.bin
Trying eth0
dup 1 speed 1000
WASP  ----> F1 PHY *
: cfg1 0xf cfg2 0x7315
dup 1 speed 1000
Using eth0 device
TFTP from server 192.168.0.100; our IP address is 192.168.0.204
Filename 'openwrt-ath79-nand-aerohive_hiveap-121-initramfs-kernel.bin'.
Load address: 0x81000000
Loading: T T #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################T ################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ######################################
done
Bytes transferred = 4852912 (4a0cb0 hex)
ar7240> bootm 0x81000000
Bad Data CRC
ar7240> bootm
Bad Data CRC
ar7240>

Note that other image are not giving me the bad data CRC but still unable to proceed with a clean boot.

Any other idea that I could explore ?

if someone from this forum has a stock image for Aerohive AP 121 that could work with my boot loader (version 1.0.0.25) maybe I could try to load it again and then try to upload my boot loader to attempt to run OpenWrt image on it.
If someone could share such image file it would be great (as I didn't find any way to download the stock image yet)

Thanks

That is ... very curious. Just to confirm I didn't spout nonsense I broke out one of my spare AP121s (currently running 19.07.7) and hooked it up. And it works first try:

ar7240> tftpboot 0x81000000 openwrt-ath79-nand-aerohive_hiveap-121-initramfs-kernel.bin
dup 1 speed 1000
dup 1 speed 1000
Using eth0 device
TFTP from server 192.168.1.10; our IP address is 192.168.1.1
Filename 'openwrt-ath79-nand-aerohive_hiveap-121-initramfs-kernel.bin'.
Load address: 0x81000000
Loading: #################################################################
(... and so on ...)
         ######################################
done
Bytes transferred = 4852912 (4a0cb0 hex)
ar7240> bootm 0x81000000
[    0.000000] Linux version 5.4.105 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16264-df26c29629)) #0 Fri Mar 19 10:00:19 2021
(... and so on ...)
Please press Enter to activate this console.



BusyBox v1.33.0 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r16264-df26c29629
 -----------------------------------------------------
=== 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:/# df -h
Filesystem                Size      Used Available Use% Mounted on
tmpfs                    59.9M      9.2M     50.7M  15% /
tmpfs                    59.9M     56.0K     59.8M   0% /tmp
tmpfs                   512.0K         0    512.0K   0% /dev
root@OpenWrt:/#

I'm a bit suspicious of that single "T" in the middle of your tftpboot transfer process, you may just want to try it again until you get a clean transfer.

If that still doesn't work, it might be a hint that the problem with the older bootloader is not with booting the image, but the actual transfer process. Which would explain a few things.

But again, I'm not a dev. I can make educated guesses, but for the actual debugging I'm really out of my depth here.

(In the meantime I amended the wiki article to at least give a strong warning if the bootloader is different from the ones confirmed working.)