aboutsummaryrefslogtreecommitdiff
path: root/davidb-mcuboot/builders.sh
diff options
context:
space:
mode:
authorDavid Brown <david.brown@linaro.org>2017-07-20 08:48:50 -0600
committerDavid Brown <david.brown@linaro.org>2017-07-20 08:56:59 -0600
commitf90fe02e627d219bce41fdf9828143e5632e195a (patch)
treeb2b62933cb56dc25c66c0ae620d4e39ff53d661c /davidb-mcuboot/builders.sh
parent322a5f68080b740ca08b4e36b0725e5bf041a7cd (diff)
davidb-mcuboot: Initial version
Started with zephyr-aeolis. Currently builds pull-request 85, since the changes to allow this build are still pending on the project. Change-Id: Iacd831cfd32df2cf75cfa389d19a6d0ea66811ee
Diffstat (limited to 'davidb-mcuboot/builders.sh')
-rwxr-xr-xdavidb-mcuboot/builders.sh73
1 files changed, 73 insertions, 0 deletions
diff --git a/davidb-mcuboot/builders.sh b/davidb-mcuboot/builders.sh
new file mode 100755
index 0000000000..6b510465da
--- /dev/null
+++ b/davidb-mcuboot/builders.sh
@@ -0,0 +1,73 @@
+#!/bin/bash
+
+sudo apt-get -q=2 update
+sudo apt-get -q=2 -y install ccache cmake g++-multilib gcc-arm-none-eabi git \
+ python-requests python-serial python3-serial python3-ply \
+ python3-yaml socat rsync device-tree-compiler
+
+set -ex
+
+echo "Current directory: "
+pwd
+echo "Environment"
+env
+
+git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools ${HOME}/depot_tools
+PATH=${HOME}/depot_tools:${PATH}
+mkdir ${WORKSPACE}
+git clone --depth 1 https://github.com/zephyrproject-rtos/zephyr ${WORKSPACE}/zephyr
+git clone --depth 1 https://github.com/runtimeco/mcuboot ${WORKSPACE}/mcuboot
+(cd ${WORKSPACE}/mcuboot; git fetch origin pull/85/head; git checkout -b pull85 FETCH_HEAD)
+git clone --depth 1 https://git.linaro.org/lite/linaro-aeolus.git ${WORKSPACE}
+echo "GIT_COMMIT=$(git rev-parse --short=8 HEAD)" > env_var_parameters
+
+# Toolchains are pre-installed and come from:
+# https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/6_1-2017q1/gcc-arm-none-eabi-6-2017-q1-update-linux.tar.bz2
+# https://github.com/zephyrproject-rtos/meta-zephyr-sdk/releases/download/0.9.1/zephyr-sdk-0.9.1-setup.run
+# To install Zephyr SDK: ./zephyr-sdk-0.9.1-setup.run --quiet --nox11 -- <<< "${HOME}/srv/toolchain/zephyr-sdk-0.9.1"
+
+case "${ZEPHYR_GCC_VARIANT}" in
+ gccarmemb)
+ export GCCARMEMB_TOOLCHAIN_PATH="${HOME}/srv/toolchain/gcc-arm-none-eabi-6-2017-q1-update"
+ ;;
+ zephyr)
+ mkdir -p ${HOME}/opt
+ ln -sf ${HOME}/srv/toolchain/zephyr-sdk-0.9.1 ${HOME}/opt/zephyr-sdk-0.9.1
+ export ZEPHYR_SDK_INSTALL_DIR="${HOME}/opt/zephyr-sdk-0.9.1"
+ ;;
+esac
+
+# Set build environment variables
+LANG=C
+ZEPHYR_BASE=${WORKSPACE}/zephyr
+export ZEPHYR_GCC_VARIANT=zephyr
+PATH=${ZEPHYR_BASE}/scripts:${PATH}
+export LANG ZEPHYR_BASE PATH
+#CCACHE_DIR="${HOME}/srv/ccache"
+#CCACHE_UNIFY=1
+#CCACHE_SLOPPINESS=file_macro,include_file_mtime,time_macros
+#USE_CCACHE=1
+#export CCACHE_DIR CCACHE_UNIFY CCACHE_SLOPPINESS USE_CCACHE
+env |grep '^ZEPHYR'
+
+echo ""
+echo "########################################################################"
+echo " Build"
+echo "########################################################################"
+
+# make_wrapper=zmake
+# [ "${PROJECT}" = "zephyr.js" ] && make_wrapper=zmake-z.js
+# bash -x ${make_wrapper} ${PROJECT} BOARD=${PLATFORM}
+
+cd ${WORKSPACE}
+source zephyr/zephyr-env.sh
+cd ${WORKSPACE}/mcuboot/samples/zephyr
+make full.bin
+
+cd ${WORKSPACE}
+mkdir -p out/${PLATFORM}
+# TODO: Get a timestamp or something in this artifact.
+mv mcuboot/samples/zephyr/full.bin ${WORKSPACE}/out/${PLATFORM}
+
+#CCACHE_DIR=${CCACHE_DIR} ccache -M 30G
+#CCACHE_DIR=${CCACHE_DIR} ccache -s