diff --git a/.gitignore b/.gitignore index 770baf3..e9c4c3e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ *.bin mnt/ build/ +bx_enh_dbg.ini diff --git a/Makefile b/Makefile index 72c8af7..0826a2a 100644 --- a/Makefile +++ b/Makefile @@ -8,11 +8,10 @@ image: start32.bin mount grub-cfg roska.img mnt/roska/ cp start32.bin mnt/roska/ sync -qemu-multiboot: start32.bin - qemu-system-i386 -kernel start32.bin -serial stdio -qemu-image: image roska.img +qemu-run: image roska.img qemu-system-i386 roska.img -serial stdio - +bochs-run: image roska.img + bochs -qf bochsrc.txt mount: roska.img mnt/ @if ! mountpoint -q "mnt/"; then \ sudo mount -o loop,offset=1048576,umask=177,dmask=022,uid=$(shell id -u),gid=$(shell id -g) roska.img mnt/; \ @@ -29,7 +28,7 @@ build/: @mkdir build roska.img: mnt/ - dd if=/dev/zero of=roska.img bs=16M count=1 + dd if=/dev/zero of=roska.img bs=1k count=16128 echo 'type=83' | sudo sfdisk roska.img sudo losetup /dev/loop0 roska.img sudo losetup /dev/loop1 roska.img -o1048576 diff --git a/bochsrc.txt b/bochsrc.txt new file mode 100644 index 0000000..f13fbe5 --- /dev/null +++ b/bochsrc.txt @@ -0,0 +1,13 @@ +display_library: x, options="gui_debug" +magic_break: enabled=1 +romimage: file=$BXSHARE/BIOS-bochs-legacy +vgaromimage: file=$BXSHARE/VGABIOS-lgpl-latest +clock: sync=realtime +cpu: ips=4294967295, reset_on_triple_fault=false +megs: 128 +ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14 +ata0-master: type=disk, mode=flat, path=roska.img, cylinders=32, heads=16, spt=63 +boot: disk + +# Use `bximage` to get disk geometry +# TODO: Figure out how to get sensible TTY serial