From ebad2e8acc29afef9018386c5b05f8d4b460422a Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Mon, 27 Sep 2021 19:19:43 -0700 Subject: [PATCH 1/2] zephyr/docker-build: unset stale ZEPHYR_SDK_INSTALL_DIR, symlink toolchains Currently set to obsolete 0.12.4. Better remove it here for everyone rather than overriding it in Github Actions only. Also symlinks the toolchains in /opt to /home to fix autodetection Signed-off-by: Marc Herbert --- zephyr/docker-build.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/zephyr/docker-build.sh b/zephyr/docker-build.sh index 757c66e7724f..006d99278975 100755 --- a/zephyr/docker-build.sh +++ b/zephyr/docker-build.sh @@ -18,6 +18,14 @@ test -e ./scripts/xtensa-build-zephyr.sh sudo apt-get update sudo apt-get -y install tree +# Unset stale ZEPHYR_SDK_INSTALL_DIR variable pointing to obsolete +# 0.12.4 as of container 0.18.x +unset ZEPHYR_SDK_INSTALL_DIR + +# Zephyr's CMake does not look in /opt but it searches $HOME +ls -ld /opt/toolchains/zephyr-sdk-* +ln -s /opt/toolchains/zephyr-sdk-* ~/ + if test -e zephyrproject; then ./scripts/xtensa-build-zephyr.sh -a "$@" else From 1dce5423d530b2e7dd2a68a238c29a1b01cb7bf5 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Mon, 27 Sep 2021 19:22:46 -0700 Subject: [PATCH 2/2] .github/zephyr: switch the container back to the :latest version Tired of fixing Zephyr breakages all the time (latest in https://github.com/zephyrproject-rtos/zephyr/pull/38733) Also unhardcode ZEPHYR_SDK_INSTALL_DIR thanks to the previous commit. Signed-off-by: Marc Herbert --- .github/workflows/zephyr.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/zephyr.yml b/.github/workflows/zephyr.yml index ec463602e50f..ab81c6ba8008 100644 --- a/.github/workflows/zephyr.yml +++ b/.github/workflows/zephyr.yml @@ -15,8 +15,9 @@ jobs: # From time to time this will catch a git tag and change SOF_VERSION with: {fetch-depth: 10, submodules: recursive} + # Note: env variables can be passed to the container with + # -e https_proxy=... - name: build run: docker run -v "$(pwd)":/workdir - -e ZEPHYR_SDK_INSTALL_DIR='/opt/toolchains/zephyr-sdk-0.13.1' - docker.io/zephyrprojectrtos/zephyr-build:v0.18.4 + docker.io/zephyrprojectrtos/zephyr-build:latest ./zephyr/docker-build.sh -- -DEXTRA_CFLAGS='-Werror'