I'd like to build an embedded kernel for an x86 machine using Visual C++. I have some C and assembly code files to compile and I'd like to link them all together in a way that is compatible with a Multiboot bootloader like GRUB.
OSDev has a wiki entry on Visual Studio, that may provide some insight, especially with the links to Kaushik Srenevasan's blog entries on the subject of PE kernels designed to be loaded by multiboot-based bootloaders (like GRUB).
A couple of large, broad-strokes things you should know:
kmain
') needs to have __declspec(noreturn)
on it, and you will need to do an __asm { hlt }
instead of returning.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With