tabs/Makefile

30 lines
1.4 KiB
Makefile
Raw Permalink Normal View History

run: bin
2020-01-31 06:20:56 +01:00
qemu-system-i386 -vga std -nodefaults -drive format=raw,file=target/boot.bin -monitor stdio -device e1000,netdev=u1,mac=aa:bb:cc:dd:ee:ff -object filter-dump,id=f1,netdev=u1,file=/tmp/dump.pcap -netdev tap,id=u1,ifname=tap0,script=no,downscript=no
2020-01-02 12:19:32 +01:00
2020-01-08 22:36:49 +01:00
run_kernelonly: compile_kernel
2020-01-31 06:20:56 +01:00
qemu-system-i386 -kernel target/kernel/kernel.bin -monitor stdio -vga std -nodefaults -device e1000,netdev=u1,mac=aa:bb:cc:dd:ee:ff -object filter-dump,id=f1,netdev=u1,file=/tmp/dump.dat -netdev tap,id=u1,ifname=tap0,script=no,downscript=no
2020-01-08 22:36:49 +01:00
debug_kernel: compile_kernel
qemu-system-i386 -s -S -kernel target/kernel/kernel.bin
clean:
rm -r ./target/
mkdir -p ./target/helpers
mkdir ./target/bootloader
mkdir ./target/kernel
2019-12-28 13:47:10 +01:00
bin: compile_bootloader compile_kernel compile_helpers
./target/helpers/make_bin
compile_helpers:
2020-01-05 22:47:40 +01:00
gcc -g -o ./target/helpers/make_bin ./helpers/make_bin.c
compile_bootloader:
rm -rf target/bootloader/bootloader.bin
nasm -f bin -o target/bootloader/bootloader.bin bootloader/main.asm
2020-01-02 12:19:32 +01:00
compile_kernel:
nasm -felf32 kernel/wrapper.asm -o target/kernel/wrapper.o
2020-01-09 12:06:45 +01:00
i686-elf-gcc -g -c kernel/kernel.c -o target/kernel/kernel.o -std=gnu99 -ffreestanding -Og -Wall -Wextra -mno-80387 -mgeneral-regs-only -mno-red-zone
i686-elf-gcc -g -T kernel/linker.ld -o target/kernel/kernel.bin -ffreestanding -Og -nostdlib target/kernel/wrapper.o target/kernel/kernel.o -lgcc