From e21b8347ac6cfc9b993fc3ad0150ec4a6e188cfc Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Wed, 26 Jun 2024 18:58:35 +0000 Subject: [PATCH 1/2] xtensa-build-zephyr.py: use EXTRA_CONF_FILE instead of OVERLAY_CONFIG OVERLAY_CONFIG has been deprecated by EXTRA_CONF_FILE since Zephyr 3.4 Also fix the corresponding --help string. Zephyr 3.4 is one year old and has just been end-of-lifed. Signed-off-by: Marc Herbert --- scripts/xtensa-build-zephyr.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/xtensa-build-zephyr.py b/scripts/xtensa-build-zephyr.py index 648393ed70ff..44b9d7167902 100755 --- a/scripts/xtensa-build-zephyr.py +++ b/scripts/xtensa-build-zephyr.py @@ -256,8 +256,15 @@ def parse_args(): " to cmake (for rimage)") parser.add_argument("-k", "--key", type=pathlib.Path, required=False, help="Path to a non-default rimage signing key.") + + # https://docs.zephyrproject.org/latest/build/kconfig/setting.html#initial-conf + # https://docs.zephyrproject.org/latest/develop/application/index.html#important-build-system-variables parser.add_argument("-o", "--overlay", type=pathlib.Path, required=False, action='append', - default=[], help="Paths to overlays") + default=[], help= +"""All '-o arg1 -o arg2 ...' arguments are combined into a single -DEXTRA_CONF_FILE='arg1;arg2;...' +list. Files latter in the list seem to have precedence. Direct -C=-DCONFIG_xxx=.. options seem to +have precedence over -DEXTRA_CONF_FILE=... Rely on precedence as little as possible.""") + parser.add_argument("-p", "--pristine", required=False, action="store_true", help="Perform pristine build removing build directory.") parser.add_argument("-u", "--update", required=False, action="store_true", @@ -832,7 +839,7 @@ def build_platforms(): if overlays: overlays = ";".join(overlays) - build_cmd.append(f"-DOVERLAY_CONFIG={overlays}") + build_cmd.append(f"-DEXTRA_CONF_FILE={overlays}") abs_build_dir = pathlib.Path(west_top, platform_build_dir_name) From abba5f54cfa0162117a6e172898079edf84aac0e Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Wed, 26 Jun 2024 21:41:36 +0000 Subject: [PATCH 2/2] Add new file: app/overlays/repro-build.conf Passing options one by one in .github/workflows/zephyr.yml was becoming unwieldy. Reduces Windows/Linux duplication. This also makes local testing easier; less typing and guess work. This should also help with #9116. Signed-off-by: Marc Herbert --- .github/workflows/zephyr.yml | 6 ++---- app/overlays/repro-build.conf | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 app/overlays/repro-build.conf diff --git a/.github/workflows/zephyr.yml b/.github/workflows/zephyr.yml index 73c20fcb5b67..354efb207f0f 100644 --- a/.github/workflows/zephyr.yml +++ b/.github/workflows/zephyr.yml @@ -194,8 +194,7 @@ jobs: --cmake-args=-DEXTRA_CXXFLAGS=-Werror --cmake-args=-DEXTRA_AFLAGS='-Werror -Wa,--fatal-warnings' --cmake-args=--warn-uninitialized - --cmake-args=-DCONFIG_OUTPUT_DISASSEMBLY=y - --cmake-args=-DCONFIG_OUTPUT_DISASSEMBLY_WITH_SOURCE=n + --overlay=sof/app/overlays/repro-build.conf ${{ matrix.build_opts }} ${{ matrix.IPC_platforms }} - name: Upload build artifacts @@ -361,8 +360,7 @@ jobs: --cmake-args=-DEXTRA_CXXFLAGS=-Werror --cmake-args=-DEXTRA_AFLAGS='-Werror -Wa,--fatal-warnings' --cmake-args=--warn-uninitialized - --cmake-args=-DCONFIG_OUTPUT_DISASSEMBLY=y - --cmake-args=-DCONFIG_OUTPUT_DISASSEMBLY_WITH_SOURCE=n + --overlay=sof/app/overlays/repro-build.conf ${{ matrix.build_opts }} ${{ matrix.platforms }} - name: Upload build artifacts diff --git a/app/overlays/repro-build.conf b/app/overlays/repro-build.conf new file mode 100644 index 000000000000..d7b434c39660 --- /dev/null +++ b/app/overlays/repro-build.conf @@ -0,0 +1,2 @@ +CONFIG_OUTPUT_DISASSEMBLY=y +CONFIG_OUTPUT_DISASSEMBLY_WITH_SOURCE=n