From 267bb0d3d2b7ba892f8f5d88f14f1be1aac0df11 Mon Sep 17 00:00:00 2001 From: johannst Date: Sat, 21 Dec 2024 21:02:11 +0000 Subject: deploy: f8221e81b9752548d26675111cffca1947c46b68 --- arch/x86/mbr/Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 arch/x86/mbr/Makefile (limited to 'arch/x86/mbr/Makefile') diff --git a/arch/x86/mbr/Makefile b/arch/x86/mbr/Makefile new file mode 100644 index 0000000..bcecb76 --- /dev/null +++ b/arch/x86/mbr/Makefile @@ -0,0 +1,19 @@ +mbr: mbr.ld mbr.o + ld -o $@.elf -nostdlib -T $^ + objcopy -O binary $@.elf $@ + +mbr.o: mbr.S + gcc -c -o $@ -m32 -ffreestanding $^ + +clean: + $(RM) mbr.o mbr.elf mbr + +run: mbr + qemu-system-i386 -hda mbr $(QEMU_ARGS) + +debug: + make run QEMU_ARGS="-s -S" + +gdb: + gdb -ex 'target remote :1234' mbr.elf -ex 'layout asm' -ex 'b entry_pm32' -ex 'c' + -- cgit v1.2.3