Add convenience targets for qemu (run), virtualbox

This commit is contained in:
K. Lange 2018-04-26 17:04:19 +09:00 committed by Kevin Lange
parent 3d199decd5
commit 910908096f

View File

@ -191,3 +191,22 @@ clean:
rm -f ${MODULES}
rm -f ${APPS_Y} ${LIBS_Y}
.PHONY: run
run: image.iso
qemu-system-i386 -cdrom $< \
-serial stdio \
-m 1G \
-soundhw ac97,pcspk \
-enable-kvm
.PHONY: virtualbox
VMNAME=ToaruOS-NIH CD
virtualbox: image.iso
-VBoxManage unregistervm "$(VMNAME)" --delete
VBoxManage createvm --name "$(VMNAME)" --ostype "Other" --register
VBoxManage modifyvm "$(VMNAME)" --memory 1024 --audio pulse --audiocontroller ac97
VBoxManage storagectl "$(VMNAME)" --add ide --name "IDE"
VBoxManage storageattach "$(VMNAME)" --storagectl "IDE" --port 0 --device 0 --medium $(shell pwd)/image.iso --type dvddrive
VBoxManage startvm "$(VMNAME)"