Unable to flash hAP lite RB941-2nD-TC

Hi,

I've attempted to troubleshoot this myself but I've come up short and wanted to know if anyone had any ideas. I have a Mikrotik RB941-2nD-TC hAP lite router that I'm trying to flash with OpenWRT, I've flashed older Mikrotik routers with LEDE without any issues in the past.

I'm able to get it to run OpenWRT from RAM, and when I try to run sysupgrade it looks like it takes and reboots, but when it reboots it's always back to its original firmware.

I've tried this with the sysupgrade.bin files I found on the website here and I also checked out the project from git and attempted to make my own image following the directions here.

I noticed that in those directions they mention having to enable support for the RB941-2nD in the kernel_menuconfig, but I couldn't find that as a listed option with the other Mikrotiks. Is there something I'm missing or has OpenWRT dropped support for this type of Routerboard in newer versions?

Hi, I have same problem with RB941-2nD. Boot from TFTP works, after sysupgrade ( from both webgui and konsole) device reboot to original firmware. Tried actual OpenWRT, older LEDE, nothing works.....

Can you post dmesg from initramfs?
I am pretty sure that its due to newer revision of flash

There is dmesg of openwrt-18.06.1-ar71xx-mikrotik-rb-nor-flash-16M-initramfs-kernel.bin

[    0.000000] Linux version 4.9.120 (buildbot@builds-03.infra.lede-project.org) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7101-a63e38b) ) #0 Wed Aug 15 20:42:39 2018
[    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 804757d4, 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:0D:31:3F board=H951L board=H951L board_rev=r2 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: 25228K/32768K available (3578K kernel code, 153K rwdata, 452K rodata, 2400K init, 217K bss, 7540K 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.008888] Calibrating delay loop... 432.53 BogoMIPS (lpj=2162688)
[    0.071955] pid_max: default: 32768 minimum: 301
[    0.077315] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.084826] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.096104] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.107321] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.115636] NET: Registered protocol family 16
[    0.125564] MIPS: machine is MikroTik RouterBOARD 941-2nD
[    0.373525] Can't analyze schedule() prologue at 803dae54
[    0.394059] clocksource: Switched to clocksource MIPS
[    0.400946] NET: Registered protocol family 2
[    0.406954] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.414939] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.422162] TCP: Hash tables configured (established 1024 bind 1024)
[    0.429499] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.436182] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.443588] NET: Registered protocol family 1
[    0.448618] PCI: CLS 0 bytes, default 32
[    2.574069] random: fast init done
[    3.004353] Crashlog allocated RAM at address 0x1f00000
[    3.011614] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    3.026278] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    3.032894] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    3.144893] io scheduler noop registered
[    3.149348] io scheduler deadline registered (default)
[    3.155701] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    3.165651] console [ttyS0] disabled
[    3.189854] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 1562500) is a 16550A
[    3.199655] console [ttyS0] enabled
[    3.207207] bootconsole [early0] disabled
[    3.222330] m25p80 spi0.0: unrecognized JEDEC id bytes: ef, 70, 18
[    3.229931] libphy: Fixed MDIO Bus: probed
[    3.365817] libphy: ag71xx_mdio: probed
[    3.996394] ag71xx-mdio.1: Found an AR934X built-in switch
[    4.049977] eth0: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[    4.057724] NET: Registered protocol family 10
[    4.065938] NET: Registered protocol family 17
[    4.070595] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    4.084030] 8021q: 802.1Q VLAN Support v1.8
[    4.108452] Freeing unused kernel memory: 2400K
[    4.113146] This architecture does not have kernel memory protection.
[    4.134971] init: Console is alive
[    4.138769] init: - watchdog -
[    4.165102] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.174904] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.183371] init: - preinit -
[    4.402837] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    4.431664] random: procd: uninitialized urandom read (4 bytes read)
[    6.036533] eth0: link up (1000Mbps/Full duplex)
[    6.041348] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    7.585684] eth0: link down
[    7.601276] procd: - early -
[    7.604479] procd: - watchdog -
[    8.158617] procd: - watchdog -
[    8.162174] procd: - ubus -
[    8.173538] random: ubusd: uninitialized urandom read (4 bytes read)
[    8.215667] random: ubusd: uninitialized urandom read (4 bytes read)
[    8.222729] random: ubusd: uninitialized urandom read (4 bytes read)
[    8.230362] procd: - init -
[    8.419174] kmodloader: loading kernel modules from /etc/modules.d/*
[    8.430031] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    8.446860] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[    8.455203] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[    8.465435] ip_tables: (C) 2000-2006 Netfilter Core Team
[    8.479543] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[    8.544924] xt_time: kernel timezone is -0000
[    8.608994] PPP generic driver version 2.4.2
[    8.616059] NET: Registered protocol family 24
[    8.666827] ath: EEPROM regdomain: 0x0
[    8.666838] ath: EEPROM indicates default country code should be used
[    8.666841] ath: doing EEPROM country->regdmn map search
[    8.666859] ath: country maps to regdmn code: 0x3a
[    8.666864] ath: Country alpha2 being used: US
[    8.666868] ath: Regpair used: 0x3a
[    8.678392] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[    8.683051] ieee80211 phy0: Atheros AR9531 Rev:2 mem=0xb8100000, irq=47
[    8.724611] kmodloader: done loading kernel modules from /etc/modules.d/*
[    9.871082] urandom_read: 5 callbacks suppressed
[    9.871091] random: jshn: uninitialized urandom read (4 bytes read)
[   20.405695] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   20.428641] br-lan: port 1(eth0.1) entered blocking state
[   20.434310] br-lan: port 1(eth0.1) entered disabled state
[   20.440303] device eth0.1 entered promiscuous mode
[   20.445316] device eth0 entered promiscuous mode
[   20.577103] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   20.642593] IPv6: ADDRCONF(NETDEV_UP): eth0.2: link is not ready
[   22.046631] eth0: link up (1000Mbps/Full duplex)
[   22.051441] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   22.114211] br-lan: port 1(eth0.1) entered blocking state
[   22.119805] br-lan: port 1(eth0.1) entered forwarding state
[   22.125799] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.2: link becomes ready
[   22.278215] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   49.075783] eth0: link down
[   49.080458] br-lan: port 1(eth0.1) entered disabled state
[   50.606194] eth0: link up (1000Mbps/Full duplex)
[   50.612177] br-lan: port 1(eth0.1) entered blocking state
[   50.617848] br-lan: port 1(eth0.1) entered forwarding state
[  128.524105] random: crng init done
root@OpenWrt:~# 

Like I thought

m25p80 spi0.0: unrecognized JEDEC id bytes: ef, 70, 18

It uses a newer revision SPI NOR flash.
You can make a build with this patch applied.
I was waiting for upstream to accept my patch for this,but it has been waiting for months so I am gonna submit it to the OpenWrt mailing list today.

Thank you, but I'm not a developer. Now I'm studying the compilation of my own image with a patch, but I probably will have to wait for the official release ..... But thank you for the information.

Ok, will build 18.06.1 based image with the patch for you

Can you try this?
https://drive.google.com/drive/folders/1znRoqNJ3HX6MUW2ME1sUIS2T2MblvMiU?usp=sharing

1 Like

I try it in the morning, now I'm not at the device

Wow, we must all be on very different time-zones, I'll try this patch / image and see if they stick, will post results shortly.

The initramfs-kernel.bin and sysupgrade.bin files you shared on drive worked, the router persists with OpenWRT between power-downs and reboots. Thanks robimarko! I'll probably end up using the patch you listed to compile an image myself, but is there any info you'd want me to pull from the device that might help you when submitting your stuff to the mailing list?

Nothing since I know it works.
Thats why I submited it upstream in June but its been just sitting there.

1 Like

I confirm that your build works. Thanks robimarko!

1 Like

Robimarko, thanks a lot of for your patches. It works. But I need to install openvpn-openssl into this patched kernel. Do you know how to avoid this problem:

root@OpenWrt:~# opkg install openvpn-openssl
Installing openvpn-openssl (2.4.5-4) to root...
Downloading http://downloads.openwrt.org/releases/18.06.1/packages/mips_24kc/base/openvpn-openssl_2.4.5-4_mips_24kc.ipk
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for openvpn-openssl:
 *      kernel (= 4.9.120-1-1be0120c02e6cc24c38bf656ea23010f) * 
 * opkg_install_cmd: Cannot install package openvpn-openssl.

???

Many thanks in advance for possible assistance.

There is no avoiding it, you can only build with the flash patch applied and include that kernel mod.

Thank you zsman/robimarko for this post.
It’s very helpful however,
I am stuggling to flash this image into ram let alone do a upgrade with final image.

Could you provide details of how you tftp’d this image on to this device.

I followed the details on the wiki, held button.
Ran the loader.sh
Enabled Ethernet NAND once, dchp, backup Bootloader
It appears to stall at hostname openwrt

Could you assist.
Thanks in advance.

For flashing I use this method (from OpenWrt Wiki)

  • Run script loader.sh from root/sudo
  • Unplug power jack
  • Hold reset button
  • Plug power jack
  • After LEDS stopped blinking release reset button

Then move ethernet cable from port1(WAN) to port 2(LAN) and connect browser to 192.168.1.1. Then flash image (from Luci)

Thank you Zsman for the reply

I was unaware that I had unplug the WAN Ethernet and re-plug into Ether2.

I had wrongly assumed that loader.sh would provide some feedback after successful flash.

I am up and running. Thanks again for your time.

Robimarko, I did it. My hap lite was successfully booted with initramfs and after that flashed with your kernel. But I wanted more and more :slight_smile: So I compiled my own firmware for RB941 with openvpn-openssl and luci support. There were no problems with compilation. So I decided to sysupgrade it with compiled kernel. After that my hap lite lost connection with this world. All my attepmpts to unbrick it with Netinstall from Mikrotik Howto are unsuccessfull. Any idea?

Did you also apply the SPI NOR patch in your build?
If no,then you know the reason why it does not work.

But you should be able to boot initramfs image that contains the patch.
You cant use Netinstall since the boot protocol is switched to DHCP