From dc402d4fc756c49e59021cc46d79760da0122d4d Mon Sep 17 00:00:00 2001 From: Baptiste Wicht Date: Sat, 2 Nov 2013 16:32:30 +0100 Subject: [PATCH] Add utilities to create and attach disks --- .gitignore | 3 ++- Makefile | 5 ++++- bochsrc.txt | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 670f43f3..1e9eb008 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.bin *.flp -*.o \ No newline at end of file +*.o +hdd.img \ No newline at end of file diff --git a/Makefile b/Makefile index e3d7086f..299d6023 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ thor.flp: bootloader.bin micro_kernel.bin kernel.bin filler.bin dd status=noxfer conv=notrunc if=thor.bin of=thor.flp qemu: thor.flp - qemu-kvm -cpu host -fda thor.flp + qemu-kvm -cpu host -fda thor.flp -hda hdd.img bochs: thor.flp echo "c" > commands @@ -35,6 +35,9 @@ debug: thor.flp force_look: true +create_hdd: + dd if=/dev/zero of=hdd.img bs=512 count=20160 + clean: cd bootloader; $(MAKE) clean cd kernel; $(MAKE) clean diff --git a/bochsrc.txt b/bochsrc.txt index a2d1e81b..569f1038 100644 --- a/bochsrc.txt +++ b/bochsrc.txt @@ -1,4 +1,5 @@ display_library: sdl magic_break: enabled=1 floppya: 1_44=thor.flp, status=inserted +ata0-master: type=disk, path="hdd.img", mode=flat, cylinders=20, heads=16, spt=63 boot:floppy \ No newline at end of file