Skip to content

Commit c7af3c5

Browse files
marc-hbkv2019i
authored andcommitted
Kconfig: don't fall back on CONFIG_TIGERLAKE
There's really no reason to fall back on a default "platform" and pick up a bunch of other, totally random settings. Now the following command fails immediately with a useful `platform not defined` error message instead of stopping with a cryptic `platform/trace/trace.h: No such file or directory` after successfully compiling half the .c files in a Frankenstein CONFIG_uration. ``` west build -p --board mimx8mm_evk_a53 modules/audio/sof/app ``` More context in thesofproject#7192. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
1 parent 5a9dc8a commit c7af3c5

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/arch/xtensa/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ elseif(CONFIG_MT8188)
2222
set(platform_folder mt8188)
2323
elseif(CONFIG_MT8195)
2424
set(platform_folder mt8195)
25+
else()
26+
message(FATAL_ERROR "Platform not defined, check your Kconfiguration?")
2527
endif()
2628

2729
set(fw_name ${CONFIG_RIMAGE_SIGNING_SCHEMA})

src/platform/Kconfig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ menu "Platform"
55
choice
66
prompt "Platform"
77
default ZEPHYR_POSIX if ARCH_POSIX
8-
default TIGERLAKE
8+
# It's not really 'optional' but no value is much less confusing
9+
# than falling back on a totally random value.
10+
optional
911

1012
config TIGERLAKE
1113
bool "Build for Tigerlake"

zephyr/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,9 @@ zephyr_library_sources_ifdef(CONFIG_LIBRARY
363363
${SOF_DRIVERS_PATH}/host/ipc.c
364364
)
365365

366+
if(NOT DEFINED PLATFORM)
367+
message(FATAL_ERROR "PLATFORM is not defined, check your Kconfiguration?")
368+
endif()
366369
zephyr_include_directories(${SOF_PLATFORM_PATH}/${PLATFORM}/include)
367370

368371
# Mandatory Files used on all platforms.

0 commit comments

Comments
 (0)