1
1
Fork 0

Stuff. And thing. Yeaaaaah!

This commit is contained in:
Lauren Toivanen 2023-06-14 20:06:27 +03:00
parent 3d7140b3fc
commit 968ea605d8
Signed by: jt
GPG key ID: 9151B109B73ECAD5
3 changed files with 37 additions and 25 deletions

View file

@ -1,6 +1,6 @@
all: kernel-i386.elf
clean:
rm *.o *.elf
-@rm *.o *.elf 2> /dev/null || true
start32.o: start32.asm
fasm start32.asm
@ -12,12 +12,18 @@ vga.o: vga.c
kernel-i386.elf: kernel.o start32.o vga.o
tcc -m32 -nostdlib -Wl,-Ttext,0x100000 start32.o kernel.o vga.o -o kernel-i386.elf
qemu: kernel-i386.elf
qemu-system-i386 -kernel kernel-i386.elf
qemu-multiboot: kernel-i386.elf
qemu-system-i386 -kernel kernel-i386.elf -serial file:CON
qemu-image: kernel-i386.elf mount
cp kernel-i386.elf mnt/
sync
qemu-system-i386 koalemos.img
mount: koalemos.img mnt/
sudo mount -o loop,offset=1048576,umask=177,dmask=222 koalemos.img mnt/
@if ! mountpoint -q "mnt/"; then \
sudo mount -o loop,offset=1048576,umask=177,dmask=222,uid=$(shell id -u),gid=$(shell id -g) koalemos.img mnt/; \
fi;
umount:
sudo umount mnt
@sudo umount mnt
mnt/:
mkdir mnt
@mkdir mnt