Build firmware on Linux using Linaro uefi-tools

Linaro provides a set of useful scripts to build the TianoCore EDKII UEFI firmware on a Linux development PC. This section of the guide outlines the additional steps that are required for building firmware using the uefi-tools from Linaro.

System requirements

Before this can be done, you must have the following:

Tool  Description Install instructions
Python 2.7and Python 3 The scripts in the uefi-tools package require Python 2.7, whereas EDKII defaults to use Python3.
$ sudo apt install python python3 python3-distutils
Arm cross compiler toolchain The uefi-tools use the gcc-aarch64-linux-gnu toolchain.
$ sudo apt install gcc-aarch64-linux-gnu
ACPICA tools The uefi-tools use the iASL compiler that is packaged with the ACPICA-tools and distributed with the OS.
$ sudo apt install acpica-tools
Cloning the uefi-tools source code repository In a command window, make sure you are in workspace (source) folder.
git clone https://git.linaro.org/uefi/uefi-tools.git

Follow either Build the firmware for Arm FVP Base AEMv8A-AEMv8A model platform or Build firmware for Arm Juno platform. These show you how to build the firmware for your choice of Arm development platform.

Build the firmware for Arm FVP Base AEMv8A-AEMv8A model platform

To build the firmware for FVP Base AEMv8A-AEMv8A platform, run the following commands:

$ cd $WORKSPACE
$ ./uefi-tools/edk2-build.sh -b DEBUG fvp -v
$ ./uefi-tools/edk2-build.sh -b RELEASE fvp -v

The firmware binaries are at the following location:

$WORKSPACE/Build/ArmVExpress-FVP-AArch64/<DEBUG|RELEASE>_GCC5/FV/FVP_AARCH64_EFI.fd
Build the firmware for Arm Juno platform

To build the firmware for Arm Juno platform, run the following commands:

$ cd $WORKSPACE
$ ./uefi-tools/edk2-build.sh -b DEBUG juno -v
$ ./uefi-tools/edk2-build.sh -b RELEASE juno -v

The firmware binaries are at the following location:

$WORKSPACE/Build/ArmJuno/<DEBUG|RELEASE>_GCC5/FV/BL33_AP_UEFI.fd

The uefi-tools have additional options for building firmware. To view these options, type the following command in a terminal window:

$ ./uefi-tools/edk2-build.sh -h
Previous Next