I managed to access the serial console, boot the initramfs, backup the original firmware, but flashing the sysupgrade firmware from the web console or using the sysupgrade command as instructed results in a boot error, including "Bad FIT kernel image format!" from the bootloader (I assume).
Is this expected? Did I do something wrong? I’m ready to give any information that might help.
How should I differentiate between the two?
If it matters, I also tried to flash the rg-e5 image at some point, with the same result (though I may have been on the wrong initramfs then).
Alright, so I built two images: one with the default dts and one with topo22’s dts. None of them worked, so I thought I would reflash the original firmware to capture its logs and figure out what the offsets are on my router.
…And now mtd write /tmp/firmware.bin /dev/mtd7 doesn’t restore a bootable state anymore for some reason. Did I destroy some data at some point or something?
Hello, it’s been some time but I think I managed to get sysupgrade to work.
So, the DTS from the other thread is too different from the current one to work I think (I think I remember testing it last time but I’m not sure I did).
I extracted the DTS from my backed up firmware (as mentionned in the instructions) using binwalk, and adjusted the relevant partition offsets, as in the other thread.
This gives me the following DTS and patch (I think the offsets are actually the same):
Okay, so I’ve narrowed down my issues to fw_printenv hangs using 50% of CPU according to top, which blocks most of the boot process.
Now I just need to figure out why…
Pinging @frollic in case you haven’t set this thread to “watch”, you might be interested.
Changing both 0x20000 to 0x10000, removing /tmp/lock/fw_printenv.lock and running fw_printenv seems to work. I saw that it’s created by /etc/uci-defaults/30_uboot-envtools but the only place I can find this file is in the build and staging directories: where should I change it in the source?