summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile29
1 files changed, 17 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 8d8b957..7b5018f 100644
--- a/Makefile
+++ b/Makefile
@@ -7,11 +7,9 @@
#####################
-
# main phony targets
-.PHONY: all new run newrun stick clean tags
-
+.PHONY: all new run newrun stick clean tags mount umount
############ some constants ############
@@ -139,21 +137,15 @@ $(FOOLOS): $(KERNEL_IMG) $(SUBDIRS)
sudo cp $(IMG_USERSPACE) /mnt/vdi/boot
sync
-# dd if=$(BIN_MBR) of=$@ bs=512 seek=0 conv=notrunc
-# dd if=$(BIN_STAGE2) of=$@ bs=512 seek=1 conv=notrunc
-# # kernel will start at 0x100000 in ram (this is what the booloader starts loading secotr: 10)
-# dd if=$(BIN_KERNEL) of=$@ bs=512 seek=10 conv=notrunc # kernel can be about 128KB (incl bss)
-# # the data will starts at 0x120000 in ram
-# dd if=$(IMG_USERSPACE) of=$@ bs=512 seek=266 conv=notrunc
############ virtual machines stuff ############
# vdi image for VirtualBox
-$(FOOLOS_VDI): $(FOOLOS)
+$(FOOLOS_VDI): disk.img
-rm FoolOS.vdi
#VBoxManage convertfromraw $< $@ --uuid 2f11ca11-c35d-4240-b77e-79e37d32616c
- VBoxManage convertfromraw ~/temp/FoolOs/disk.img $@ --uuid 2f11ca11-c35d-4240-b77e-79e37d32616c
+ VBoxManage convertfromraw disk.img $@ --uuid 2f11ca11-c35d-4240-b77e-79e37d32616c
# run in our local bochs (we need cirrus support for our vesa mode)
run-bochs: all
@@ -165,7 +157,7 @@ run-qemu: all
run-qemu-debug: all
# qemu -enable-kvm -s -S ~/temp/FoolOs/disk.img
- qemu -enable-kvm -s ~/temp/FoolOs/disk.img
+ qemu -enable-kvm -s disk.img
############ create bootable usb image ############
@@ -182,3 +174,16 @@ clean: $(CLEANDIRS)
tags:
ctags --recurse=yes .
+############ mounting #############
+
+mount: disk.img
+ echo "* mounting disk image"
+ sudo losetup /dev/loop1 $< -o 1048576
+ sudo mount /dev/loop1 /mnt/vdi
+
+umount:
+ echo "* unmounting disk image"
+ sudo umount /mnt/vdi
+ sudo losetup -d /dev/loop1
+
+