Forgot to add GRUB

This commit is contained in:
vanten-s 2024-03-27 15:44:49 +01:00
parent 07346f758c
commit 256dc5b3d3
Signed by: vanten-s
GPG key ID: DE3060396884D3F2

View file

@ -350,6 +350,15 @@ fn panic(_info: &core::panic::PanicInfo) -> ! {
# Building the kernel # Building the kernel
To build the kernel I just run `cargo build` in the `kernel` directory. This will produce a binary called `kernel/target/i686-bare-metal/debug/kernel.elf`. I now have a multiboot enabled kernel :) To build the kernel I just run `cargo build` in the `kernel` directory. This will produce a binary called `kernel/target/i686-bare-metal/debug/kernel.elf`. I now have a multiboot enabled kernel :)
# Grub
Now to turn the kernel into a ISO file with a bootloader, I used grub. To configure grub I needed to create a directory for it. I made `build/isodir/boot/grub/grub.cfg` containing this:
```
menuentry "geos" {
multiboot /boot/geos.bin
}
```
Then I copied `kernel/target/i686-bare-metal/debug/kernel.elf` to `isodir/boot/geos.bin`. Then I ran `grub-mkrescue -o build/geos.iso build/isodir` to make an ISO containing my OS and grub. Yippee
# File structure # File structure
``` ```
geos/ geos/