1. Download and compiler the QEMU after 2.2

     git clone https://github.com/qemu/qemu.git

2. Build a aarch64-softmmu

3. Get EDK2 cod

     git clone https://github.com/tianocore/edk2.git

4. Setup a cross compiler environment

5. Build

source edksetup.sh
export GCC48_AARCH64_PREFIX=aarch64-linux-gnu-

make -C BaseTools

build -a AARCH64 -t GCC48 -p ArmVirtPkg/ArmVirtQemu.dsc

6. You will find the firmware image below

Build/ArmVirtQemu-AARCH64/DEBUG_GCC48/FV/QEMU_EFI.fd

7. UEFI Secure Boot

build -a AARCH64 -t GCC48 -p ArmVirtPkg/ArmVirtQemu.dsc \
    -D SECURE_BOOT_ENABLE