1
2
3
4
5
git clone https://github.com/tianocore/edk2.git
cd edk2
git submodule update --init CryptoPkg/Library/OpensslLib/openssl
source edksetup.sh
make -C BaseTools

vim Conf/target.txt

1
2
3
ACTIVE_PLATFORM       = OvmfPkg/OvmfPkgX64.dsc
TARGET_ARCH = X64
TOOL_CHAIN_TAG = GCC5
1
build -DFD_SIZE_2MB -DDEBUG_ON_SERIAL_PORT=TRUE

The binary is located at Build/OvmfX64/DEBUG_GCC5/FV/OVMF.fd after a successful build.

When you create new session, need to run source edksetup.sh firstly.