mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:47:45 +00:00
Make it run in QEMU.
Looks like the problem was the weirdly-sized floppy image file. I guess QEMU was inferring the floppy disk geometry from the image size.
This commit is contained in:
parent
da3857b0c2
commit
71a2942a0a
2 changed files with 7 additions and 4 deletions
|
@ -80,7 +80,10 @@ $(KERNEL): $(OBJS)
|
||||||
@echo "LD $@"; $(LD) $(LDFLAGS) -o $@ -Ttext 0x10000 $(OBJS)
|
@echo "LD $@"; $(LD) $(LDFLAGS) -o $@ -Ttext 0x10000 $(OBJS)
|
||||||
|
|
||||||
$(IMAGE): $(KERNEL) $(BOOTLOADER)
|
$(IMAGE): $(KERNEL) $(BOOTLOADER)
|
||||||
@echo "CREATE $@"; cat $(BOOTLOADER) $(KERNEL) > $(IMAGE)
|
@echo "CREATE $@"; cat $(BOOTLOADER) $(KERNEL) > .tmp-floppy-image
|
||||||
|
@dd if=/dev/zero bs=2M count=1 >> .tmp-floppy-image 2> /dev/null
|
||||||
|
@dd if=.tmp-floppy-image of=.floppy-image bs=1440k count=1 2>/dev/null
|
||||||
|
@rm -f .tmp-floppy-image
|
||||||
|
|
||||||
$(BOOTLOADER): Boot/boot.asm
|
$(BOOTLOADER): Boot/boot.asm
|
||||||
@echo "NASM $<"; $(NASM) -f bin -o $@ $<
|
@echo "NASM $<"; $(NASM) -f bin -o $@ $<
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ "$1" = "q" ]; then
|
if [ "$1" = "b" ]; then
|
||||||
qemu-system-i386 -drive format=raw,file=.floppy-image,if=floppy -drive format=raw,file=_fs_contents #$@
|
|
||||||
else
|
|
||||||
bochs -q -f .bochsrc
|
bochs -q -f .bochsrc
|
||||||
|
else
|
||||||
|
qemu-system-i386 -m 32 -drive format=raw,file=.floppy-image,if=floppy -drive format=raw,file=_fs_contents #$@
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue