From f7f903fedb855da3290b8820015f92226197fde9 Mon Sep 17 00:00:00 2001 From: IPlayZed Date: Sun, 16 Jan 2022 20:01:25 +0100 Subject: [PATCH] Corrected make install. --- README.md | 3 +++ src/Makefile | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index db098a2..fad035f 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,9 @@ The architecture in mind now is x86 and it is assumed that the system is in lega To build issue command `make mykernel.bin` in `src`. +To install issue `make install` in `src`. This requires sudo privilages +and will do the build as well. + The kernel binary by default is installed into `/boot` with `make install`. There are multiple ways to add it as an entry, but the easy and dirty way is to add it explicitly as a custom binary into the generated GRUB script, which is located at diff --git a/src/Makefile b/src/Makefile index 85ccd48..84e78c3 100644 --- a/src/Makefile +++ b/src/Makefile @@ -16,7 +16,8 @@ objectfiles = loader.o kernel.o mykernel.bin: linker.ld ${objectfiles} ld ${LD_PARAMS} -T $< -o $@ ${objectfiles} - mv $@ ../out - mv *.o ../out + install: mykernel.bin sudo cp $< /boot/mykernel.bin + mv $< ../out + mv *.o ../out