kernel/Makefile

26 lines
599 B
Makefile
Raw Normal View History

2023-06-18 05:37:30 +03:00
all: build/kernel-i386.elf
2023-06-12 11:46:47 +03:00
clean:
2023-07-24 04:20:54 +03:00
-@rm *.bin 2> /dev/null || true
2023-06-12 11:46:47 +03:00
2023-07-24 04:20:54 +03:00
start32.bin: src/start32.asm src/serial.asm
fasm src/start32.asm start32.bin
image: start32.bin mount
cp start32.bin mnt/koalemos/
2023-06-22 02:13:20 +03:00
sync
2023-06-12 11:46:47 +03:00
2023-07-24 04:20:54 +03:00
qemu-multiboot: start32.bin
qemu-system-i386 -kernel start32.bin -serial stdio
2023-06-22 02:13:20 +03:00
qemu-image: image
2023-06-15 03:06:27 +03:00
qemu-system-i386 koalemos.img -serial stdio
2023-06-14 19:28:16 +03:00
mount: koalemos.img mnt/
2023-06-14 20:06:27 +03:00
@if ! mountpoint -q "mnt/"; then \
2023-06-15 06:40:38 +03:00
sudo mount -o loop,offset=1048576,umask=177,dmask=022,uid=$(shell id -u),gid=$(shell id -g) koalemos.img mnt/; \
2023-06-14 20:06:27 +03:00
fi;
2023-06-14 19:28:16 +03:00
umount:
2023-06-14 20:06:27 +03:00
@sudo umount mnt
2023-06-14 19:28:16 +03:00
mnt/:
2023-06-14 20:06:27 +03:00
@mkdir mnt
2023-06-18 05:37:30 +03:00
build/:
@mkdir build