1# UEFI Boot 2 3Cloud Hypervisor supports UEFI boot through the utilization of the EDK II based UEFI firmware. 4 5## Building UEFI Firmware 6 7To avoid any unnecessary issues, it is recommended to use Ubuntu 18.04 and its default toolset. Any other compatible Linux distribution is otherwise suitable, however it is suggested to use a temporary Docker container with Ubuntu 18.04 for a quick build on an existing Linux machine. 8 9The commands below will compile an OVMF firmware suitable for Cloud Hypervisor. 10 11```shell 12sudo apt-get update 13sudo apt-get install uuid-dev nasm iasl build-essential python3-distutils git 14 15git clone https://github.com/cloud-hypervisor/edk2 -b ch 16cd edk2 17. edksetup.sh 18git submodule update --init 19 20echo "ACTIVE_PLATFORM=OvmfPkg/CloudHv/CloudHvX64.dsc" >> Conf/target.txt 21echo "TARGET_ARCH=X64" >> Conf/target.txt 22echo "TOOL_CHAIN_TAG=GCC5" >> Conf/target.txt 23 24make -C ./BaseTools 25build 26``` 27 28After the successful build, the resulting firmware binaries are available under `Build/CloudHvX64/DEBUG_GCC5/FV` underneath the edk2 checkout. 29 30## Using OVMF Binaries 31 32Any UEFI capable image can be booted using the Cloud Hypervisor specific firmware. Windows guests under Cloud Hypervisor only support UEFI boot, therefore OVMF is mandatory there. 33 34To make Cloud Hypervisor use UEFI boot, pass the `CLOUDHV.fd` file path as an argument to the `--kernel` option. The firmware file will be opened in read only mode. 35 36# Links 37 38- [OVMF wiki](https://github.com/tianocore/tianocore.github.io/wiki/OVMF) 39- [Cloud Hypervisor specific tree](https://github.com/cloud-hypervisor/edk2/tree/ch) 40