|
|
@@ -0,0 +1,20 @@
|
|
|
+#!/bin/sh
|
|
|
+
|
|
|
+echo "Creating disk image..."
|
|
|
+bximage -q -func=create -hd=30M hd30M.img
|
|
|
+
|
|
|
+echo "Compiling..."
|
|
|
+nasm -I boot/include/ -o boot/mbr.bin boot/mbr.S
|
|
|
+nasm -I boot/include/ -o boot/loader.bin boot/loader.S
|
|
|
+
|
|
|
+echo "Installing to disk image..."
|
|
|
+echo " 0. Writing mbr to disk..."
|
|
|
+dd if=boot/mbr.bin of=hd30M.img bs=512 count=1 conv=notrunc
|
|
|
+echo " 1. Writing loader to disk..."
|
|
|
+dd if=boot/loader.bin of=hd30M.img bs=512 count=4 seek=2 conv=notrunc
|
|
|
+# echo " 2. Writing kernel to disk..."
|
|
|
+# TODO: Add code to write the kernel to the disk image
|
|
|
+echo "Disk image created successfully."
|
|
|
+
|
|
|
+# echo "Now starting bochs ..."
|
|
|
+# bochs -f bochsrc.txt
|