|
|
|
|
|
by nostrademons
2830 days ago
|
|
Is there any downside to using the multiboot format for your OS anyway, bootstrapping off GRUB to get started, and then if you really want to learn how everything works, writing a replacement for GRUB? It looks like multiboot is just a protocol that lets you plug in to a bunch of industry-standard software; it can still be quite educational (and easier) to go rewrite both ends of that protocol independently. |
|
The biggest advantage is that your kernel images are a bootable, debuggable ELF binary.
The emphasis being on "debuggable", you can easily plug in GDB to QEMU and use a proper debugger with your bare metal projects. Using GDB is much better than using the built-in debugging facilities of QEMU or Bochs. You can get the source view, set breakpoints and do everything you normally do in a debugger. In QEMU/Bochs built-in debuggers you have no source view and can only inspect memory and registers - not variables with symbolic names.
Here's some examples and documentation on building a debuggable ELF image for bare metal project, which I contributed to someone else's project:
https://github.com/Overv/MineAssemble/commit/56e317a28d069f4...