Commit 733241d7 authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Fabio Baltieri
Browse files

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: default avatarGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
parent 5b92e7af
Loading
Loading
Loading
Loading
+4 −0
Changes for scripts/west_commands/sign.py: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -442,9 +442,13 @@ class RimageSigner(Signer):
        preproc_cmd += ['-I', str(self.sof_src_dir / 'src')]
        preproc_cmd += ['-imacros',
                        str(pathlib.Path('zephyr') / 'include' / 'generated' / 'zephyr' / 'autoconf.h')]
        # Need to preprocess the TOML file twice: once with
        # LLEXT_FORCE_ALL_MODULAR defined and once without it
        full_preproc_cmd = preproc_cmd + ['-o', str(subdir / 'rimage_config_full.toml'), '-DLLEXT_FORCE_ALL_MODULAR']
        preproc_cmd += ['-o', str(subdir / 'rimage_config.toml')]
        self.command.inf(quote_sh_list(preproc_cmd))
        subprocess.run(preproc_cmd, check=True, cwd=self.build_dir)
        subprocess.run(full_preproc_cmd, check=True, cwd=self.build_dir)

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