u-boot/test/py
Sean Anderson bcc85b96b5 cmd: source: Support specifying config name
As discussed previously [1,2], the source command is not safe to use with
verified boot unless there is a key with required = "images" (which has its
own problems). This is because if such a key is absent, signatures are
verified but not required. It is assumed that configuration nodes will
provide the signature. Because the source command does not use
configurations to determine the image to source, effectively no
verification takes place.

To address this, allow specifying configuration nodes. We use the same
syntax as the bootm command (helpfully provided for us by fit_parse_conf).
By default, we first try the default config and then the default image. To
force using a config, # must be present in the command (e.g. `source
$loadaddr#my-conf`). For convenience, the config may be omitted, just like
the address may be (e.g. `source \#`). This also works for images
(`source :` behaves exactly like `source` currently does).

[1] https://lore.kernel.org/u-boot/7d711133-d513-5bcb-52f2-a9dbaa9eeded@prevas.dk/
[2] https://lore.kernel.org/u-boot/042dcb34-f85f-351e-1b0e-513f89005fdd@gmail.com/

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-31 13:35:19 -05:00
..
tests cmd: source: Support specifying config name 2022-12-31 13:35:19 -05:00
.gitignore test/py: Implement pytest infrastructure 2016-01-20 19:06:23 -07:00
conftest.py test: Support tests which can only be run manually 2022-10-31 11:02:44 -04:00
multiplexed_log.css SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
multiplexed_log.py Prepare v2022.01-rc3 2021-11-29 12:00:57 -05:00
pytest.ini test/py: Allow tests to be marked single-threaded only 2022-09-12 18:06:36 -04:00
requirements.txt test: Move to a working version of setuptools 2022-10-26 15:21:11 -04:00
test.py pytest: Shorten traceback length by default 2021-10-14 19:45:07 -04:00
u_boot_console_base.py test/py: Reset the console timeout value 2022-05-26 10:27:14 -04:00
u_boot_console_exec_attach.py test: fix pylint error in u_boot_console_exec_attach.py 2021-11-26 22:02:37 +01:00
u_boot_console_sandbox.py test/py: Add a way to start sandbox without a device tree 2022-05-05 09:28:48 -04:00
u_boot_spawn.py test: fix pylint errors in u_boot_spawn.py 2021-11-26 22:02:37 +01:00
u_boot_utils.py Prepare v2022.01-rc3 2021-11-29 12:00:57 -05:00