Compiling a C# kernel to bare metal and booting in QEMU
Posted: Fri Jan 05, 2024 10:20 am
Hello,
Just to say that I’ve managed to compile a very basic C# kernel to x86 machine code, and then successfully boot it in QEMU.
I've used the .Net AOT compiler that ships with .Net 7 / 8, as I found the C Sharp Bare Bones tutorial on OSDev Wiki quite out of date.
The repo for my kernel is here: PatienceOS (nb. ignore the 'OS' moniker, high ambitions I guess) and an accompanying blog post with more details here: Compiling a C# kernel to bare metal and booting in QEMU.
Posting this here, in case anyone else is interested in compiling a bare bones, bare metal, C# .Net kernel using contemporary versions of .Net.
Frank
Just to say that I’ve managed to compile a very basic C# kernel to x86 machine code, and then successfully boot it in QEMU.
I've used the .Net AOT compiler that ships with .Net 7 / 8, as I found the C Sharp Bare Bones tutorial on OSDev Wiki quite out of date.
The repo for my kernel is here: PatienceOS (nb. ignore the 'OS' moniker, high ambitions I guess) and an accompanying blog post with more details here: Compiling a C# kernel to bare metal and booting in QEMU.
Posting this here, in case anyone else is interested in compiling a bare bones, bare metal, C# .Net kernel using contemporary versions of .Net.
Frank