3 ms·
You're going to find more resources to get started on this in C. You might want to start by following guides etc in C until you can get a decent Hello World, ma
by toast0 4y ago
You're going to find more resources to get started on this in C. You might want to start by following guides etc in C until you can get a decent Hello World, maybe SMP (maybe not), and then see if you can do it again in Rust.
I'm going to offer some slight differences to junon's advice.
x86-32 is an ok target, and may be more approachable (more examples); do your best to get into 32-bit protected mode as soon as possible. You'll need to do that anyway for SMP, unless your chosen bootloader does it for you (most don't, but some do).
I personally would skip building a gcc cross compiler; I did it 20 years ago for Dreamcast hobby work, and llvm includes it out of the box. Save your frustration for other things.
Try to get a physical test box and use it frequently; I boot mine with PXE. Make sure you have a serial port between the test box and your dev box, because serial is a lot easier than VGA text or UEFI graphics.
Be aware that QEMU doesn't apply segment limits by default. This usually doesn't matter as you'll switch to protected mode and have unlimited segments most of the time... But it makes a difference in early boot and starting the non-boot processors.