The uImage header contains 2 CRCs and an image size. These three values must be modified.
The squashfs filesystem starts immediately after the compressed kernel (based on the size in the header), so if the compressed kernel size has changed, the squashfs must be dd’d into the correct place. Otherwise: VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
So the procedure is:
Modify kernel
Compress kernel
Put size and CRC of compressed kernel into header
Calculate CRC of header with null CRC, then put this CRC in the header.
Running crc32 50040.7z gave the expected 2e6a144 so I knew how to calculate the data CRC. The compressed image size in hex is wc -c 50040.7z | awk '{printf("%x",$1)}'.
As for moving the rootfs squashfs to the correct place, I don’t know how things work. That was just a guess based on the error messages and comparing the screen output between the working and broken versions. You’ll see that if you don’t move the squashfs then the following lines are missing (among others) showing a problem finding partitions:
[ 0.390000] 2 uimage-fw partitions found on MTD device firmware
[ 0.390000] 0x000000050000-0x00000016611c : "kernel"
[ 0.400000] 0x00000016611c-0x000000800000 : "rootfs"
I tried hexedit for the first time, so I needed to use https://linux.die.net/man/1/hexedit to find out the keyboard commands as it’s a little tricky.
Thanks for the details!
Something I miss from face-to-face classes is the ability to talk to everyone about how they arrive at the solutions they find - it’s really helpful to me to know when people ‘get’, and also helpful when i see where people are lead astray - both are what i keep in mind as i continually revise the content to gently (not too firmly, but not too gently either) guide people in the right direction.