diff options
author | Benji Dial <benji3.141@gmail.com> | 2020-05-24 11:02:43 -0400 |
---|---|---|
committer | Benji Dial <benji3.141@gmail.com> | 2020-05-24 11:02:43 -0400 |
commit | 02f14113cbf14c6f842fb43ecbc68d0c851ef3b0 (patch) | |
tree | 75d2d943d9822b3f945fd947e9b91eec1d68e900 /makefile | |
parent | 31d8ae388a7ded576abd3e3d99c3d9193ea6d704 (diff) | |
download | portland-os-02f14113cbf14c6f842fb43ecbc68d0c851ef3b0.tar.gz |
very basic vga, ata, serial drivers. start of fat and fs drivers
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 30 |
1 files changed, 21 insertions, 9 deletions
@@ -1,20 +1,32 @@ -qemu: floppy - qemu-system-i386 out/floppy.img - -floppy: kernel boot +disk: kernel boot mkdir -p obj out - /sbin/mkfs.fat -C -R 17 -n "PORTLAND OS" obj/shadow.img 1440 + /sbin/mkfs.fat -C -f 1 -F 12 -n "PORTLAND OS" -R 17 obj/shadow.img 8192 echo -n -e '\xeb\x3c' > obj/jmp.bin dd if=obj/jmp.bin of=obj/shadow.img obs=2 conv=notrunc dd if=out/boot.bin of=obj/shadow.img obs=1 seek=62 conv=notrunc dd if=out/kernel.bin of=obj/shadow.img seek=1 conv=notrunc - mv obj/shadow.img out/floppy.img + mv obj/shadow.img out/disk.img + +vbox-image: disk + VBoxManage convertfromraw out/disk.img out/disk.vdi --uuid a61929ed-3bf2-45ff-b98a-44f87c616dba + +kdump: kernel + objdump -M intel -d obj/kernel.elf > out/kernel.dasm +kgccargs = -m32 -ffreestanding -fno-asynchronous-unwind-tables kernel: mkdir -p obj/kernel out - gcc -m32 -ffreestanding -c src/kernel/main.c -o obj/kernel/main.o - gcc -m32 -ffreestanding -c src/kernel/vga.c -o obj/kernel/vga.o - ld -T src/kernel/link.ld obj/kernel/main.o obj/kernel/vga.o -o out/kernel.bin + gcc ${kgccargs} -c src/kernel/main.c -o obj/kernel/main.o + gcc ${kgccargs} -c src/kernel/vga.c -o obj/kernel/vga.o + gcc ${kgccargs} -c src/kernel/fat.c -o obj/kernel/fat.o + gcc ${kgccargs} -c src/kernel/fs.c -o obj/kernel/fs.o + gcc ${kgccargs} -c src/kernel/ata.c -o obj/kernel/ata.o + gcc ${kgccargs} -c src/kernel/util.c -o obj/kernel/utilc.o + gcc ${kgccargs} -c src/kernel/panic.c -o obj/kernel/panic.o + gcc ${kgccargs} -c src/kernel/serial.c -o obj/kernel/serial.o + nasm -f elf32 src/kernel/util.asm -o obj/kernel/utila.o + ld -T src/kernel/link.ld obj/kernel/main.o obj/kernel/vga.o obj/kernel/fat.o obj/kernel/fs.o obj/kernel/ata.o obj/kernel/utilc.o obj/kernel/panic.o obj/kernel/utila.o obj/kernel/serial.o -o obj/kernel.elf + objcopy -O binary -j .entry -j .bin obj/kernel.elf out/kernel.bin boot: mkdir -p out |