Fix binary architectures.

This commit is contained in:
Alexander Myltsev 2022-11-18 19:27:04 +03:00
parent 8a8fb95965
commit 24e807423c

View File

@ -8,7 +8,6 @@ run: image.bin
debug-boot: image.bin mbr.elf
qemu-system-i386 -drive format=raw,file=$< -s -S &
x86_64-elf-gdb mbr.elf \
-ex "set architecture i386" \
-ex "target remote localhost:1234" \
-ex "break init_32bit" \
-ex "continue"
@ -30,13 +29,13 @@ kernel.bin: kernel.o vga.o string.o drivers/ata.o
$(CC) -m32 -ffreestanding -c -g $< -o $@
%.o: %.S
$(AS) $^ -g -o $@
$(CC) -m32 $^ -c -g -o $@
mbr.bin: mbr.o
$(LD) -Ttext=0x7c00 --oformat=binary $^ -o $@
$(LD) -m elf_i386 -Ttext=0x7c00 --oformat=binary $^ -o $@
mbr.elf: mbr.o
$(LD) -Ttext=0x7c00 $^ -o $@
$(LD) -m elf_i386 -Ttext=0x7c00 $^ -o $@
clean:
rm *.bin *.o
rm -f *.bin *.o