Skip to content

Commit

Permalink
Corrected make install.
Browse files Browse the repository at this point in the history
  • Loading branch information
IPlayZed committed Jan 16, 2022
1 parent af9a538 commit f7f903f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f7f903f

Please sign in to comment.