You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/12/19 09:52:51 UTC

[GitHub] utzig commented on a change in pull request #13: Add Zephyr support to CI

utzig commented on a change in pull request #13: Add Zephyr support to CI
URL: https://github.com/apache/mynewt-nffs/pull/13#discussion_r242852237
 
 

 ##########
 File path: ci/zephyr_install.sh
 ##########
 @@ -0,0 +1,33 @@
+#!/bin/bash -x
+
+PWD=$(pwd)
+
+ZEPHYR_SDK_RELEASE="0.9.5"
+ZEPHYR_SDK="zephyr-sdk-${ZEPHYR_SDK_RELEASE}-setup.run"
+ZEPHYR_SDK_URL="https://github.com/zephyrproject-rtos/meta-zephyr-sdk/releases/download/${ZEPHYR_SDK_RELEASE}/${ZEPHYR_SDK}"
+ZEPHYR_SDK_DIR="${HOME}/zephyr-sdk"
+
+export ZEPHYR_BASE="$HOME/zephyr"
+ZEPHYR_NFFS_DIR="${ZEPHYR_BASE}/ext/fs/nffs"
+
+export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
+
+git clone --depth=1 https://github.com/zephyrproject-rtos/zephyr.git $ZEPHYR_BASE
+source ${ZEPHYR_BASE}/zephyr-env.sh
+
+download_dir=$HOME/zephyr_sdk_download
+mkdir -p ${download_dir}
+
+# TODO: cache zephyr-sdk
+wget -O ${download_dir}/${ZEPHYR_SDK} -c ${ZEPHYR_SDK_URL}
+[[ $? -ne 0 ]] && exit 1
+
+chmod +x ${download_dir}/${ZEPHYR_SDK}
+${download_dir}/${ZEPHYR_SDK} --quiet -- -d "${ZEPHYR_SDK_DIR}"
+[[ $? -ne 0 ]] && exit 1
+
+pip install PyYAML pyelftools
 
 Review comment:
   Maybe, because I didn't know this actually existed! :-P
   
   So I was looking at that requirements.txt and it installs a whole lot of things that we don't need, take `pyocd` for example, which is used to flash NXP devices, so I think I am happy installing just the 2 packages above, which provide all that is needed to build and run on qemu!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services