From 9ecaf0fe0cbc2a7d7838921dbfec6f4feec4a3dd Mon Sep 17 00:00:00 2001 From: Jacob Krall Date: Mon, 26 Oct 2015 15:45:19 +0100 Subject: [PATCH 1/3] `make iso` depends on grub.cfg This way, if you fix a typo in grub.cfg, you don't have to `make clean` to get `make iso` to pick it up. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7c5d87de..2bcdf335 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ run: $(iso) iso: $(iso) -$(iso): $(kernel) +$(iso): $(kernel) $(grub_cfg) @mkdir -p build/isofiles/boot/grub @cp $(kernel) build/isofiles/boot/ @cp $(grub_cfg) build/isofiles/boot/grub From 37b576eb3cdcc498ba960588cf481af916126908 Mon Sep 17 00:00:00 2001 From: Jacob Krall Date: Mon, 26 Oct 2015 15:45:46 +0100 Subject: [PATCH 2/3] Explicitly rename copied kernel to `kernel.bin` Otherwise your `grub.cfg` from earlier in the article will be out of date (we're producing `kernel-x86_64.bin`, but grub expects `kernel.bin`). --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2bcdf335..c1fa9749 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,7 @@ iso: $(iso) $(iso): $(kernel) $(grub_cfg) @mkdir -p build/isofiles/boot/grub - @cp $(kernel) build/isofiles/boot/ + @cp $(kernel) build/isofiles/boot/kernel.bin @cp $(grub_cfg) build/isofiles/boot/grub @grub-mkrescue -o $(iso) build/isofiles 2> /dev/null @rm -r build/isofiles From 5e5374cd7d840e90950efa66498837746bb0ff48 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Mon, 26 Oct 2015 16:54:45 +0100 Subject: [PATCH 3/3] Update grub.cfg to use renamed kernel file Renaming occurred in 37b576e to be in line with the blog posts. --- src/arch/x86_64/grub.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arch/x86_64/grub.cfg b/src/arch/x86_64/grub.cfg index 70df685c..9713ba02 100644 --- a/src/arch/x86_64/grub.cfg +++ b/src/arch/x86_64/grub.cfg @@ -16,6 +16,6 @@ set timeout=0 set default=0 menuentry "my os" { - multiboot2 /boot/kernel-x86_64.bin + multiboot2 /boot/kernel.bin boot }