=====UEFI HTTP Boot (instead of TFTP) =====
This how-to is based on Debian 9 and will result in a compiled EFI firmware binary, capable of booting over HTTP instead of TFTP.
New systems that support UEFI 2.5 and up ([[https://www.hpe.com/us/en/product-catalog/detail/pip.6935826.html|HPE]], [[https://lenovopress.com/lp0736.pdf|Lenovo]]) will be able to boot over HTTP(S). Compared to TFTP, HTTP is faster, can transfer much larger files and can be encrypted (TLS).
Documentation:
* Build OVMF: [[https://github.com/tianocore/tianocore.github.io/wiki/How-to-build-OVMF]]
* HTTP Boot: [[https://github.com/tianocore/tianocore.github.io/wiki/HTTP-Boot]]
====Compile EDK II====
* Install required packages: sudo apt-get install build-essential uuid-dev iasl git nasm
* Clone git repository:mkdir ~/src
cd ~/src
git clone https://github.com/tianocore/edk2
* Compile build tools:cd ~/src/edk2
make -C BaseTools
. edksetup.sh
* Build the EDK II BaseTools:cd ..
make -C edk2/BaseTools
* Setup build shell environmentcd ~/src/edk2
export EDK_TOOLS_PATH=$HOME/src/edk2/BaseTools
. edksetup.sh BaseTools
* Modify config ''Conf/target.txt''
ACTIVE_PLATFORM = OvmfPkg/OvmfPkgX64.dsc
TARGET_ARCH = X64
TARGET = NOOPT
TOOL_CHAIN_TAG = GCC5
* Enable HTTP boot in ''OvmfPkg/OvmfPkgX64.dsc'' DEFINE HTTP_BOOT_ENABLE = TRUE
* Build:build
* After successful compilation, the binary can be found in ''~/src/edk2/Build/OvmfX64/NOOPT_GCC5/FV/''
OVMF_CODE.fd Binary
OVMF_VARS.fd Variable store
====Test with qemu====
* Install qemu:sudo apt-get install qemu-system-x86
* Start VM with EFI firmware:
qemu-system-x86_64 \
-drive if=pflash,format=raw,readonly,file=OVMF_CODE.fd \
-drive if=pflash,format=raw,file=OVMF_VARS.fd \
-enable-kvm \
-m 1G \
-monitor stdio
Press ESC at the logo \\
{{::tianocore-esc.png?nolink|}}
Go to ''Boot Manager''\\
{{:efi-boot-manager.png?nolink|}}
Select ''UEFI HTTPv4'' \\
{{::efi-http.png?nolink|}}
{{tag>[qemu UEFI EFI Tianocore EDKII]}}