From 1e4a254674f668839e5de273916024c16814b045 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sun, 13 Sep 2020 03:19:57 -0400 Subject: (basic, not much tested) keyboard, better panic --- makefile | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'makefile') diff --git a/makefile b/makefile index 8ddce57..aec355f 100644 --- a/makefile +++ b/makefile @@ -1,12 +1,14 @@ -kgccargs = -Wall -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=malloc -m32 -Og -ffreestanding -fno-asynchronous-unwind-tables +kgccargs = -Wall -Wsuggest-attribute=pure -Wsuggest-attribute=const -m32 -Og -ffreestanding -fno-asynchronous-unwind-tables ugccargs = ${kgccargs} -Isrc/user/include nasmargs = -f elf32 partlink = -r -m elf_i386 out/disk.vdi: out/disk.img + rm out/disk.vdi || true VBoxManage convertfromraw out/disk.img out/disk.vdi --uuid a61929ed-3bf2-45ff-b98a-44f87c616dba out/disk.img: out/kernel.bin out/boot.bin out/fs + #TODO: have this regenerate after out/fs mkdir -p obj /sbin/mkfs.fat -C -f 1 -F 16 -n "PORTLAND OS" -R 65 -s 1 -S 512 obj/shadow.img 8192 echo -n -e '\xeb\x3c' > obj/jmp.bin @@ -22,12 +24,13 @@ debug: out/disk.img clean: rm -r obj out || true -out/fs: obj/hello.elf obj/init.elf obj/meminfo.elf - mkdir -p out/fs/bin +out/fs/bin/%.elf: obj/%.elf + mkdir -p $(shell dirname $@) + objcopy -S $< $@ + +out/fs: out/fs/bin/init.elf out/fs/bin/meminfo.elf out/fs/bin/highway.elf + mkdir -p out/fs cp -r fs-skel/* out/fs/ - objcopy -S obj/hello.elf out/fs/bin/hello.elf - objcopy -S obj/init.elf out/fs/bin/init.elf - objcopy -S obj/meminfo.elf out/fs/bin/meminfo.elf obj/kernel/%.ko: src/kernel/%.c mkdir -p $(shell dirname $@) @@ -42,7 +45,7 @@ out/kernel.bin: obj/kernel/drive.ko obj/kernel/fat.ko obj/kernel/ide.ko \ obj/kernel/main2.ko obj/kernel/pmap.ko obj/kernel/paging.ko \ obj/kernel/panic.ko obj/kernel/pci.ko obj/kernel/elf.ko \ obj/kernel/serial.ko obj/kernel/task.ko obj/kernel/util.ko \ - obj/kernel/vga.ko obj/kernel/isrs.kao + obj/kernel/vga.ko obj/kernel/isrs.kao obj/kernel/kbd.ko mkdir -p out ld -T src/kernel/elf-link.ld obj/kernel/* -o obj/kernel.elf objcopy -O binary obj/kernel.elf out/kernel.bin @@ -59,16 +62,16 @@ obj/%.ao: src/user/%.asm mkdir -p $(shell dirname $@) nasm ${nasmargs} $< -o $@ -obj/knob.so: obj/knob/env.o obj/knob/file.o obj/knob/format.o \ - obj/knob/heap.o obj/knob/quit.o obj/knob/user.o \ - obj/knob/task.o obj/knob/entry.ao +obj/knob.so: obj/knob/env.o obj/knob/file.o obj/knob/format.o \ + obj/knob/heap.o obj/knob/quit.o obj/knob/user.o \ + obj/knob/task.o obj/knob/entry.ao obj/knob/block.o ld ${partlink} obj/knob/* -o obj/knob.so -obj/hello.elf: obj/hello/hello.o obj/knob.so - ld -T src/user/elf.ld obj/hello/* obj/knob.so -o obj/hello.elf - obj/init.elf: obj/init/init.o obj/knob.so ld -T src/user/elf.ld obj/init/* obj/knob.so -o obj/init.elf obj/meminfo.elf: obj/meminfo/meminfo.o obj/knob.so - ld -T src/user/elf.ld obj/meminfo/* obj/knob.so -o obj/meminfo.elf \ No newline at end of file + ld -T src/user/elf.ld obj/meminfo/* obj/knob.so -o obj/meminfo.elf + +obj/highway.elf: obj/highway/highway.o obj/knob.so + ld -T src/user/elf.ld obj/highway/* obj/knob.so -o obj/highway.elf \ No newline at end of file -- cgit v1.2.3