New hAP lites and hAP minis using different flash, unable to boot OpenWrt

Hi folks,

I wanted to start a separate thread since this observation is technically separate from my original topic. I'm trying to flash some new hAP minis (RB931-2nD) and hAP lites (RB941-2nD) with OpenWRT, but the previous images I've been using (as well as the newest snapshots) aren't working, I can't get the initramfs-kernel.bin to boot up correctly on the device. It gets sent to the device, which appears to reboot but then any attempt to ssh into the device hangs. Since I can't get into the router once the initramfs-kernel.bin is pushed to it. I'm not sure how to get info on the problem.

A cursory review of the components on the board shows that the new routers are using Winbond 25Q128JVSM for flash instead of Winbond 25Q128FVSG, which the older ones had been using. The distinction seems to be meaningful when mentioned on the wiki for a different MikroTik: https://openwrt.org/toh/mikrotik/mikrotik_rbm33g

Given that there's not a listed installation for the Winbond 25Q128JVSM, does that mean that OpenWRT isn't currently compatible with the new hAP minis and lites?

If you use snapshots then it will work as support was added for that revision of SPI NOR

That's what I thought as well, but using images from the snapshot didn't work either. I tried images that specifically added that support from an earlier forum thread but they also failed, it's only this latest version of routers that changed the physical component, as near as I can tell. However, I will double check this and report back.

Edit: Did not mean to quote there.

Hm, that should not happen as support for 16MiB version of JV series was added months ago.
Are you sure that its failing on flash?

Can you boot initramfs and then get dmesg output?

It's hard to say, from my perspective I can't get the initramfs to boot up correctly on the device. I can see that it gets sent to the device, it appears to reboot but then any attempt to ssh into the device hangs for a while and then times out. Since I can't SSH in when it's running the initramfs, I'm not sure how to grab the dmesg output, is there any other way I could access it that I'm not aware of?

You could connect to UART pads inside

Hello.

I have similar hAP Lite hardware (RB941-2nD) with flash memory 25Q128JVSM.
I managed to run the openwrt-18.06.2-ar71xx-mikrotik-rb-nor-flash-16M-initramfs-kernel firmware in RAM mode.
When I try to write a sysupgrade.bin image to a flash via LuCI, I get the error:

The uploaded image file does not contain a supported format. Make sure that you choose the generic image format for your platform

The firmware through the console gives an error:

Invalid image. Use * -sysupgrade.bin files on this board
Image check 'platform_check_image' failed

The dmesq output is below.

> [    0.000000] Linux version 4.9.152 (buildbot@builds-03.infra.lede-project.org) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7627-753531d) ) #0 Mon Jan 28 08:54:32 2019
> [    0.000000] bootconsole [early0] enabled
> [    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
> [    0.000000] SoC: Qualcomm Atheros QCA9533 ver 2 rev 0
> [    0.000000] Determined physical RAM map:
> [    0.000000]  memory: 02000000 @ 00000000 (usable)
> [    0.000000] User-defined physical RAM map:
> [    0.000000]  memory: 02000000 @ 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-0x0000000001ffffff]
> [    0.000000] Movable zone start for each node
> [    0.000000] Early memory node ranges
> [    0.000000]   node   0: [mem 0x0000000000000000-0x0000000001ffffff]
> [    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000001ffffff]
> [    0.000000] On node 0 totalpages: 8192
> [    0.000000] free_area_init_node: node 0, pgdat 8047d994, node_mem_map 81000020
> [    0.000000]   Normal zone: 64 pages used for memmap
> [    0.000000]   Normal zone: 0 pages reserved
> [    0.000000]   Normal zone: 8192 pages, LIFO batch:0
> [    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
> [    0.000000] pcpu-alloc: [0] 0
> [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
> [    0.000000] Kernel command line: no-uart no-buzzer no-nand parts=1 boot_part_size=16777216 gpio=8537647 HZ=325000000 mem=32M kmac=B8:69:F4:8C:EB:9A board=H951L board=H951L hw_opt=28284001 boot=0 mlc=11 console=ttyS0,115200 rootfstype=squashfs noinitrd
> [    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
> [    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
> [    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
> [    0.000000] Writing ErrCtl register=00000000
> [    0.000000] Readback ErrCtl register=00000000
> [    0.000000] Memory: 25236K/32768K available (3602K kernel code, 161K rwdata, 456K rodata, 2364K init, 209K bss, 7532K 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:650.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:25.000MHz
> [    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 5880801374 ns
> [    0.000009] sched_clock: 32 bits at 325MHz, resolution 3ns, wraps every 6607641598ns
> [    0.008889] Calibrating delay loop... 432.53 BogoMIPS (lpj=2162688)
> [    0.071955] pid_max: default: 32768 minimum: 301
> [    0.077312] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
> [    0.084826] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
> [    0.096128] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
> [    0.107349] futex hash table entries: 256 (order: -1, 3072 bytes)
> [    0.115687] NET: Registered protocol family 16
> [    0.125563] MIPS: machine is MikroTik RouterBOARD RB941-2nD
> [    0.373723] Can't analyze schedule() prologue at 803e10e4
> [    0.394641] clocksource: Switched to clocksource MIPS
> [    0.401509] NET: Registered protocol family 2
> [    0.407539] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
> [    0.415524] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
> [    0.422753] TCP: Hash tables configured (established 1024 bind 1024)
> [    0.430090] UDP hash table entries: 256 (order: 0, 4096 bytes)
> [    0.436775] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
> [    0.444177] NET: Registered protocol family 1
> [    0.449212] PCI: CLS 0 bytes, default 32
> [    2.574650] random: fast init done
> [    3.003178] Crashlog allocated RAM at address 0x1f00000
> [    3.010592] workingset: timestamp_bits=30 max_order=13 bucket_order=0
> [    3.024968] squashfs: version 4.0 (2009/01/31) Phillip Lougher
> [    3.031585] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
> [    3.143929] io scheduler noop registered
> [    3.148451] io scheduler deadline registered (default)
> [    3.154777] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
> [    3.164782] console [ttyS0] disabled
> [    3.188958] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 1562500) is a 16550A
> [    3.198760] console [ttyS0] enabled
> [    3.206313] bootconsole [early0] disabled
> [    3.221714] m25p80 spi0.0: found w25q128jv, expected m25p80
> [    3.236885] m25p80 spi0.0: w25q128jv (16384 Kbytes)
> [    3.287020] Creating 6 MTD partitions on "spi0.0":
> [    3.291994] 0x000000000000-0x00000000e000 : "routerboot"
> [    3.322169] 0x00000000e000-0x00000000f000 : "hard_config"
> [    3.352369] 0x00000000f000-0x000000010000 : "bios"
> [    3.381867] 0x000000010000-0x00000001f000 : "routerboot2"
> [    3.412044] 0x00000001f000-0x000000020000 : "soft_config"
> [    3.442343] 0x000000020000-0x000001000000 : "firmware"
> [    3.473372] libphy: Fixed MDIO Bus: probed
> [    3.609215] libphy: ag71xx_mdio: probed
> [    4.236968] ag71xx-mdio.1: Found an AR934X built-in switch
> [    4.290582] eth0: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
> [    4.298518] NET: Registered protocol family 10
> [    4.306752] NET: Registered protocol family 17
> [    4.311408] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
> [    4.324847] 8021q: 802.1Q VLAN Support v1.8
> [    4.349014] Freeing unused kernel memory: 2364K
> [    4.353702] This architecture does not have kernel memory protection.
> [    4.376795] init: Console is alive
> [    4.380574] init: - watchdog -
> [    4.406890] kmodloader: loading kernel modules from /etc/modules-boot.d/*
> [    4.416603] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
> [    4.425225] init: - preinit -
> [    4.643431] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
> [    6.277111] eth0: link up (1000Mbps/Full duplex)
> [    6.281922] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
> [    7.812539] eth0: link down
> [    7.828284] procd: - early -
> [    7.831368] procd: - watchdog -
> [    8.408407] procd: - watchdog -
> [    8.411944] procd: - ubus -
> [    8.423317] random: ubusd: uninitialized urandom read (4 bytes read)
> [    8.465496] random: ubusd: uninitialized urandom read (4 bytes read)
> [    8.472555] random: ubusd: uninitialized urandom read (4 bytes read)
> [    8.480204] procd: - init -
> [    8.669590] kmodloader: loading kernel modules from /etc/modules.d/*
> [    8.680488] ip6_tables: (C) 2000-2006 Netfilter Core Team
> [    8.697297] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
> [    8.705643] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
> [    8.715892] ip_tables: (C) 2000-2006 Netfilter Core Team
> [    8.730163] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
> [    8.795382] xt_time: kernel timezone is -0000
> [    8.859224] PPP generic driver version 2.4.2
> [    8.866411] NET: Registered protocol family 24
> [    8.917468] ath: EEPROM regdomain: 0x0
> [    8.917479] ath: EEPROM indicates default country code should be used
> [    8.917482] ath: doing EEPROM country->regdmn map search
> [    8.917500] ath: country maps to regdmn code: 0x3a
> [    8.917506] ath: Country alpha2 being used: US
> [    8.917509] ath: Regpair used: 0x3a
> [    8.929197] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
> [    8.933953] ieee80211 phy0: Atheros AR9531 Rev:2 mem=0xb8100000, irq=47
> [    8.975190] kmodloader: done loading kernel modules from /etc/modules.d/*
> [   10.107050] urandom_read: 5 callbacks suppressed
> [   10.107060] random: jshn: uninitialized urandom read (4 bytes read)
> [   10.178003] random: jshn: uninitialized urandom read (4 bytes read)
> [   21.177901] br-lan: port 1(eth0) entered blocking state
> [   21.183319] br-lan: port 1(eth0) entered disabled state
> [   21.189201] device eth0 entered promiscuous mode
> [   21.247434] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
> [   23.297161] eth0: link up (1000Mbps/Full duplex)
> [   23.324712] br-lan: port 1(eth0) entered blocking state
> [   23.330129] br-lan: port 1(eth0) entered forwarding state
> [   23.354709] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready

How can I run OpenWRT on this revision?

I managed to solve the problem. Thank robimarko
I downloaded the corrected firmware from here and recorded the image in memory with the –F key.
Without it, an error occurs

Device unknown not supported by this image

What the result? 18.06.1 is stable for you? Everything works and fine?
–F key via SSH install or LUCI?

I have no success with flashing 18.06.1 and 18.06.2. In 18.06.3 no any fix in plans as I see.
I don't want to brick device, that's my last working router :smiley:

So:

  1. Development Snapshot builds is flashed.
    Linux version 4.14.125 (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r10243-4d11c4c378))
  2. Luci not installed by default.
  3. After installing won't work:
    Powered by LuCI Master (f138fc93) / OpenWrt SNAPSHOT r10243-4d11c4c378

/usr/lib/lua/luci/dispatcher.lua:247: /etc/config/luci seems to be corrupt, unable to find section 'main'
stack traceback:
[C]: in function 'assert'
/usr/lib/lua/luci/dispatcher.lua:247: in function 'dispatch'
/usr/lib/lua/luci/dispatcher.lua:144: in function </usr/lib/lua/luci/dispatcher.lua:143>

  1. service rpcd restart -> but no login.
  2. lighttpd -> validation failed

Any good working LUCI instead snaps repository?
src/gz openwrt_luci http://downloads.openwrt.org/snapshots/packages/mips_24kc/luci

I managed to fix it. I kept getting the error:

Cannot save config while running from ramdisk.
Commencing upgrade. Closing all shell sessions.
Killed

I ended up using the command

sysupgrade -n -v openwrt-19.07.2-ar71xx-mikrotik-rb-nor-flash-16M-squashfs-sysupgrade.bin