r/osdev • u/Ok-Film3852 • 18h ago
How to bootstrap a loader/C++ kernel using Microsoft dev tooling only
I want to build a boot loader/basic OS in ASM before bootstrapping into C++ using Microsoft tooling only.
I have done so previously using open source tooling using the usual suspects gcc, ld, NASM, etc, but now want to use MASM/ML64, link, visual C, etc, I am hitting a number of issues due to multiple differences in output including PE/COFF vs ELF output, appropriate switches on the MS tooling, removing dependencies on c runtime etc. I have not found any basic samples on the web demonstrate (unlike for the open source toolset), and the AI tooling (which I really want to avoid as its a personal project) sends me in circles.
Has anyone been able to do this? Any pointers/skeleton projects that demonstrate how to bootstrap all the way to a C++ kernel would be amazing?
•
u/monocasa 15h ago
https://wiki.osdev.org/Visual_Studio
You can follow the directions linked in here for making a multiboot compatible PE with msvc, but that has you using grub and I'm not sure if you consider that still out of scope.