From 30d6e8f850d2fe26fffdeef0c38fc627ef8bab9a Mon Sep 17 00:00:00 2001 From: "Anna (navi) Figueiredo Gomes" Date: Wed, 13 Dec 2023 13:24:48 +0100 Subject: initial commit currently with: booted via multiboot 1 protected mode to long mode boostrap code vga used for outputting gdt and idt set up identity paging for the whole memory reported by multiboot pic and ps/2 set up acpi code exists but is broken --- Makefile | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b6abe96 --- /dev/null +++ b/Makefile @@ -0,0 +1,29 @@ +all: outdir out/nrvn.bin + +out/nrvn.bin: out/boot.o out/nrvn.o out/long.o out/vga.o out/idt.o out/mem.o out/acpi.o out/ps2.o out/pic.o out/memory.o + x86_64-pc-elf-gcc -T linker.ld -o $@ -ffreestanding -nostdlib -lgcc $^ -g + +out/boot.o: asm/boot.asm + nasm -felf64 $^ -o $@ + +out/long.o: asm/long.asm + nasm -felf64 $^ -o $@ + +out/%.o: src/%.c + x86_64-pc-elf-gcc -c $^ -o $@ -I include -ffreestanding -Wall -Wextra -g + +iso: all + cp out/nrvn.bin grub/boot/nrvn.bin + grub-mkrescue -o out/nrvn.iso grub + +run: iso + qemu-system-x86_64 -cdrom out/nrvn.iso + +debug: all + qemu-system-x86_64 -kernel out/nrvn.bin -s -S + +outdir: + mkdir -p out + +clean: + rm -rf out -- cgit v1.2.3