How do I calculate the CRC32 of u-boot header?

I have the following router hardware: NBG-419N v2
I'm trying to flash openwrt to it, the web OEM way fails with a message: not a valid firmware
So I went ahead and tried the TFTP way, but in step 3 it says:

count new CRC32 of u-boot header (64 bytes) and write next 4 bytes (7A BE 7A CE for openwrt-18.06.5-ramips-rt305x-nbg-419n2-initramfs-kernel.bin)

Where does the "u-boot" header of 64bytes starts and ends? and how do I re-calculate it? (I used crc32 tool on linux, but I can't seem to get the right value, maybe I'm counting the wrong 64 bytes)

the header is at the start of the file
Clear the checksum by putting 00 00 00 00 in bytes 4-7
run crc32 over the header "64 bytes default"
the crc32 value will match the value that was in the checksum bytes 4-7
I use the windows "Hex Workshop" to do this

1 Like

yep that worked. I didn't know I had to reset the checksum to zero :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.