From fea8e314e6291bd55fd96b1bec478d500b548489 Mon Sep 17 00:00:00 2001 From: czjstmax Date: Sun, 22 Feb 2026 02:33:30 +0100 Subject: initial commit i cant get the stage2 to load kernel, or the kernel to print. it's 2 am so gn for now. Signed-off-by: czjstmax --- Makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9e63e3f --- /dev/null +++ b/Makefile @@ -0,0 +1,17 @@ +all: + # assemble bootloader + nasm -f bin src/boot.asm -o build/boot.bin + nasm -f elf32 src/boot_s2.asm -o build/boot_s2.o + # compile kernel + gcc -m32 -ffreestanding -nostdlib -c src/krn/mkern.c -o build/mkernel.o + # link + ld -m elf_i386 -T src/linker.ld -nostdlib -o build/s2.elf build/boot_s2.o build/mkernel.o + objcopy -O binary build/s2.elf build/s2.bin + # make .img + cat build/boot.bin build/s2.bin > build/mullos.img + # qemu test + qemu-system-x86_64 -drive format=raw,file=build/mullos.img + +clean: + rm -vf build/* + -- cgit v1.3.1