aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Leach <mike.leach@linaro.org>2023-03-16 22:25:06 +0000
committerMike Leach <mike.leach@linaro.org>2023-07-14 11:12:37 +0100
commit17a5c0467c376da2f9a5cf1afe61e4bb513d4f93 (patch)
treebf88d53ebcad13ef6a40152e0f593cd295dac4e3
parent4cee9320a3653e1bb4d85c290cb8b23f67f3a1b8 (diff)
build: dev: Add helper script to build juno firmware.scp-2.11-635697544-dt-config-v2
Script allows selection of generate, cpp_only or full target builds used when developing DT support. Uses Makefile.cmake to build. Signed-off-by: Mike Leach <mike.leach@linaro.org>
-rwxr-xr-xscp-build-juno-fw.bash76
1 files changed, 76 insertions, 0 deletions
diff --git a/scp-build-juno-fw.bash b/scp-build-juno-fw.bash
new file mode 100755
index 000000000000..0a0547eb5fa4
--- /dev/null
+++ b/scp-build-juno-fw.bash
@@ -0,0 +1,76 @@
+#!/bin/bash
+# build juno fw
+
+TARGETS="all"
+OPERATION="full"
+VERBOSE=
+MODE=
+VALID_TARGETS="scp_ramfw scp_romfw scp_romfw_bypass"
+
+print_help() {
+ echo "CMake builder for juno"
+ echo "Defaults to all targets, full build"
+ echo "options:"
+ echo "-v : verbose build output"
+ echo "-t : select specific target - one of ${VALID_TARGETS}"
+ echo "-d : build debug mode"
+ echo "-z : supress DT build flow and use old modules"
+ echo "-o : operation is one of:"
+ echo " generate - generate only"
+ echo " cpp_only - stop after C pre-processor to check macro generation"
+ echo " clean - clean build area"
+ exit 1
+}
+
+check_target () {
+ for valid in ${VALID_TARGETS}
+ do
+ if [ "$1" == "${valid}" ]; then
+ return
+ fi
+ done
+ echo "Invalid target $1"
+ print_help
+}
+
+while getopts o:t:vdzh flag
+do
+ case "${flag}" in
+ o) OPERATION=${OPTARG};;
+ t) TARGETS=${OPTARG};;
+ v) VERBOSE="V=y";;
+ d) MODE="MODE=debug";;
+ z) SUPPRESS_DT="NO_DT_BUILD=1"
+ h) print_help;;
+ esac
+done
+
+if [ "${TARGETS}" == "all" ]; then
+ TARGETS="${VALID_TARGETS}"
+fi
+
+for target in ${TARGETS}
+do
+ echo "Building: Op=${OPERATION}, target=${target}, Verbose=${VERBOSE}, Suppress DT build=${SUPPRESS_DT} "
+ check_target ${target}
+ if [ "${OPERATION}" == "generate" ]; then
+ make -f Makefile.cmake PRODUCT=juno BUILD_SYSTEM=Make BUILD_TARGET=${target} ${MODE} ${SUPPRESS_DT} generate $VERBOSE
+ elif [ "${OPERATION}" == "cpp_only" ]; then
+ make -f Makefile.cmake PRODUCT=juno BUILD_SYSTEM=Make BUILD_TARGET=${target} ${MODE} ${SUPPRESS_DT} CPP_HALT=1 $VERBOSE
+ elif [ "${OPERATION}" == "clean" ]; then
+ make -f Makefile.cmake clean
+ # clean removes the full build dir - only do once
+ break
+ elif [ "${OPERATION}" == "full" ]; then
+ make -f Makefile.cmake PRODUCT=juno BUILD_SYSTEM=Make ${MODE} ${SUPPRESS_DT} BUILD_TARGET=${target} $VERBOSE
+ else
+ echo "Invalid Operation specified"
+ print_help
+ fi
+done
+
+exit 0
+
+
+
+