aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandrine Bailleux <sandrine.bailleux@arm.com>2015-08-07 11:16:56 +0100
committerRyan Harkin <ryan.harkin@linaro.org>2015-08-25 15:23:19 +0100
commit279842cd27edd2cef49e0eb6cbc67dd3ad205378 (patch)
tree0fd3006a77090a6a8254a70ae73e96fafd829a57
parent8c6458a73aa5966bbf32ae1551fa6b13c7079449 (diff)
arm-tf: Allow to configure build type from command line
Instead of hard-coding the build type (debug/release) in the variant file, allow to configure it from the command line. If it is not specified on the command line then the variant file sets its default value. Also rename 'ARMTF_DEBUG_ENABLED' into 'ARM_TF_DEBUG_ENABLED' to align it with the other Trusted Firmware environment variables. Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
-rwxr-xr-xbuild-arm-tf.sh9
-rw-r--r--variants/fvp-busybox2
-rw-r--r--variants/juno-busybox2
3 files changed, 7 insertions, 6 deletions
diff --git a/build-arm-tf.sh b/build-arm-tf.sh
index bacef8b..c4bcef9 100755
--- a/build-arm-tf.sh
+++ b/build-arm-tf.sh
@@ -37,7 +37,7 @@
# ARM_TF_BUILD_ENABLED - Flag to enable building ARM Trusted Firmware
# ARM_TF_PATH - sub-directory containing ARM Trusted Firmware code
# ARM_TF_PLATS - List of platforms to be built (from available in arm-tf/plat)
-# ARMTF_DEBUG_ENABLED - 1 = debug, 0 = release build
+# ARM_TF_DEBUG_ENABLED - 1 = debug, 0 = release build
#
do_build ()
@@ -45,8 +45,9 @@ do_build ()
if [ "$ARM_TF_BUILD_ENABLED" == "1" ]; then
pushd $TOP_DIR/$ARM_TF_PATH
for plat in $ARM_TF_PLATS; do
- make -j $PARALLELISM PLAT=$plat DEBUG=$ARMTF_DEBUG_ENABLED
+ make -j $PARALLELISM PLAT=$plat DEBUG=$ARM_TF_DEBUG_ENABLED
done
+
make fiptool
popd
fi
@@ -58,7 +59,7 @@ do_clean ()
pushd $TOP_DIR/$ARM_TF_PATH
for plat in $ARM_TF_PLATS; do
- make PLAT=$plat DEBUG=$ARMTF_DEBUG_ENABLED clean
+ make PLAT=$plat DEBUG=$ARM_TF_DEBUG_ENABLED clean
done
make -C tools/fip_create clean
popd
@@ -74,7 +75,7 @@ do_package ()
for plat in $ARM_TF_PLATS; do
mkdir -p ${OUTDIR}/$plat
local mode=release
- [ "$ARMTF_DEBUG_ENABLED" == "1" ] && mode=debug
+ [ "$ARM_TF_DEBUG_ENABLED" == "1" ] && mode=debug
for bin in $TOP_DIR/$ARM_TF_PATH/build/$plat/${mode}/bl*.bin; do
cp ${bin} ${OUTDIR}/$plat/tf-$(basename ${bin})
done
diff --git a/variants/fvp-busybox b/variants/fvp-busybox
index d813eab..633ce14 100644
--- a/variants/fvp-busybox
+++ b/variants/fvp-busybox
@@ -65,7 +65,7 @@ ARM_TF_BUILD_ENABLED=1
BUILD_SCRIPTS=$BUILD_SCRIPTS"build-arm-tf.sh "
ARM_TF_PATH=arm-tf
ARM_TF_PLATS="fvp"
-ARMTF_DEBUG_ENABLED=1
+ARM_TF_DEBUG_ENABLED=${ARM_TF_DEBUG_ENABLED:-1}
BUSYBOX_BUILD_ENABLED=1
BUILD_SCRIPTS=$BUILD_SCRIPTS"build-busybox.sh "
diff --git a/variants/juno-busybox b/variants/juno-busybox
index d15762e..da5f6d3 100644
--- a/variants/juno-busybox
+++ b/variants/juno-busybox
@@ -65,7 +65,7 @@ ARM_TF_BUILD_ENABLED=1
BUILD_SCRIPTS=$BUILD_SCRIPTS"build-arm-tf.sh "
ARM_TF_PATH=arm-tf
ARM_TF_PLATS="juno"
-ARMTF_DEBUG_ENABLED=1
+ARM_TF_DEBUG_ENABLED=${ARM_TF_DEBUG_ENABLED:-1}
BUSYBOX_BUILD_ENABLED=1
BUILD_SCRIPTS=$BUILD_SCRIPTS"build-busybox.sh "