Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#3890 - Kernel is wrongly encapsulated #8922

Closed
openwrt-bot opened this issue Jun 20, 2021 · 4 comments
Closed

FS#3890 - Kernel is wrongly encapsulated #8922

openwrt-bot opened this issue Jun 20, 2021 · 4 comments
Labels

Comments

@openwrt-bot
Copy link

openwrt-bot commented Jun 20, 2021

Mijzelf:

Device ZyXEL P2812HNU-F1

Flashing the sysupgrade of 21.02rc3 bricks the router. Apparently there is a checksum error in the flashed kernel:

NAND read: device 0 offset 0x60000, size 0x200000
2097152 bytes read: OK

Booting kernel from Legacy Image at 80800000 ...

Image Name: MIPS OpenWrt Linux-5.4.124
Created: 2021-06-13 22:02:19 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 2465658 Bytes = 2.4 MiB
Load Address: 80002000
Entry Point: 80002000
Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!

Further, don't know if it is related, booting the initramfs-kernel.bin doesn't work either:

P-2812HNU-F1 # bootm $fileaddr

Booting kernel from Legacy Image at 81000000 ...

Image Name: MIPS OpenWrt Linux-5.4.124
Created: 2021-06-13 22:02:19 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 5608365 Bytes = 5.3 MiB
Load Address: 80002000
Entry Point: 80002000
Verifying Checksum ... OK
Uncompressing Kernel Image ... LZMA: uncompress or overwrite error 7 - must RESET b

When tftpbooting the kernel found in the imagebuilder,
openwrt-imagebuilder-21.02.0-rc3-lantiq-xrx200.Linux-x86_64/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/zyxel_p-2812hnu-f1-kernel.bin
the kernel boots fine (and uses the rootfs which is currently flashed in ubi), and has the same size and timestamp as the one from sysupgrade:

bootm $fileaddr

Booting kernel from Legacy Image at 81000000 ...

Image Name: MIPS OpenWrt Linux-5.4.124
Created: 2021-06-13 22:02:19 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 2465658 Bytes = 2.4 MiB
Load Address: 80002000
Entry Point: 80002000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK

Starting kernel ...

So my guess is something went wrong in assembling the sysupgrade image, destroying the CRC.

I also tried the initramfs-kernel from the bt-homehub and the initramfs-kernel of snapshot for the p-2812hnu-f1, which both gave the same lzma decompress error.

@openwrt-bot
Copy link
Author

openwrt-bot commented Jun 20, 2021

Mijzelf:

Also tried snapshot sysupgrade. Same result, CRC error.

@openwrt-bot
Copy link
Author

openwrt-bot commented Jun 26, 2021

@openwrt-bot
Copy link
Author

openwrt-bot commented Jun 27, 2021

Mijzelf:

Yes, you are right. Changing the u-boot environment solved the 1st problem. But that doesn't solve the initramfs-kernel problem. Tried also load address 0x88000000, but that gave the same lzma error.

/Edit: Should have read better. The stock u-boot in this box is exchanged, as it only boots signed images, or something like that. The current u-boot by default loads 2MiB and bootm that. I changed that to 3MiB, and now the CRC error is gone. But the lzma error on the initramfs-kernel still exists, and the same error occurs if I flash snapshot.

@openwrt-bot
Copy link
Author

openwrt-bot commented Jul 6, 2021

Mijzelf:

Solved. A 'new' u-boot which can extract more than 8MiB target size in combination with the adapted u-boot environment solved both problems.

More about the new u-boot here:
https://forum.openwrt.org/t/zyxel-p2812hnu-f1-u-boot/100281

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant