From 9b851331995c84f9548eba05e51b47656cb83deb Mon Sep 17 00:00:00 2001 From: dzwdz Date: Fri, 9 Jul 2021 16:08:59 +0200 Subject: support building .iso images --- .gitignore | 1 + Makefile | 7 +++++++ grub.cfg | 3 +++ 3 files changed, 11 insertions(+) create mode 100644 grub.cfg diff --git a/.gitignore b/.gitignore index 98f5968..eb837cc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.bin +boot.iso *.o diff --git a/Makefile b/Makefile index 605b112..57100d4 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,13 @@ clean: rm -vf kernel.bin rm -vf **/*.o +boot.iso: kernel.bin grub.cfg + mkdir iso_tmp + mkdir -p iso_tmp/boot/grub + cp kernel.bin iso_tmp/boot + cp grub.cfg iso_tmp/boot/grub + grub-mkrescue -o $@ iso_tmp + rm -rv iso_tmp kernel.bin: $(OBJ) $(CC) $(LFLAGS) -T linker.ld $^ -o $@ diff --git a/grub.cfg b/grub.cfg new file mode 100644 index 0000000..ab0a41d --- /dev/null +++ b/grub.cfg @@ -0,0 +1,3 @@ +menuentry "Camellia" { + multiboot /boot/kernel.bin +} -- cgit v1.2.3