FS#3057 - ramips/mt7621/edimax_ra21s boot failure with kernel 5.4 #8094
Boot fails on snapshot images with kernel 5.4
Partial serial console log with an official snapshot image. The boot process hangs after printing the kernel version line:
Partial serial console log after booting an image I compiled myself. An LZMA error is displayed and the device gets into a reboot loop:
With the patch below, the device boots correctly:
Note that the patch should also work on the edimax_rg21s, which has identical hardware. I've not tested on that device. The bootloader searches for the default tftp image uImage_ELECOM-WRC-2533GHBK-I, so it's likely that more devices exist that are based on the same ELECOM WRC-2533GHBK-I hardware:
The text was updated successfully, but these errors were encountered:
I can confirm that my Edimax RG21S fails to boot from the kernel in the official nightly build from the website. It hangs right after the following output:
When I build the image myself from git, using the device profile for the RG21S, it boots successfully. So the following was suggested to me on IRC:
I compared my self-built kernel with the downloaded version, and it was indeed smaller (2331557 vs. 2444793 bytes). Using the "config.buildinfo" from this page, I built a similarly-configured image (e.g., with all modules enabled) that was larger in size: https://downloads.openwrt.org/snapshots/targets/ramips/mt7621/
After flashing my new (larger) self-built image, I ran into the same result as the image downloaded from openwrt.org, i.e., it fails to boot. So I gradually cut down on the kernel modules to see if I could find some threshold for where the failure occurs. Here is the summary of all the kernels that I attempted, along with their respective sizes:
2444793 bytes (downloaded): Fails to boot
So, it seems that the threshold where it fails is somewhere between 2433139 and 2437280 bytes.
Here is the log of the kernel that begins booting but panics (when comparing with a successful boot, it seems normal to me until the last 3 lines):
BTW, the bootloader on the RG21S might be configured slightly differently than on the RA21S. The RG21S does not attempt TFTP recovery unless you enter "2" from the boot menu in the serial console, and the default file name it looks for is "uImage_EDIMAX-6877AC-RG21S".
Your RG21S error appears to be the same issue as mine, so I'm pretty sure that the $(Device/uimage-lzma-loader) patch to target/linux/ramips/image/mt7621.mk will work for you too.
It has been fixed for some devices. E.g. https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=ad19751edc21ae713bd95df6b93be64bd1e0c612
On my RA21S, TFTP isn't automatic either. I also have to enter "2" in the boot menu.