west: sign.py: rename new generated/platf.toml
to rimage_config.toml
CMake-based build systems like Zephyr's use separate build directories;
one for each build configuration. Even Zephyr's multi-build system
"sysbuild" (which is not relevant here) uses separate subdirectories.
So there is only one pre-processed, .toml file generated by build
directory and no need to vary its filename based on the platform name or
any other configuration parameter. It can and should keep the same
filename across build directories as zephyr.elf and all other build
artefacts do.
Moreover, when building a collection of configurations (as for instance
`sof/scripts/xtensa-build-zephyr.py` does), keeping all build
directories consistent with each other simplifies installation,
checksumming and any other post-processing.
"Fixes" recent commit 15336045af
("west: sign.py: generate platf.toml
from platf.toml.h with cc -E")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
parent
fe75bb950f
commit
2ee6c26d15
1 changed files with 5 additions and 6 deletions
|
@ -442,7 +442,7 @@ class RimageSigner(Signer):
|
|||
preproc_cmd += ['-I', str(self.sof_src_dir / 'src')]
|
||||
preproc_cmd += ['-imacros',
|
||||
str(pathlib.Path('zephyr') / 'include' / 'generated' / 'autoconf.h')]
|
||||
preproc_cmd += ['-o', str(subdir / toml_basename)]
|
||||
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)
|
||||
|
||||
|
@ -573,13 +573,12 @@ class RimageSigner(Signer):
|
|||
command.die(f"Cannot have both {toml_basename + '.h'} and {toml_basename} in {conf_dir}")
|
||||
|
||||
if (conf_dir / (toml_basename + '.h')).exists():
|
||||
toml_subdir = pathlib.Path('zephyr') / 'misc' / 'generated'
|
||||
self.preprocess_toml(conf_dir, toml_basename, toml_subdir)
|
||||
toml_dir = b / toml_subdir
|
||||
generated_subdir = pathlib.Path('zephyr') / 'misc' / 'generated'
|
||||
self.preprocess_toml(conf_dir, toml_basename, generated_subdir)
|
||||
extra_ri_args += ['-c', str(b / generated_subdir / 'rimage_config.toml')]
|
||||
else:
|
||||
toml_dir = conf_dir
|
||||
|
||||
extra_ri_args += ['-c', str(toml_dir / toml_basename)]
|
||||
extra_ri_args += ['-c', str(toml_dir / toml_basename)]
|
||||
|
||||
# Warning: while not officially supported (yet?), the rimage --option that is last
|
||||
# on the command line currently wins in case of duplicate options. So pay
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue