Compare commits
3 Commits
4c67faaad4
...
6b1445935c
Author | SHA1 | Date | |
---|---|---|---|
6b1445935c | |||
665d8aef80 | |||
af5ad73cf7 |
@ -69,8 +69,9 @@ To create a VM in VirtualBox:
|
|||||||
12. Move the HOS.vmdk file generated to the HOS VirtualBox folder.
|
12. Move the HOS.vmdk file generated to the HOS VirtualBox folder.
|
||||||
13. In VirtualBox Manager, open HOS VM settings.
|
13. In VirtualBox Manager, open HOS VM settings.
|
||||||
14. Under System, check the Enable EFI checkbox.
|
14. Under System, check the Enable EFI checkbox.
|
||||||
15. Under Storage, add a hard disk and browse to select the HOS.vmdk file.
|
15. Under System, change the Chipset to ICH9.
|
||||||
16. To run HOS, either start the VM through VirtualBox or with "./rscons run-vb".
|
16. Under Storage, add a hard disk and browse to select the HOS.vmdk file.
|
||||||
|
17. To run HOS, either start the VM through VirtualBox or with "./rscons run-vb".
|
||||||
|
|
||||||
## QEMU
|
## QEMU
|
||||||
|
|
||||||
|
31
Rsconscript
31
Rsconscript
@ -197,6 +197,7 @@ task "run", desc: "Run HOS in QEMU" do
|
|||||||
end
|
end
|
||||||
sh %W[
|
sh %W[
|
||||||
qemu-system-x86_64
|
qemu-system-x86_64
|
||||||
|
-machine q35
|
||||||
-cpu max
|
-cpu max
|
||||||
-serial file:qemu/serial.out
|
-serial file:qemu/serial.out
|
||||||
-bios #{ovmf}
|
-bios #{ovmf}
|
||||||
@ -207,7 +208,35 @@ end
|
|||||||
|
|
||||||
# See README.md for how to set up VirtualBox for HOS.
|
# See README.md for how to set up VirtualBox for HOS.
|
||||||
task "mk-vmdk", desc: "Create VirtualBox VMDK virtual drive for HOS" do
|
task "mk-vmdk", desc: "Create VirtualBox VMDK virtual drive for HOS" do
|
||||||
sh %W[VBoxManage internalcommands createrawvmdk -filename HOS.vmdk -rawdisk #{File.expand_path(hello_env.expand("^/HOS.img"))}]
|
path = File.expand_path(hello_env.expand("^/HOS.img"))
|
||||||
|
sectors = File.stat(path).size / 512
|
||||||
|
File.binwrite("HOS.vmdk", <<EOF)
|
||||||
|
# Disk DescriptorFile
|
||||||
|
version=1
|
||||||
|
CID=1d1c3615
|
||||||
|
parentCID=ffffffff
|
||||||
|
createType="fullDevice"
|
||||||
|
|
||||||
|
# Extent description
|
||||||
|
RW #{sectors} FLAT "#{path}" 0
|
||||||
|
|
||||||
|
# The disk Data Base
|
||||||
|
#DDB
|
||||||
|
|
||||||
|
ddb.virtualHWVersion = "4"
|
||||||
|
ddb.adapterType="ide"
|
||||||
|
ddb.geometry.cylinders="8"
|
||||||
|
ddb.geometry.heads="16"
|
||||||
|
ddb.geometry.sectors="63"
|
||||||
|
ddb.uuid.image="03783b5a-7587-4d8b-ad04-9d70f70a94c2"
|
||||||
|
ddb.uuid.parent="00000000-0000-0000-0000-000000000000"
|
||||||
|
ddb.uuid.modification="00000000-0000-0000-0000-000000000000"
|
||||||
|
ddb.uuid.parentmodification="00000000-0000-0000-0000-000000000000"
|
||||||
|
ddb.geometry.biosCylinders="8"
|
||||||
|
ddb.geometry.biosHeads="16"
|
||||||
|
ddb.geometry.biosSectors="63"
|
||||||
|
EOF
|
||||||
|
#sh %W[VBoxManage createmedium disk --filename=HOS.vmdk --variant=RawDisk --format=VMDK --property RawDrive=#{File.expand_path(hello_env.expand("^/HOS.img"))}]
|
||||||
end
|
end
|
||||||
|
|
||||||
# See README.md for how to set up VirtualBox for HOS.
|
# See README.md for how to set up VirtualBox for HOS.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user