summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeif Lindholm <leif.lindholm@linaro.org>2017-10-18 16:19:16 +0100
committerLeif Lindholm <leif.lindholm@linaro.org>2017-10-18 16:19:16 +0100
commita300bd7d3c90686bd8f6cbdf882d0f960e05fee0 (patch)
treed4b558f8a0efbb62f0e5af9945e2bb9cc62c9e9b
initial import
In preparation for Enterprise Reference Firmware release 17.10. Contains: - build.sh - platforms.config - .gitignore Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
-rw-r--r--.gitignore6
-rwxr-xr-xbuild.sh108
-rw-r--r--platforms.config122
3 files changed, 236 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..cebaaeb
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+Build/
+arm-trusted-firmware/
+edk2/
+edk2-platforms/
+edk2-non-osi/
+uefi-tools/
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..78a6776
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,108 @@
+#!/bin/bash
+
+BUILD_OPTIONS="-c platforms.config -b DEBUG -b RELEASE"
+
+ARM_TF_REPO=https://github.com/ARM-software/arm-trusted-firmware.git
+EDK2_REPO=https://github.com/tianocore/edk2.git
+EDK2_PLATFORMS_REPO=https://github.com/tianocore/edk2-platforms.git
+EDK2_NON_OSI_REPO=https://github.com/tianocore/edk2-non-osi.git
+UEFI_TOOLS_REPO=https://git.linaro.org/uefi/uefi-tools.git
+
+ARM_TF_HASH=ccd0c24cf89cb2195cbb38b6bb0639769afef7c5
+EDK2_HASH=4bbf39632c840e32996e8d43137f23fb43282859
+EDK2_PLATFORMS_HASH=1727ed8024639f32f75c4eb23c4b5691a52aa922
+EDK2_NON_OSI_HASH=5f76141f299780cb3a64f007126261c6c3157d75
+UEFI_TOOLS_HASH=42eac07beb4da42a182d2a87d6b2e928fc9a31cf
+
+REPO_ORIGIN=
+REPO_HASH=
+set_current_repo()
+{
+ case $1 in
+ arm-trusted-firmware)
+ REPO_ORIGIN=$ARM_TF_REPO
+ REPO_HASH=$ARM_TF_HASH
+ ;;
+ edk2)
+ REPO_ORIGIN=$EDK2_REPO
+ REPO_HASH=$EDK2_HASH
+ ;;
+ edk2-platforms)
+ REPO_ORIGIN=$EDK2_PLATFORMS_REPO
+ REPO_HASH=$EDK2_PLATFORMS_HASH
+ ;;
+ edk2-non-osi)
+ REPO_ORIGIN=$EDK2_NON_OSI_REPO
+ REPO_HASH=$EDK2_NON_OSI_HASH
+ ;;
+ uefi-tools)
+ REPO_ORIGIN=$UEFI_TOOLS_REPO
+ REPO_HASH=$UEFI_TOOLS_HASH
+ ;;
+ *)
+ echo "Invalid repository '$1'" >&2
+ exit 1
+ ;;
+ esac
+
+ echo REPO_ORIGIN=$REPO_ORIGIN
+ echo REPO_HASH=$REPO_HASH
+}
+
+update_repo()
+{
+ set_current_repo $1
+
+ cd $1
+
+ CURRENT_ORIGIN=`git config --get remote.origin.url`
+ if [ $REPO_ORIGIN != $CURRENT_ORIGIN ]; then
+ echo "Existing checkout of '$1' has unexpected origin '$REPO_ORIGIN'" >&2
+ exit 1
+ fi
+
+ git checkout master
+ [ $? -ne 0 ] && echo "Failed to check out master branch!" >&2 && exit 1
+
+ git fetch origin
+ [ $? -ne 0 ] && echo "Failed to fetch from '$CURRENT_ORIGIN'!" >&2 && exit 1
+
+ git reset --hard $REPO_HASH
+ [ $? -ne 0 ] && echo "Failed to reset '$1' to '$REPO_HASH'!" >&2 && exit 1
+
+ cd -
+}
+
+get_repo()
+{
+ TARGET_DIR=$1
+ if [ -d $TARGET_DIR ]; then
+ update_repo $TARGET_DIR
+ if [ $? -ne 0 ]; then
+ echo "Failed to obtain specified version of '$TARGET_DIR'" >&2
+ exit 1
+ fi
+ else
+ set_current_repo $1
+ echo git clone $REPO_ORIGIN
+ git clone $REPO_ORIGIN
+ fi
+}
+
+build_all()
+{
+ echo ./uefi-tools/edk2-build.sh $BUILD_OPTIONS all
+ ./uefi-tools/edk2-build.sh $BUILD_OPTIONS all
+}
+
+BUILD_OPTIONS="$BUILD_OPTIONS $*"
+
+for repo in arm-trusted-firmware edk2 edk2-platforms edk2-non-osi uefi-tools
+do
+ echo "$repo"
+ get_repo $repo
+done
+
+rm -rf Build
+
+build_all
diff --git a/platforms.config b/platforms.config
new file mode 100644
index 0000000..a2823f4
--- /dev/null
+++ b/platforms.config
@@ -0,0 +1,122 @@
+# Platform build configurations for Linaro EDK2 builds
+# ====================================================
+# The configuration file format is extremely simplistic:
+# - Each platform has a short name.
+# - A platform entry starts by the short name held in square brackets, '[]'
+# - Within each entry, all options are described in a NAME=VALUE scheme,
+# with the name being whatever comes before the first '=' on the line,
+# and the value being everything that comes after it.
+#
+# Mandatory options:
+# - LONGNAME A more descriptive name of the platform.
+# - DSC Pointer to the EDK2 build description file. (The
+# pandaboard is excused, all other ports must have this.)
+# - ARCH String describing the architecture to build for.
+# Currently supported are AARCH32 and AARCH64.
+# - UEFI_BIN Name of executable image produced.
+# - UEFI_IMAGE_DIR Build output directory name, relative to 'Build'.
+#
+# Options for Trusted OS
+# Note that OP-TEE (https://github.com/OP-TEE/optee_os) is the only currently
+# supported Trusted OS
+# - BUILD_TOS Set to "yes" if the build should automatically build
+# Trusted OS, mainly for ARM Trusted Firmware.
+# If this is set, you must also set ATF_SPD!
+# Else we will not know which specific Trusted OS to
+# build.
+# Set to "debug" to create a debug build.
+# - TOS_PLATFORM Platform name for Trusted OS build, if
+# different from ARM Trusted Firmware platform
+# or UEFI platform name.
+# - TOS_PLATFORM_FLAVOR If a core platform has multiple flavors, specify which
+# flavor here.
+#
+# Options for ARM Trusted Firmware platforms
+# - BUILD_ATF Set to "yes" if the build should automatically build
+# ARM Trusted Firmware and a fip containing UEFI image.
+# Set to "debug" to create a debug build.
+# - ATF_PLATFORM Platform name for ARM Trusted Firmware build, if
+# different from UEFI platform name.
+# - SCP_BIN SCP image to pass to ARM Trusted Firmware.
+# - TOS_BIN Trusted OS image to pass to ARM Trusted Firmware.
+# The path is relative to
+# $EDK2_DIR/Build/$PLATFORM_IMAGE_DIR/$BUILD_PROFILE/FV/.
+# To actually build the Trusted OS, you must also set
+# ATF_SPD.
+# - ATF_SPD Name of Secure Payload Dispatcher
+# To actually build the Trusted OS, you must also set
+# TOS_BIN.
+#
+# Optional options:
+# - BUILDFLAGS Any special flags you want to pass to the build command.
+# - ATF_BUILDFLAGS Any special flags you want to pass to the ARM Trusted
+# Firmware build command.
+# - TOS_BUILDFLAGS Any special flags you want to pass to the Trusted OS
+# build command.
+# - EXTRA_FILES Any additional files to be copied to output dir.
+# - PREBUILD_CMDS Any commands you want to execute before the build step.
+# - POSTBUILD_CMDS Any commands you want to execute after the build step.
+# - PACKAGES_PATH Additional directories to search for packages under.
+# - INF Point to a .inf (in addition to a .dsc) in order to
+# build a single component (standalone driver/app).
+#
+
+[juno]
+LONGNAME=aarch64 Juno
+DSC=Platform/ARM/JunoPkg/ArmJuno.dsc
+BUILDFLAGS=
+ARCH=AARCH64
+BUILD_ATF=yes
+SCP_BIN=Platform/ARM/Juno/bl30.bin
+UEFI_BIN=BL33_AP_UEFI.fd
+UEFI_IMAGE_DIR=ArmJuno
+
+# ARM FVP BASE AEMv8-A model
+[fvp]
+LONGNAME=aarch64 FVP RTSM
+DSC=Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc
+BUILDFLAGS=-D EDK2_ENABLE_SMSC_91X=1 -D EDK2_ENABLE_PL111=1
+ARCH=AARCH64
+BUILD_ATF=yes
+UEFI_BIN=FVP_AARCH64_EFI.fd
+UEFI_IMAGE_DIR=ArmVExpress-FVP-AArch64
+
+[overdrive]
+LONGNAME=AMD Overdrive
+BUILDFLAGS=-D DO_CAPSULE=1
+DSC=Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
+ARCH=AARCH64
+
+[cello]
+LONGNAME=LeMaker Cello
+DSC=Platform/LeMaker/CelloBoard/CelloBoard.dsc
+ARCH=AARCH64
+
+[d02]
+LONGNAME=Hisilicon D02
+DSC=Platform/Hisilicon/D02/Pv660D02.dsc
+ARCH=AARCH64
+
+[d03]
+LONGNAME=Hisilicon D03
+DSC=Platform/Hisilicon/D03/D03.dsc
+ARCH=AARCH64
+
+[d05]
+LONGNAME=HiSilicon D05
+DSC=Platform/Hisilicon/D05/D05.dsc
+ARCH=AARCH64
+
+[qemu-arm]
+LONGNAME=QEMU ARM Emulator
+DSC=ArmVirtPkg/ArmVirtQemu.dsc
+ARCH=ARM
+UEFI_BIN=QEMU_EFI.fd
+UEFI_IMAGE_DIR=ArmVirtQemu-ARM
+
+[qemu-aarch64]
+LONGNAME=QEMU AArch64 Emulator
+DSC=ArmVirtPkg/ArmVirtQemu.dsc
+ARCH=AARCH64
+UEFI_BIN=QEMU_EFI.fd
+UEFI_IMAGE_DIR=ArmVirtQemu-AARCH64