Project cleanup
This commit is contained in:
parent
4af94012ca
commit
c3b3024b0f
|
@ -68,5 +68,7 @@ _deps
|
|||
# TSOS stuff
|
||||
|
||||
*.bin
|
||||
*.img
|
||||
dist/
|
||||
|
||||
|
||||
|
|
18
build.sh
18
build.sh
|
@ -1,8 +1,12 @@
|
|||
#!/bin/bash
|
||||
i386-elf-gcc -ffreestanding -I src/ -c src/kernel/main.c -o kernel.o
|
||||
i386-elf-gcc -ffreestanding -I src/ -c src/kernel/drivers/vga/screen.c -o screen.o
|
||||
i386-elf-gcc -ffreestanding -I src/ -c src/kernel/drivers/ports/ports.c -o ports.o
|
||||
nasm -f elf src/entrypoint.s -o entry.o
|
||||
nasm -f bin src/boot/mbr.s -o mbr.bin
|
||||
i386-elf-ld -o kernel.bin -Ttext 0x1000 entry.o kernel.o ports.o screen.o --oformat binary
|
||||
cat mbr.bin kernel.bin > os.bin
|
||||
# Compile the kernel and its drivers
|
||||
i386-elf-gcc -ffreestanding -I src/ -c src/kernel/main.c -o obj/kernel.o
|
||||
i386-elf-gcc -ffreestanding -I src/ -c src/kernel/drivers/vga/screen.c -o obj/screen.o
|
||||
i386-elf-gcc -ffreestanding -I src/ -c src/kernel/drivers/ports/ports.c -o obj/ports.o
|
||||
# Compile the assembly entry point and the MBR
|
||||
nasm -f elf src/entrypoint.s -o obj/entry.o
|
||||
nasm -f bin src/boot/mbr.s -o build/mbr.bin
|
||||
# Link everything together
|
||||
i386-elf-ld -o build/kernel.bin -Ttext 0x1000 entry.o kernel.o ports.o screen.o --oformat binary
|
||||
# Produce a bootable image
|
||||
cat build/mbr.bin build/kernel.bin > build/os.img
|
||||
|
|
Loading…
Reference in New Issue