Join GitHub today
Bootrom challenge #7
Using this toolchain:
The toolchain given by @tmagik does seem to be close. The relaxation and general compilation is good, but there are a few differences in optimization and codegen. My goal was to make a few small patches that are easy to audit. I've almost succeeded with C tweaks and patching asm, but unfortunately
ux00boot_ordered.c is made so I can re-order the code to match the image, without actually moving text in a way that would be hard to understand and audit.
Edit: riscv/riscv-gcc@07b59d4 looks related to the code I see in the shipped image, but using its parent commit or it, I can't seem to get a gcc that compiles the switch() like the ROM does.