Skip to content

Commit 7737efa

Browse files
marc-hbkv2019i
authored andcommitted
xtensa-build-zephyr.py: remove imx8ulp from --all
As of today's Zephyr commit 92fb8b223825, imx8ulp does not compile. Do not remove any of its data from `xtensa-build-zephyr.py` but exclude it from --all Fixes: ``` scripts/xtensa-build-zephyr.py --all -- Board: nxp_adsp_imx8ulp No board named 'nxp_adsp_imx8ulp' found. CMake Error at zephyr/cmake/modules/boards.cmake:167 (message): Invalid BOARD; see above. Call Stack (most recent call first): cmake/modules/zephyr_default.cmake:129 (include) share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include) share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate) CMakeLists.txt:5 (find_package) ``` Fixes 61ccb4c ("scripts: zephyr: Add support to build sof for imx8ulp") Signed-off-by: Marc Herbert <marc.herbert@intel.com>
1 parent 4c25202 commit 7737efa

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

scripts/xtensa-build-zephyr.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ class PlatformConfig:
8686
IPC4_CONFIG_OVERLAY: str = "ipc4_overlay.conf"
8787
aliases: list = dataclasses.field(default_factory=list)
8888

89-
platform_configs = {
89+
# These can all be built out of the box. --all builds all these.
90+
platform_configs_all = {
9091
# Intel platforms
9192
"tgl" : PlatformConfig(
9293
"tgl", "intel_adsp_cavs25",
@@ -134,6 +135,10 @@ class PlatformConfig:
134135
"hifi4_mscale_v2_0_2_prod",
135136
RIMAGE_KEY = "key param ignored by imx8m"
136137
),
138+
}
139+
140+
# These cannot be built out of the box yet
141+
extra_platform_configs = {
137142
"imx8ulp" : PlatformConfig(
138143
"imx8ulp", "nxp_adsp_imx8ulp",
139144
f"RI-2023.11{xtensa_tools_version_postfix}",
@@ -142,14 +147,15 @@ class PlatformConfig:
142147
),
143148
}
144149

145-
platform_names = list(platform_configs)
150+
platform_configs = platform_configs_all.copy()
151+
platform_configs.update(extra_platform_configs)
146152

147153
class validate_platforms_arguments(argparse.Action):
148154
"""Validates positional platform arguments whether provided platform name is supported."""
149155
def __call__(self, parser, namespace, values, option_string=None):
150156
if values:
151157
for value in values:
152-
if value not in platform_names:
158+
if value not in platform_configs:
153159
raise argparse.ArgumentError(self, f"Unsupported platform: {value}")
154160
setattr(namespace, "platforms", values)
155161

@@ -174,7 +180,7 @@ def parse_args():
174180
" └── RG-2017.8{}/\n".format(xtensa_tools_version_postfix) +
175181
" └── XtensaTools/\n" +
176182
"$XTENSA_TOOLS_ROOT=/path/to/myXtensa ...\n" +
177-
f"Supported platforms {platform_names}"))
183+
f"Supported platforms: {list(platform_configs)}"))
178184

179185
parser.add_argument("-a", "--all", required=False, action="store_true",
180186
help="Build all currently supported platforms")
@@ -257,7 +263,7 @@ def parse_args():
257263
args = parser.parse_args()
258264

259265
if args.all:
260-
args.platforms = platform_names
266+
args.platforms = list(platform_configs_all)
261267

262268
# print help message if no arguments provided
263269
if len(sys.argv) == 1:

0 commit comments

Comments
 (0)