Hello world!
This commit is contained in:
30
Makefile
Normal file
30
Makefile
Normal file
@ -0,0 +1,30 @@
|
||||
.PHONY: all disk clean
|
||||
|
||||
disk:
|
||||
if [ ! -d limine ]; then \
|
||||
git clone https://github.com/limine-bootloader/limine.git --branch=v9.x-binary --depth=1; \
|
||||
make -C limine; \
|
||||
fi
|
||||
make -C kernel
|
||||
rm -f disk.hdd
|
||||
dd if=/dev/zero bs=1M count=0 seek=64 of=disk.hdd
|
||||
PATH=$$PATH:/usr/sbin:/sbin sgdisk disk.hdd -n 1:2048 -t 1:ef00 -m 1
|
||||
./limine/limine bios-install disk.hdd
|
||||
mformat -i disk.hdd@@1M
|
||||
mmd -i disk.hdd@@1M ::/EFI ::/EFI/BOOT ::/boot ::/boot/limine
|
||||
mcopy -i disk.hdd@@1M kernel/mop2 ::/boot
|
||||
mcopy -i disk.hdd@@1M limine.conf limine/limine-bios.sys ::/boot/limine
|
||||
mcopy -i disk.hdd@@1M limine/BOOTX64.EFI ::/EFI/BOOT
|
||||
|
||||
clean:
|
||||
rm -rf limine disk.hdd
|
||||
make -C kernel clean
|
||||
|
||||
all: disk
|
||||
|
||||
run:
|
||||
qemu-system-x86_64 \
|
||||
-d guest_errors \
|
||||
-serial stdio \
|
||||
-hda disk.hdd
|
||||
|
Reference in New Issue
Block a user