2020-01-02 12:19:32 +01:00
|
|
|
run_bootloader: compile_bootloader
|
|
|
|
qemu-system-i386 -drive format=raw,file=target/boot.bin -monitor stdio
|
|
|
|
|
2019-12-28 13:47:10 +01:00
|
|
|
run_kernel: compile_kernel
|
|
|
|
qemu-system-i386 -kernel target/kernel.bin
|
|
|
|
|
2019-12-28 17:25:29 +01:00
|
|
|
compile_bootloader: compile_kernel
|
2019-12-30 16:02:43 +01:00
|
|
|
rm -rf target/bootloader.bin
|
|
|
|
nasm -f bin -o target/bootloader.bin bootloader/main.asm
|
|
|
|
cat target/bootloader.bin target/kernel.bin > target/boot.bin
|
2019-12-27 16:17:28 +01:00
|
|
|
|
2020-01-02 12:19:32 +01:00
|
|
|
compile_kernel:
|
|
|
|
nasm -felf32 kernel/boot.asm -o target/boot.o
|
|
|
|
i686-elf-gcc -c kernel/kernel.c -o target/kernel.o -std=gnu99 -ffreestanding -O2 -Wall -Wextra
|
|
|
|
i686-elf-gcc -T kernel/linker.ld -o target/kernel.bin -ffreestanding -O2 -nostdlib target/boot.o target/kernel.o -lgcc
|