summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Harkin <ryan.harkin@linaro.org>2014-04-08 16:31:55 +0100
committerRyan Harkin <ryan.harkin@linaro.org>2014-04-08 16:43:23 +0100
commitd9243d014d268c887e66e200f56bad3bb22fdef3 (patch)
tree8b72569a6276d062a5cff9c08c92bd989635ab7c
parent74120fafaa040f32accefde1ed887fd5896382c7 (diff)
downloadfvp-pre-boot-d9243d014d268c887e66e200f56bad3bb22fdef3.tar.gz
juno: Use BL33 binary blob by default
Use the BL33 blob unless the ${BUILD_UEFI} environment variable is set to "yes". Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
-rwxr-xr-xfvp-pre-boot.sh161
1 files changed, 84 insertions, 77 deletions
diff --git a/fvp-pre-boot.sh b/fvp-pre-boot.sh
index 8fdb46c..f4dbac9 100755
--- a/fvp-pre-boot.sh
+++ b/fvp-pre-boot.sh
@@ -110,87 +110,94 @@ cd ${WORKSPACE}
set +e
################################################################################
-# Get the UEFI tools
-UEFI_TOOLS_DIR=${WORKSPACE}/uefi-tools
-if [ ! -d ${UEFI_TOOLS_DIR} ]; then
- git clone git://git.linaro.org/arm/uefi/uefi-tools.git
-fi
-
-# Build the latest UEFI binary
-case "${JOB_NAME}" in
- juno*)
- EDK_REPO=edk2-topics
- EDK_REPO_URL=git://git.linaro.org/arm/uefi/${EDK_REPO}.git
- EDK_BRANCH=juno
- ;;
- fvp*)
- #EDK_REPO=linaro-edk2
- #EDK_REPO_URL=git://git.linaro.org/uefi/${EDK_REPO}.git
- #EDK_BRANCH=release-prep
- EDK_REPO=edk2-topics
- EDK_REPO_URL=git://git.linaro.org/arm/uefi/${EDK_REPO}.git
- EDK_BRANCH=integration
- ;;
-esac
-
-EDK_WORKSPACE=${WORKSPACE}/${EDK_REPO}
-
-echo "EDK_REPO=${EDK_REPO}"
-echo "EDK_WORKSPACE=${EDK_WORKSPACE}"
-echo "EDK_BRANCH=${EDK_BRANCH}"
-
-if [ ! -d ${EDK_REPO} ]; then
- echo "UEFI dir does not exist"
- git clone --depth 1 ${EDK_REPO_URL} -b ${EDK_BRANCH}
+if [ "${platform}" == "juno" ] && [ "${BUILD_UEFI}" != "yes" ]; then
+ echo "Using pre-built binaries for Juno"
+ export BL30=${REPO_WORKSPACE}/bin/BL0_SCP_Boot_ROM.bin
+ export BL33=${REPO_WORKSPACE}/bin/bl33.bin
+ echo "BL30=${BL30}"
+ echo "BL33=${BL33}"
else
- echo "UEFI dir already exists; cleaning..."
+ # Get the UEFI tools
+ UEFI_TOOLS_DIR=${WORKSPACE}/uefi-tools
+ if [ ! -d ${UEFI_TOOLS_DIR} ]; then
+ git clone git://git.linaro.org/arm/uefi/uefi-tools.git
+ fi
+
+ # Build the latest UEFI binary
+ case "${JOB_NAME}" in
+ juno*)
+ EDK_REPO=edk2-topics
+ EDK_REPO_URL=git://git.linaro.org/arm/uefi/${EDK_REPO}.git
+ EDK_BRANCH=juno
+ ;;
+ fvp*)
+ #EDK_REPO=linaro-edk2
+ #EDK_REPO_URL=git://git.linaro.org/uefi/${EDK_REPO}.git
+ #EDK_BRANCH=release-prep
+ EDK_REPO=edk2-topics
+ EDK_REPO_URL=git://git.linaro.org/arm/uefi/${EDK_REPO}.git
+ EDK_BRANCH=integration
+ ;;
+ esac
+
+ EDK_WORKSPACE=${WORKSPACE}/${EDK_REPO}
+
+ echo "EDK_REPO=${EDK_REPO}"
+ echo "EDK_WORKSPACE=${EDK_WORKSPACE}"
+ echo "EDK_BRANCH=${EDK_BRANCH}"
+
+ if [ ! -d ${EDK_REPO} ]; then
+ echo "UEFI dir does not exist"
+ git clone --depth 1 ${EDK_REPO_URL} -b ${EDK_BRANCH}
+ else
+ echo "UEFI dir already exists; cleaning..."
+ cd ${EDK_WORKSPACE}
+ git reset --hard HEAD
+ git clean -dfx
+ fi
+
+ # Create the tarball of the UEFI source
cd ${EDK_WORKSPACE}
- git reset --hard HEAD
- git clean -dfx
-fi
+ scm_commit=`git log -n1 --pretty=format:%h`
+ if [ -z "${scm_commit}" ]; then
+ echo "Invalid git revision: ${scm_commit}" >&2
+ exit 1
+ fi
+ edk_pkg_source=linaro-edk2-release
+ edk_pkg_version=${base_version}+git${BUILD_NUMBER}+${scm_commit}
+ edk_pkg_dir=${edk_pkg_source}-${edk_pkg_version}
+
+ echo "edk_pkg_source=$edk_pkg_source"
+ echo "edk_pkg_version=$edk_pkg_version"
+ echo "edk_pkg_dir=$edk_pkg_dir"
+
+ git archive --format=tar --prefix=${edk_pkg_dir}/ ${EDK_BRANCH} -o uefi.tar
+ tar --concatenate --file=${pkg_tar} uefi.tar
+ bzip2 ${pkg_tar}
-# Create the tarball of the UEFI source
-cd ${EDK_WORKSPACE}
-scm_commit=`git log -n1 --pretty=format:%h`
-if [ -z "${scm_commit}" ]; then
- echo "Invalid git revision: ${scm_commit}" >&2
- exit 1
+ cd ${EDK_WORKSPACE}
+
+ # Fix WORKSPACE environment variable conflict with Jenkins
+ find ${EDK_WORKSPACE} -type f | xargs sed -i 's/WORKSPACE/EDK_WORKSPACE/g'
+
+ export TARGET=${TARGET:-RELEASE}
+
+ case "${platform}" in
+ juno)
+ ${UEFI_TOOLS_DIR}/uefi-build.sh -b ${TARGET} juno
+ count_errors $?
+ export BL30=${REPO_WORKSPACE}/bin/BL0_SCP_Boot_ROM.bin
+ export BL33=`pwd`/`find . -name BL32_AP_UEFI.fd`
+ cp -a ${BL33} ${builddir}/uefi_juno.bin
+ ;;
+ fvp)
+ ${UEFI_TOOLS_DIR}/uefi-build.sh -b ${TARGET} fvp_minimal
+ count_errors $?
+ export BL33=`pwd`/`find . -name FVP_AARCH64_EFI.fd`
+ cp -a ${BL33} ${builddir}/uefi_fvp-base.bin
+ ;;
+ esac
fi
-edk_pkg_source=linaro-edk2-release
-edk_pkg_version=${base_version}+git${BUILD_NUMBER}+${scm_commit}
-edk_pkg_dir=${edk_pkg_source}-${edk_pkg_version}
-
-echo "edk_pkg_source=$edk_pkg_source"
-echo "edk_pkg_version=$edk_pkg_version"
-echo "edk_pkg_dir=$edk_pkg_dir"
-
-git archive --format=tar --prefix=${edk_pkg_dir}/ ${EDK_BRANCH} -o uefi.tar
-tar --concatenate --file=${pkg_tar} uefi.tar
-bzip2 ${pkg_tar}
-
-cd ${EDK_WORKSPACE}
-
-# Fix WORKSPACE environment variable conflict with Jenkins
-find ${EDK_WORKSPACE} -type f | xargs sed -i 's/WORKSPACE/EDK_WORKSPACE/g'
-
-export TARGET=${TARGET:-RELEASE}
-
-
-case "${platform}" in
- juno)
- ${UEFI_TOOLS_DIR}/uefi-build.sh -b ${TARGET} juno
- count_errors $?
- export BL30=${REPO_WORKSPACE}/bin/BL0_SCP_Boot_ROM.bin
- export BL33=`pwd`/`find . -name BL32_AP_UEFI.fd`
- cp -a ${BL33} ${builddir}/uefi_juno.bin
- ;;
- fvp)
- ${UEFI_TOOLS_DIR}/uefi-build.sh -b ${TARGET} fvp_minimal
- count_errors $?
- export BL33=`pwd`/`find . -name FVP_AARCH64_EFI.fd`
- cp -a ${BL33} ${builddir}/uefi_fvp-base.bin
- ;;
-esac
################################################################################
# Build the ARM Trusted Firmware binaries (BL1, BL2 and BL31)