From 82b2c8ddb429903da774b1a70585e6b47d60a2f4 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 10 Jun 2017 16:09:46 +0200 Subject: using int13h/8h only for floppies for now, geometry on emulated USB disks seems to be completly wrong. Probing on real machine for first non-readable sector hangs the machine or creates reboots, no clue. Writing a boot loader is not the scope of the project. For me it runs where it has to run for now.. --- src/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile index fed9fd3..1609299 100644 --- a/src/Makefile +++ b/src/Makefile @@ -9,7 +9,7 @@ MAGIC := $(shell printf '%x' `date +%s`) all: image.bin kernel.sym # truncate to correct number of sectors, we have -# 512 (boot, stage 1) + N * 512 (N currenty is 3, stage 2) = 2048 for boot.bin +# 512 (boot, stage 1) + N * 512 (N currenty is 3, stage 2) = 3072 for boot.bin # + M * 512 (M is currently 7) = 3144 for kernel.bin # + 1 * 512 = 512 for magic.bin # (M + N + 1 is the number of sectors to be read in stage 2, as stage 1 @@ -102,6 +102,10 @@ run-qemu-hd: image.bin qemu-system-i386 -net nic,model=ne2k_pci -d guest_errors -m 32 -drive "file=image.bin,if=ide,format=raw" \ -serial file:serial.log +run-qemu-usb: image.bin + qemu-system-i386 -net nic,model=ne2k_pci -d guest_errors -m 32 -usb -usbdevice disk:/dev/sde \ + -serial file:serial.log + run-qemu: image.bin qemu-system-i386 -net nic,model=ne2k_pci -d guest_errors -m 32 -drive "file=image.bin,if=floppy,format=raw" \ -serial file:serial.log -- cgit v1.2.3-54-g00ecf