Skip to content

Commit 733241d

Browse files
lyakhfabiobaltieri
authored andcommitted
west: rimage: generate TOML with all LLEXTs included
"west sign" uses the C preprocessor to generate a TOML configuration file, needed for rimage. When creating LLEXTs rimage also uses a configuration file where all supporting components are configured as LLEXT. This adds such a file generation. Signed-off-by: Guennadi Liakhovetski <[email protected]>
1 parent 5b92e7a commit 733241d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/west_commands/sign.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,13 @@ def preprocess_toml(self, config_dir, toml_basename, subdir):
442442
preproc_cmd += ['-I', str(self.sof_src_dir / 'src')]
443443
preproc_cmd += ['-imacros',
444444
str(pathlib.Path('zephyr') / 'include' / 'generated' / 'zephyr' / 'autoconf.h')]
445+
# Need to preprocess the TOML file twice: once with
446+
# LLEXT_FORCE_ALL_MODULAR defined and once without it
447+
full_preproc_cmd = preproc_cmd + ['-o', str(subdir / 'rimage_config_full.toml'), '-DLLEXT_FORCE_ALL_MODULAR']
445448
preproc_cmd += ['-o', str(subdir / 'rimage_config.toml')]
446449
self.command.inf(quote_sh_list(preproc_cmd))
447450
subprocess.run(preproc_cmd, check=True, cwd=self.build_dir)
451+
subprocess.run(full_preproc_cmd, check=True, cwd=self.build_dir)
448452

449453
def sign(self, command, build_dir, build_conf, formats):
450454
self.command = command

0 commit comments

Comments
 (0)