More safely handle nested interrupts. Switch to newly created thread immediately.
HOS System Requirements
HOS requires:
- A 64-bit CPU.
- A UEFI system.
- 128MB of RAM.
Building HOS
From the top level of the repository, run:
./rscons
If you get errors about missing packages, install the packages and then re-run the build command.
Running HOS
HOS can run on a physical machine, in VirtualBox, or in QEMU.
Physical Machine
To install HOS to an EFI partition, follow these steps:
-
Copy build/hello/HOS.EFI to EFI partition EFI/HOS.EFI. For example, from Linux:
sudo cp build/hello/HOS.EFI /boot/efi/EFI/HOS.EFI
-
Register EFI loader for HOS (one time only) with command:
efibootmgr -c -d /dev/nvme1n1 -p 2 -l '\EFI\HOS.EFI' -L HOS
(Update the -d device parameter and -p partition parameter as appropriate)
-
Set boot order to desired boot order. Exact order will be system dependent. Example:
efibootmgr -o 2,0,6,5
At this point you should be able to boot HOS from your EFI boot selection menu. If you use GRUB, you can optionally create a GRUB boot entry to load HOS.EFI with an entry like this:
menuentry 'HOS' {
insmod part_gpt
insmod chain
set root='(hd0,gpt1)'
chainloader /EFI/HOS.EFI
}
Just update the root setting for the correction location to your system's EFI partition.
VirtualBox
To create a VM in VirtualBox:
- Build HOS ("./rscons").
- In VirtualBox, select Machine -> New.
- Set name to HOS.
- Set Type to Other.
- Set Version to Other/Unknown (64-bit).
- Click Next.
- Set memory size to 512 MB.
- Click Next.
- Select Do not add a virtual hard disk.
- Click Create.
- From the HOS repository, create a VirtualBox VMDK image with "./rscons mk-vmdk".
- Move the HOS.vmdk file generated to the HOS VirtualBox folder.
- In VirtualBox Manager, open HOS VM settings.
- Under System, check the Enable EFI checkbox.
- Under System, change the Chipset to ICH9.
- Under Storage, add a hard disk and browse to select the HOS.vmdk file.
- To run HOS, either start the VM through VirtualBox or with "./rscons run-vb".
QEMU
Make sure QEMU is installed (possibly the qemu-desktop
package). Then:
- Build HOS ("./rscons").
- Run
./rscons run
to run HOS in QEMU.