I’ve pushed to github, see here for branch. and here for all code and commits. Most of the work is not mine, credit to developer wigyori.
Once you have built and written the SD card, a few tweaks are still needed.
- Copy an existing, working
fip.binonto the boot partition. OpenSBI hangs using the compiled file. - Rename
sd.boottoboot.sdso it matches the name the copied fip expects. This the file you could copy if you just want the new kernel, but note the load address change below. - The copied u-boot in fip will not auto-boot. Run the following at the u-boot prompt.
setenv uImage_addr 0x82000000
mmc dev 0 && fatload mmc 0 ${uImage_addr} boot.sd
bootm ${uImage_addr}