Wavlink WL-WN570HA1 stuck in initramfs mode

The device link is here . TFTP install never worked for me (device is connected with direct cable to laptop, never seen any tftp request while booting the device). But - there is some "uboot" web page pops up when boot the device with "Reset" button pressed on 192.168.10.1 address. It allows to upload .*initramfs-kernel.bin image and flash it. This works, but the device requires .*sysupgrade-squashfs.bin to leave the initramfs mode. And this never worked. Wht I tried:

  1. Flash.sysupgrade. from Luci webui
  2. Flash .sysupgrade. from console after scp-ing it
  3. Found out that device has unsupported spi-nor flash. Made the kernel patch, compiled the image from the snapshot and flashed back. Kernel error went away from log. But .sysupgrade. still can't be flashed.

By "can't be flashed" I mean that every time after device reboots after .*sysupgrade image flash - I still see yellow banner "the device is in Initramfs mode", and any configuration change will be discarded on the next reboot.
It looks like it fails to flash .sysupgrade. image at all, 'cause if I use sysupgrade of version different from just flashed .*kernel - the version is still from .*kernel. But is there any way to see logs from image flash? Even console kicks me off immediately after starting "sysupgrade" command, web interface is alos not useful here.

It also might happen that device has locked bootloader which prevents TFTP from requesting. I saw how to modify it in Connor's guide, but it is for the original firmware and the device is slightly different (mine didn't have any telnet or webcmd open in base firmware at all). So if there is any instruction how to override the bootloader from the Openwrt console - I would be appreciated.

Also if anyone saw something similar and knows the solution (at least possible one) - this would also be just awesome.

Disclaimer: my knowledge here is quite limited so I can ask some dummy questions, sorry about that.

The general approach is actually shown on the product page.
Run cat /proc/mtd first and get the name associated with mtd1, it will be something like "Boot".
Then this is what I have in my old notes:

insmod mtd-rw i_want_a_brick=1
mtd write /tmp/new_bootloader.bin {mtd1 partition name}

That requires a package kmod-mtd-rw

You can also see an example here

You do this at your own risk. There is a possibility that your flash chip is not supported by the new bootloader.

1 Like

Thanks @AndrewZ , before trying this another question coming up to my mind - is it possible to flash the root partition itself with mtd? Maybe I can generate partition contents together with .*squashfs package, or extract it from there? I guess this is less harmful, 'cause in case of failure u-boot partition is still alive and I can get the device in initramfs mode at least (IIUC). I completely understand that flashing u-boot may brick the device forever with much bigger probability and want to try this as a last resort.

Yes, it should be possible to write any partition with mtd.
I would open the device and connect a serial console, that way it should be possible to see why the normal flashing process does not work.

Hi, are there some news on this?
I'm in the same situation with a wl-wn570hn2 rev b
only failsafe mode is working and I'm unable to flash the sysupgrade firmware.
Did You found the steps to flash a persistent firmware?
thanks in advance

Found solution
This version has a different memory and it is not supported inside sysupgrade firmware
I found a patched version that let You install 23.05 firmware permanenlty:
Morpheus github sysupgrade fiwmare
Thanks to Morpheus68

Ok, what finally helped me is to install it from bootloader mode (using USB-TTL adapter). I built manually 23.05 version with memory patch (the only custom change) and from bootloader it was successfully installed & has been working successfully for a couple of months.

I didn’t used serial adapter
Just used Uboot UI (activated using reset button while powering on) and upload patched sysupgrade file…

How did you install it? I've updated uboot and gotten it to download the image via tftp but it complains that the image is too large. Looks like a limitation of some tftp clients but I haven't figured out a workaround yet.

I setup a build environment to attempt building my own image but have not been successful so far.

Hi. I have followed carefully what is written in the forum to install openwrt on wl-wn570hn2 rev b. I have not succeeded using Morpheus github sysupgrade fiwmare and TFTPD64 version. Can you help me?

hi
after many test by suggestions in this forum nothing worked for me.
Exept before 5 minutes the Wavlink WL-WN570HA1 got openwrt 23.05 !!!!
No using USB-TTL adapter only via browser + network cable
I used the Morpheus github sysupgrade fiwmare thanks to Morpheus68
OpenWrt/23.05/Wavlink/AERIAL HD2 WN570HA1
/mini /openwrt-ramips-mt76x8-wavlink_wl-wn570ha1-squashfs-sysupgrade.bin

Direct link
https://github.com/Morpheus68/OpenWrt/raw/main/23.05/Wavlink/AERIAL%20HD2%20WN570HA1/mini/openwrt-ramips-mt76x8-wavlink_wl-wn570ha1-squashfs-sysupgrade.bin

  1. download it
  2. turn the WN570HA1 off
  3. press reset and turn the power on
    3 . connect the network cable to laptop
  4. manage the network settings to 192.168.10.100 / 255.255.255.0
  5. go to 192.168.10.1 and find the downloaded file and then choose upload.
  6. after successful uploading (or 5min max) change network settings to 192.168.1.10 / 255.255.255.0
  7. Go to browser 192.168.1.1

There is luci waiting in new colors and layout !!!

So basically some key things helped me:

  1. Patch with support of flash memory chip - found somewhere in this topic Wavlink WL-WN570HA1 - new release hardware - #30 by frollic. Or here is the patch
  2. Apply this patch and build the firmware manually (there are tons of instructions how to do both, I can recall, but not right now)
  3. Please be aware that device has limitation for firmware about 7.6-7.8Mbytes. Otherwise the last step of firmware build will just fail and won't produce squashfs image, only initramfs one. One way to reduce is to remove unnecessary packets from a list of installed (I needed batman + dependencies so had to sacrifice with something like firewall etc.). After 5-6 attempt I guessed with size
  4. I could flash squashfs only using USB-TTL device. Uboot didn't work well for me. But with the device it's fairly simle. I bought simplest device with 3.3/5V support + 4 wires clamp on Aliexpress (clamp, USB-TTL). This allowed me to skip soldering which I'm not in good at all.
1 Like