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 #7192.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
Marc Herbert 2023-06-08 00:42:08 +00:00 committed by Kai Vehmanen
parent 5a9dc8a0b5
commit c7af3c5b3b
3 changed files with 8 additions and 1 deletions

View File

@ -22,6 +22,8 @@ elseif(CONFIG_MT8188)
set(platform_folder mt8188)
elseif(CONFIG_MT8195)
set(platform_folder mt8195)
else()
message(FATAL_ERROR "Platform not defined, check your Kconfiguration?")
endif()
set(fw_name ${CONFIG_RIMAGE_SIGNING_SCHEMA})

View File

@ -5,7 +5,9 @@ menu "Platform"
choice
prompt "Platform"
default ZEPHYR_POSIX if ARCH_POSIX
default TIGERLAKE
# It's not really 'optional' but no value is much less confusing
# than falling back on a totally random value.
optional
config TIGERLAKE
bool "Build for Tigerlake"

View File

@ -363,6 +363,9 @@ zephyr_library_sources_ifdef(CONFIG_LIBRARY
${SOF_DRIVERS_PATH}/host/ipc.c
)
if(NOT DEFINED PLATFORM)
message(FATAL_ERROR "PLATFORM is not defined, check your Kconfiguration?")
endif()
zephyr_include_directories(${SOF_PLATFORM_PATH}/${PLATFORM}/include)
# Mandatory Files used on all platforms.