From 910908096fddb5e1cf35101bdcc2d334b7436194 Mon Sep 17 00:00:00 2001 From: "K. Lange" Date: Thu, 26 Apr 2018 17:04:19 +0900 Subject: [PATCH] Add convenience targets for qemu (run), virtualbox --- Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Makefile b/Makefile index c24f440d..548ba42e 100644 --- a/Makefile +++ b/Makefile @@ -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)" + +