fixed addr gdt, serial

This commit is contained in:
pantonshire committed 2025-07-26 17:40:48 +01:00
1 parent b0dffe7bc8
commit 988d3d601d
9 files changed
+189 -24

No files matched your search

+19 -15
View File
@@ -9,29 +9,33 @@ run:
-m 512M \
-drive format=raw,file=disk.bin
run_serial:
qemu-system-x86_64 \
-serial stdio \
-no-reboot \
-m 512M \
-drive format=raw,file=disk.bin
run_reset:
qemu-system-x86_64 \
-monitor stdio \
-no-reboot \
-m 512M \
-drive if=pflash,file=reset.bin,format=raw
build_reset:
nasm -f bin -werror -o reset.bin reset.s
#-bios seabios/out/bios.bin
build: build_stage_1 build_stage_2
build_stage_1:
nasm -f bin {{common_flags}} -o stage_1/stage_1.bin stage_1/main.s
build_stage_2:
nasm -f elf {{common_flags}} -o stage_2/prelude.o stage_2/prelude.s
nasm -f elf {{common_flags}} -o stage_2/main.o stage_2/main.s
nasm -f elf {{common_flags}} -o stage_2/a20.o stage_2/a20.s
{{ld32}} -m elf_i386 -T stage_2/link.ld -o stage_2/stage_2.bin stage_2/*.o
build:
cargo xtask build
mkimg:
dd if=/dev/zero of=disk.bin bs=440 count=1 conv=notrunc
dd if=build/stage_1/s1.bin of=disk.bin conv=notrunc
dd if=build/s23.bin of=disk.bin bs=512 seek=70 conv=notrunc
# build:
# nasm -f bin -Iinclude -o boot0.bin boot0.s
# cd boot1; cargo build --release
# # nasm -f bin -Iinclude -o boot1.bin boot1.s
zero_disk:
dd if=/dev/zero of=disk.bin bs=512 count=1000