Kia ora All, I’m currently porting nerves to the Khadas VIM3 board and have got to the point its booting fine however fwup appears to be corrupting the written image - I have tested both fwup 1.13.2 and fwup 1.14.0 -
Khadas VIM3 (AMLogic A311D)
Mainline U-Boot 2024.01 (512-byte offset for SD card)
MBR partition layout with bootloader at sector 1 (512-byte offset)
Kernel panics with VFS: Unable to mount root fs on unknown-block(179,2)
The generated .fw image however contains a mountable squashfs filesystem
Corruption appears to occur with both mix burn and mix firmware.image - file headers appear intact but data is corrupted on raw_write() to root partition after byte 35 onward. Its reproducible using both zip and xz compression.
At the moment I’m getting a boot-able image by extracting the generated .fw file and using dd to write to sdcard
e.g. dd if=/dev/sda2 of=/tmp/extracted.img bs=512 count=524288
Passing the following in target.ex to use xz compression
It would be helpful if you could sharing your project that reproduces the issue.
Normally when people report corruption issues, they’re due to having some other part of the fwup.conf overwrite the part that’s getting corrupt. That’s what I’d check.
Using xz or gzip for SquashFS compression shouldn’t make a difference, but I’d stick with gzip to minimize the number of changes you’re making.
Yeah USB mass storage device at the moment and mix burn to write image to sdcard card - as mentioned uboot / boot sector are written fine root fs ends up corrupted so having to manually write using dd at correct offset.
I’ll get the repo public later today - just cleaning up a couple of hard codes in the boot configuration so they are following nerve conventions correctly
Thanks. I just tried your repository and got an error when running fwup due to the U-Boot environment block and U-Boot image overlapping. I know this isn’t the problem that you reported, but I wanted to get a clean image before checking anything. I sent you a PR to fix the overlap.