From d6e36c5711cd493f2ab4f54e1b99a33412ad6faf Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Mon, 11 May 2026 15:19:51 +0300 Subject: [PATCH 1/2] .github: add pull request workflow for Zephyr shell builds Add zephyr-shell.yml GitHub Actions workflow that builds Intel 'tgl', 'mtl' and 'lnl' platforms with Zephyr shell support enabled via: --overlay=sof/app/shell_overlay.conf This catches regressions in shell-enabled builds on every pull request. Signed-off-by: Kai Vehmanen --- .github/workflows/zephyr-shell.yml | 64 ++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/zephyr-shell.yml diff --git a/.github/workflows/zephyr-shell.yml b/.github/workflows/zephyr-shell.yml new file mode 100644 index 000000000000..23f8e6947b22 --- /dev/null +++ b/.github/workflows/zephyr-shell.yml @@ -0,0 +1,64 @@ +--- +# SPDX-License-Identifier: BSD-3-Clause +# Tools that can save round-trips to github and a lot of time: +# +# yamllint -f parsable zephyr-shell.yml +# pip3 install ruamel.yaml.cmd +# yaml merge-expand zephyr-shell.yml exp.yml && diff -w -u zephyr-shell.yml exp.yml +# +# github.com also has a powerful web editor that can be used without +# committing. + +name: Zephyr Shell + +# 'workflow_dispatch' allows running this workflow manually from the +# 'Actions' tab +# yamllint disable-line rule:truthy +on: [pull_request, workflow_dispatch] + +defaults: + run: + shell: bash + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-24.04 + container: + image: thesofproject/zephyr-lite:v0.29.0 + + strategy: + fail-fast: false + matrix: + platform: [tgl, mtl, lnl] + + steps: + - name: checkout + uses: actions/checkout@v4 + with: + path: sof + fetch-depth: 0 # fix git describe + filter: 'tree:0' + + - name: west update + working-directory: sof + run: | + west init -l + west update --narrow --fetch-opt=--depth=5 + + - name: print all available sdks in /opt/toolchains/ + run: | + ls -l /opt/toolchains/ + + - name: shell build + run: | + ln -s /opt/toolchains/zephyr-sdk-* ~/ + python sof/scripts/xtensa-build-zephyr.py \ + --cmake-args=-DEXTRA_CFLAGS=-Werror \ + --cmake-args=-DEXTRA_CXXFLAGS=-Werror \ + --cmake-args=-DEXTRA_AFLAGS='-Werror -Wa,--fatal-warnings' \ + --cmake-args=--warn-uninitialized \ + --overlay=sof/app/shell_overlay.conf \ + ${{ matrix.platform }} From 3c98c48d105ccb81e87619750e02450c3f2c16fb Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Fri, 27 Mar 2026 17:26:21 +0000 Subject: [PATCH 2/2] shell: fix build error In file included from /home/lrg/work/sof2/sof/zephyr/sof_shell.c:14: /home/lrg/work/sof2/sof/zephyr/sof_shell.c: In function 'cmd_sof_module_heap_usage': /home/lrg/work/sof2/sof/zephyr/sof_shell.c:66:77: error: 'struct module_config' has no member named 'heap_bytes' 66 | icd->id, usage, hwm, comp_mod(icd->cd)->priv.cfg.heap_bytes); | ^ /home/lrg/work/sof2/zephyr/include/zephyr/shell/shell.h:1292:47: note: in definition of macro 'shell_print' 1292 | shell_fprintf_normal(_sh, _ft "\n", ##__VA_ARGS__) | ^~~~~~~~~~~ Signed-off-by: Liam Girdwood Signed-off-by: Kai Vehmanen --- zephyr/sof_shell.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zephyr/sof_shell.c b/zephyr/sof_shell.c index f10a2c9275b5..9e90abe417bb 100644 --- a/zephyr/sof_shell.c +++ b/zephyr/sof_shell.c @@ -62,8 +62,8 @@ static int cmd_sof_module_heap_usage(const struct shell *sh, continue; usage = module_adapter_heap_usage(comp_mod(icd->cd), &hwm); - shell_print(sh, "comp id 0x%08x%9zu usage%9zu hwm %9zu max\tbytes", - icd->id, usage, hwm, comp_mod(icd->cd)->priv.cfg.heap_bytes); + shell_print(sh, "comp id 0x%08x%9zu usage%9zu hwm\tbytes", + icd->id, usage, hwm); } return 0; }