zephyr/scripts/west_commands
Marc Herbert 2fdc551acc sign.py: stop ignoring the -- -c foo.toml option passed to rimage
The -c option points rimage at its main and mandatory configuration
file ("signing schema"). The -c option passed by sign.py to rimage comes
from _two_ different places:

A. From the command line, example:

   west sign -t rimage -- OTHER_ARGS_FOR_RIMAGE -c foo.toml

However passing -- -c signing_schema.toml on the west sign command line
has always been optional because:

B. west sign systematically adds another `-c bar.toml` option. The name
   'bar' is found in the CMakeCache. Right now 'bar' comes from
   a product specific `board.cmake` file.

There were two problems fixed by this commit:

1. The -c option from the command line was passed _first_ but the last
   -c wins with rimage. The command line should have precedence.

2. The "last -c wins" behavior is not documented/official, it's an
   rimage implementation deteail.

To fix both, simply scan the command line for a '-c' option. If any is
found then it takes precedence over the CMakeCache-based value which is
dropped.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2022-02-22 11:55:09 -08:00
..
completion boards/shields: re-work handling in cmake and west 2021-01-15 15:07:49 -05:00
runners debug: Remove deprecated CONFIG_OPENOCD_SUPPORT 2022-01-24 10:23:20 -05:00
tests scripts: runners: Add west flash command for B91 platform 2021-12-06 07:28:38 -05:00
zspdx west: spdx: Fix missing field in build results 2022-01-26 18:15:33 +01:00
boards.py scripts: west: boards: support listing out-of-tree boards 2021-07-16 07:17:35 -04:00
build_helpers.py
build.py west: build.py: resolve symlinks in cached source directory check 2021-11-10 08:27:16 -05:00
completion.py boards/shields: re-work handling in cmake and west 2021-01-15 15:07:49 -05:00
debug.py
export.py
flash.py
mypy.ini
README.txt
run_common.py scripts: runners: openocd: Enable thread awareness 2021-08-27 06:44:45 -04:00
run_tests.py
sign.py sign.py: stop ignoring the -- -c foo.toml option passed to rimage 2022-02-22 11:55:09 -08:00
spdx.py doc: add docs for west spdx 2021-06-01 07:26:33 -05:00
zcmake.py scripts: zcmake: fix for prerelease cmake versions 2021-02-09 09:14:37 -05:00
zephyr_ext_common.py scripts: west_commands: Remove no longer needed load_dot_config(path) 2021-04-08 16:38:28 +02:00

This directory contains implementations for west commands which are
tightly coupled to the zephyr tree. This includes the build, flash,
and debug commands.

Before adding more here, consider whether you might want to put new
extensions in upstream west. For example, any commands which operate
on the multi-repo need to be in upstream west, not here. Try to limit
what goes in here to Zephyr-specific features.

When extending this code, please keep the unit tests (in tests/) up to
date. The mypy static type checker is also run on the runners package.

To run these tests locally on Windows, run:

   py -3 run_tests.py

On macOS and Linux:

   ./run_tests.py

Note that these tests are run as part of Zephyr's CI when submitting
an upstream pull request, and pull requests which break the tests
cannot be merged.

Thanks!