From 6f94bc3ddde665137dba2d93d46af31fd848d649 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Fri, 14 Oct 2022 15:57:26 -0400 Subject: [PATCH] Add VirtualBox instructions and task to create a VMDK --- README.md | 24 +++++++++++++++++++++++- Rsconscript | 8 ++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 37f1354..9035ff2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -= INSTALLATION += Running HOS + +== Physical Machine To install HOS to an EFI partition, follow these steps: @@ -15,3 +17,23 @@ To install HOS to an EFI partition, follow these steps: 3. Set boot order to desired boot order. Exact order will be system dependent. Example: efibootmgr -o 2,0,6,5 + +== VirtualBox + +To create a VM in VirtualBox: + +1. Build HOS ("./rscons"). +2. Create a VirtualBox VMDK image with "./rscons mk-vmdk". +3. In VirtualBox, select Machine -> New. +4. Set name to HOS. +5. Set Type to Other. +6. Set Version to Other/Unknown (64-bit). +7. Click Next. +8. Set memory size to 512 MB. +9. Click Next. +10. Select Use an existing virtual hard disk file. +11. Browse and add the build/hello/HOS.vmdk file. +12. Click Create. +13. Open HOS VM settings. +14. Under System, check the Enable EFI checkbox and click OK. +15. To run HOS, either start the VM through VirtualBox or with "./rscons run-vb". diff --git a/Rsconscript b/Rsconscript index 423461d..2459043 100644 --- a/Rsconscript +++ b/Rsconscript @@ -147,6 +147,14 @@ task "run", desc: "Run HOS in QEMU" do end end +# See README.md for how to set up VirtualBox for HOS. +task "mk-vmdk", desc: "Create VirtualBox VMDK virtual drive for HOS" do + vmdk = hello_env.expand("^/HOS.vmdk") + rm vmdk + sh %W[VBoxManage internalcommands createrawvmdk -filename #{vmdk} -rawdisk #{File.expand_path(hello_env.expand("^/HOS.img"))}] +end + +# See README.md for how to set up VirtualBox for HOS. task "run-vb", desc: "Run HOS in VirtualBox" do sh %W[VBoxManage startvm HOS] end