mirror of https://github.com/E-Almqvist/eOS
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
535 B
25 lines
535 B
all: os-image
|
|
|
|
run: all
|
|
qemu-system-x86_64 bin/os-image
|
|
|
|
os-image: bootloader.bin kernel.bin
|
|
cat $^ > bin/os-image
|
|
|
|
kernel.bin: bin/kernel_entry.o bin/kernel.o
|
|
ld -o kernel.bin -Ttext 0x1000 $^ --oformat binary
|
|
|
|
kernel.o : src/kernel/kernel.c
|
|
gcc -ffreestanding -c $< -o $@
|
|
|
|
kernel_entry.o : src/kernel/kernel_entry.asm
|
|
nasm $< -f elf -o $@
|
|
|
|
bootloader.bin : src/bootloader/bootloader.asm
|
|
nasm $< -f bin -o $@
|
|
|
|
clean:
|
|
rm -fr bin/*.bin bin/*.dis bin/*.o bin/os-image bin/*.map
|
|
|
|
kernel.dis : bin/kernel.bin
|
|
ndisasm -b 32 $< > $@
|
|
|