diff options
author | Ryan Harkin <ryan.harkin@linaro.org> | 2014-03-24 16:48:47 +0000 |
---|---|---|
committer | Ryan Harkin <ryan.harkin@linaro.org> | 2014-03-24 17:11:59 +0000 |
commit | d7339d4f2e3322c6b61cec64af6ffdef30d63dcb (patch) | |
tree | 1dc257fdb3d4eda5508869a5392d4bc3c388b2b9 | |
parent | fc1be0c9813138c15b12fe04d0abcd786c1e053e (diff) |
Support multiple platforms
Add a platform variable and use it to decide which binaries to build.
We were using the "linaro" branch of the repo, however, we now have a
specific branch for each platform we support.
Initially, this will have the same content the same as all the other
branches, however, it doesn't have to.
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
-rwxr-xr-x | fvp-pre-boot.sh | 60 |
1 files changed, 33 insertions, 27 deletions
diff --git a/fvp-pre-boot.sh b/fvp-pre-boot.sh index 36b9e81..66d2282 100755 --- a/fvp-pre-boot.sh +++ b/fvp-pre-boot.sh @@ -22,27 +22,29 @@ if [ -z "${WORKSPACE}" ]; then export JOB_NAME=${JOB_NAME:-fvp-pre-boot} fi +repo=arm-trusted-firmware +repo_url=/linaro/g.l.o/arm/models/ case "${JOB_NAME}" in - fvp-pre-boot) - repo=arm-trusted-firmware - repo_url=/linaro/g.l.o/arm/models/ - branch=linaro + juno*) + platform=juno ;; - fvp-pre-boot-master) - repo=arm-trusted-firmware - repo_url=git://git.linaro.org/arm/models - branch=master + fvp*) + platform=fvp ;; - fvp-pre-boot-integration) - repo=arm-trusted-firmware - repo_url=git://git.linaro.org/arm/models - branch=integration +esac +case "${JOB_NAME}" in + juno-firmware) + branch=juno + ;; + fvp-pre-boot fvp-base-firmware) + branch=fvp-base ;; - fvp-pre-boot-upstream) - repo=arm-trusted-firmware - repo_url=http://github.com/ARM-software + juno-firmware-master fvp-pre-boot-master fvp-base-firmware-master) branch=master ;; + juno-firmware-integration fvp-pre-boot-integration fvp-base-firmware-integration) + branch=integration + ;; *) echo "Invalid JOB_NAME $JOB_NAME" exit 1 @@ -145,25 +147,29 @@ make -C ${basetools} export TARGET=${TARGET:-RELEASE} export TOOLCHAIN=${TOOLCHAIN:-ARMLINUXGCC} -CROSS_COMPILE=aarch64-linux-gnu- \ - build \ - -a AARCH64 \ - -b ${TARGET} \ - -t ${TOOLCHAIN} \ - -p ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc \ - -D ARM_FOUNDATION_FVP=1 -export BL33=${EDK_WORKSPACE}/Build/ArmVExpress-FVP-AArch64/${TARGET}_${TOOLCHAIN}/FV/FVP_AARCH64_EFI.fd -count_errors $? -cp -a ${BL33} ${builddir}/uefi_fvp-base.bin + +if [ "${platform}" == "fvp" ]; +then + CROSS_COMPILE=aarch64-linux-gnu- \ + build \ + -a AARCH64 \ + -b ${TARGET} \ + -t ${TOOLCHAIN} \ + -p ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc \ + -D ARM_FOUNDATION_FVP=1 + export BL33=${EDK_WORKSPACE}/Build/ArmVExpress-FVP-AArch64/${TARGET}_${TOOLCHAIN}/FV/FVP_AARCH64_EFI.fd + count_errors $? + cp -a ${BL33} ${builddir}/uefi_fvp-base.bin +fi ################################################################################ # Build the ARM Trusted Firmware binaries (BL1, BL2 and BL31) cd ${REPO_WORKSPACE} -make PLAT=fvp all fip +make PLAT=${platform} all fip count_errors $? # Copy the ARM Trusted Firmware binaries into the build directory -cp -a ${REPO_WORKSPACE}/build/fvp/release/*.bin ${builddir} +cp -a ${REPO_WORKSPACE}/build/${platform}/release/*.bin ${builddir} # If nothing build, return an error if [ $built_count -eq 0 ]; then |