tosc-rs / mnemos

An Operating System for Building Small Computers
https://mnemos.dev
Apache License 2.0
260 stars 18 forks source link

x86 bootimage runner is bad and we should feel bad too #332

Closed hawkw closed 1 month ago

hawkw commented 1 month ago

so it turns out that the bootimage stuff for x86 is totally busted in a REALLY INFURIATING WAY: if you have built a kernel image and it's in your target dir, it will just run that. if you change the kernel and you run the x86 bootimage runner again, it will happily launch QEMU for you and RUN THE SAME KERNEL AGAIN instead of building you a new one. this sucks and is dumb and i hate myself for doing it.

TIME TO REWRITE THE BUILD SYSTEM AGAIN I GUESS LOL

hawkw commented 1 month ago

A stupid, flaky solution for this could be to just make the build script scream a giant pile of cargo:rerun-if-changed= to stdout for basically all paths in the repo except for the other platforms. However, I think it would be much nicer to turn the x86 QEMU bootimage runner thingy into a cargo runner binary, as I discussed in https://github.com/tosc-rs/mnemos/pull/326#issue-2459700790.