From ce5b5fa2a221b7b96310cebe9a2ca261ad1ab38e Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Tue, 28 Oct 2025 17:03:00 +0200 Subject: [PATCH 1/3] zephyr: stop using CONFIG_SOF to identify Zephyr build Prepare for change in Zephyr to drop SOF module from the upstream Zephyr manifest. Remove use of CONFIG_SOF which is defined in work/zephyr/modules/Kconfig.sof, but will now be removed. Fix this by adding new CONFIG_SOF_FULL_ZEPHYR_APPLICATION on SOF side and use it similarly to old CONFIG_SOF. If SOF is built without Zephyr (e.g. testbench or cmocka build), this define will not be set. After this change, one must use the SOF work/sof/west.yml manifest to build SOF with Zephyr. This is used by all public instructions and CI jobs already. Signed-off-by: Kai Vehmanen --- app/prj.conf | 2 +- zephyr/CMakeLists.txt | 4 ++-- zephyr/Kconfig | 10 +++++++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/prj.conf b/app/prj.conf index e072f1df2fd2..f5f1a00ca2f3 100644 --- a/app/prj.conf +++ b/app/prj.conf @@ -1,5 +1,5 @@ -CONFIG_SOF=y CONFIG_BUILD_OUTPUT_BIN=n +CONFIG_SOF=y # The additional stripped .elf files are deterministic. # This adds very few files in the build directory and has diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt index 4ef481d8c52d..baac43ffe884 100644 --- a/zephyr/CMakeLists.txt +++ b/zephyr/CMakeLists.txt @@ -2,7 +2,7 @@ # compile every Zephyr module that can be found. See # sof/zephyr/module.yml and # https://docs.zephyrproject.org/latest/develop/modules.html -if(CONFIG_SOF) +if(CONFIG_SOF_FULL_ZEPHYR_APPLICATION) if(CONFIG_ZEPHYR_POSIX) set(ARCH host) @@ -567,4 +567,4 @@ include(../scripts/cmake/uuid-registry.cmake) # Create Trace realtive file paths sof_append_relative_path_definitions(modules_sof) -endif() # CONFIG_SOF +endif() # CONFIG_SOF_FULL_ZEPHYR_APPLICATION diff --git a/zephyr/Kconfig b/zephyr/Kconfig index 20a3b6f173a2..3f9fd344e8f3 100644 --- a/zephyr/Kconfig +++ b/zephyr/Kconfig @@ -1,4 +1,10 @@ -if SOF +config SOF_FULL_ZEPHYR_APPLICATION + bool "Build full SOF Zephyr application" + default y + help + Top-level build option to enable full build of the SOF application + on top of Zephyr. This should be set to no only for unit test and + such special build targets. config SOF_STAGING bool "Enable SOF staging features and modules" @@ -203,5 +209,3 @@ config STACK_SIZE_IPC_TX default 2048 help IPC sender work-queue thread stack size. Keep a power of 2. - -endif From 7b94e1d7971c66793efc95dc987467db041a5860 Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Tue, 18 Nov 2025 20:15:12 +0200 Subject: [PATCH 2/3] test: ztest: fix ztest/unit tests to build when CONFIG_SOF is removed SOF builds previously relied on CONFIG_SOF to be externally defined in zephyr/modules/Kconfig.sof, but set in sof/app/prj.conf. This was removed in Zephyr, and now instead the new CONFIG_SOF_FULL_ZEPHYR_APPLICATION is set on SOF side. This must be set to 'no' for the ztest unit tests to ensure full SOF dependencies are not pulled into unit tests builds. Signed-off-by: Kai Vehmanen --- test/ztest/unit/fast-get/CMakeLists.txt | 1 - test/ztest/unit/fast-get/prj.conf | 1 + test/ztest/unit/list/prj.conf | 1 + test/ztest/unit/math/basic/arithmetic/CMakeLists.txt | 1 - test/ztest/unit/math/basic/arithmetic/prj.conf | 1 + test/ztest/unit/math/basic/trigonometry/CMakeLists.txt | 1 - test/ztest/unit/math/basic/trigonometry/prj.conf | 1 + 7 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/ztest/unit/fast-get/CMakeLists.txt b/test/ztest/unit/fast-get/CMakeLists.txt index 45de96da341c..7bd45c84d013 100644 --- a/test/ztest/unit/fast-get/CMakeLists.txt +++ b/test/ztest/unit/fast-get/CMakeLists.txt @@ -16,7 +16,6 @@ target_include_directories(app PRIVATE # Define SOF-specific configurations for unit testing target_compile_definitions(app PRIVATE - -DCONFIG_SOF_LOG_LEVEL=CONFIG_LOG_DEFAULT_LEVEL -DCONFIG_ZEPHYR_POSIX=1 ) diff --git a/test/ztest/unit/fast-get/prj.conf b/test/ztest/unit/fast-get/prj.conf index 9467c2926896..f530dfdd94f9 100644 --- a/test/ztest/unit/fast-get/prj.conf +++ b/test/ztest/unit/fast-get/prj.conf @@ -1 +1,2 @@ CONFIG_ZTEST=y +CONFIG_SOF_FULL_ZEPHYR_APPLICATION=n \ No newline at end of file diff --git a/test/ztest/unit/list/prj.conf b/test/ztest/unit/list/prj.conf index 9467c2926896..f530dfdd94f9 100644 --- a/test/ztest/unit/list/prj.conf +++ b/test/ztest/unit/list/prj.conf @@ -1 +1,2 @@ CONFIG_ZTEST=y +CONFIG_SOF_FULL_ZEPHYR_APPLICATION=n \ No newline at end of file diff --git a/test/ztest/unit/math/basic/arithmetic/CMakeLists.txt b/test/ztest/unit/math/basic/arithmetic/CMakeLists.txt index b6822ca7f2a2..8b280a0dfb49 100644 --- a/test/ztest/unit/math/basic/arithmetic/CMakeLists.txt +++ b/test/ztest/unit/math/basic/arithmetic/CMakeLists.txt @@ -12,7 +12,6 @@ target_include_directories(app PRIVATE # Define SOF-specific configurations for unit testing target_compile_definitions(app PRIVATE - -DCONFIG_SOF_LOG_LEVEL=CONFIG_LOG_DEFAULT_LEVEL -DCONFIG_ZEPHYR_POSIX=1 -DCONFIG_LIBRARY=1 -DCONFIG_NUMBERS_VECTOR_FIND=1 diff --git a/test/ztest/unit/math/basic/arithmetic/prj.conf b/test/ztest/unit/math/basic/arithmetic/prj.conf index 9467c2926896..f530dfdd94f9 100644 --- a/test/ztest/unit/math/basic/arithmetic/prj.conf +++ b/test/ztest/unit/math/basic/arithmetic/prj.conf @@ -1 +1,2 @@ CONFIG_ZTEST=y +CONFIG_SOF_FULL_ZEPHYR_APPLICATION=n \ No newline at end of file diff --git a/test/ztest/unit/math/basic/trigonometry/CMakeLists.txt b/test/ztest/unit/math/basic/trigonometry/CMakeLists.txt index b5387a998aee..90b636fa940c 100644 --- a/test/ztest/unit/math/basic/trigonometry/CMakeLists.txt +++ b/test/ztest/unit/math/basic/trigonometry/CMakeLists.txt @@ -12,7 +12,6 @@ target_include_directories(app PRIVATE # Define SOF-specific configurations for unit testing target_compile_definitions(app PRIVATE - -DCONFIG_SOF_LOG_LEVEL=CONFIG_LOG_DEFAULT_LEVEL -DCONFIG_ZEPHYR_POSIX=1 -DCONFIG_LIBRARY=1 -DUNIT_TEST=1 diff --git a/test/ztest/unit/math/basic/trigonometry/prj.conf b/test/ztest/unit/math/basic/trigonometry/prj.conf index 9467c2926896..f530dfdd94f9 100644 --- a/test/ztest/unit/math/basic/trigonometry/prj.conf +++ b/test/ztest/unit/math/basic/trigonometry/prj.conf @@ -1 +1,2 @@ CONFIG_ZTEST=y +CONFIG_SOF_FULL_ZEPHYR_APPLICATION=n \ No newline at end of file From 628afcd2f5548f7bf03c8f09a9b10d87f6970054 Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Thu, 20 Nov 2025 20:55:41 +0200 Subject: [PATCH 3/3] west.yml: update zephyr to f3b9d1871104 Total of 798 commits. Includes removal of CONFIG_SOF in Zephyr. This commit has the matching change to sof/app/prj.conf. Other changes include: 3f6ef5043ce5 soc: intel_adsp: ace30: allow userspace to execute cold functions 18b34bb3d29d drivers: power_domain: intel_adsp: Refactor power management initialization 27180d2fc573 arch: riscv + xtensa + x86: workaround needed for LLVM linker 95b48cd5ba7a west_commands: do not depend on CONFIG_SOF 71ec5df8f31f intel_adsp: remove workaround for SOF setting core count 1a780f933e1d manifest: optional: remove sof from optional manifest 65d31ea8609e tests: intel_adsp/smoke: cast to signed ints before abs() e45808b9cd71 xtensa: mmu: add page table usage statistics a48345fccfdb xtensa: mmu/ptables: conserve memory by using COW on L2 tables 1e41db3ddd84 xtensa: mmu: no need for cache ops if page tables are not cached 501368601dc7 xtensa: mmu/ptables: rework TLB invalidation on L2 unmap 259be3d55929 xtensa: mmu: remove XTENSA_ prefix for page table array macros 1470d9ef7460 xtensa: mmu: move PTE macros into source file b6713c0145e8 xtensa: mmu: skip PTE SW field redirection 2bfcb20258f5 xtensa: mmu: unify PTE macros 11dca1208aa3 boards: xtensa: add support for DOIT ESP32 DevKit V1 3b2b513be37e drivers: wifi: nxp: Raise Wi-Fi mgmt events for soft AP start/stop. Signed-off-by: Kai Vehmanen --- app/prj.conf | 1 - west.yml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/prj.conf b/app/prj.conf index f5f1a00ca2f3..b0d1bdaa29e3 100644 --- a/app/prj.conf +++ b/app/prj.conf @@ -1,5 +1,4 @@ CONFIG_BUILD_OUTPUT_BIN=n -CONFIG_SOF=y # The additional stripped .elf files are deterministic. # This adds very few files in the build directory and has diff --git a/west.yml b/west.yml index aec1227bab8c..e3978203db80 100644 --- a/west.yml +++ b/west.yml @@ -43,7 +43,7 @@ manifest: - name: zephyr repo-path: zephyr - revision: 3568e1b6d5cdd51a6b964a2a1d6d29200fea2056 + revision: f3b9d1871104b0d69abf6182ef7d262652b13729 remote: zephyrproject # Import some projects listed in zephyr/west.yml@revision