u-boot/test
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
..
boot vbe: Use a manual test 2022-10-31 11:04:00 -04:00
cmd test: cmd: add test for wget command. 2022-11-28 13:06:40 -05:00
common cyclic: Use schedule() instead of WATCHDOG_RESET() 2022-09-18 10:26:33 +02:00
dm Prepare v2023.01-rc4 2022-12-21 13:09:01 -05:00
env sandbox: add test of CONFIG_ENV_IMPORT_FDT 2021-05-04 12:52:30 -04:00
fs Consistently use nproc for counting the CPUs 2020-01-30 13:30:35 -05:00
fuzz dm: treewide: Use uclass_first_device_err when accessing one device 2022-10-17 21:17:12 -06:00
image treewide: Drop image_header_t typedef 2022-09-29 16:07:57 -04:00
lib display_options: print_size: Fix order overflow 2022-09-23 15:13:18 -04:00
log log: Remove some places where we redefine LOGLEVEL 2022-12-23 10:07:03 -05:00
optee test: Add a macros for finding tests in linker_lists 2021-03-12 09:57:30 -05:00
overlay test: Add a macros for finding tests in linker_lists 2021-03-12 09:57:30 -05:00
py cmd: source: Support specifying config name 2022-12-31 13:35:19 -05:00
stdint Remove <inttypes.h> includes and PRI* usages in printf() entirely 2018-09-10 20:48:17 -04:00
trace SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
bloblist.c bloblist: Add functions to obtain base address and size 2022-01-13 09:13:41 -07:00
bootm.c test: Fix bootm_test_subst_var() running independently 2022-09-12 18:06:36 -04:00
cmd_ut.c test: Add a way to detect a test that breaks another 2022-11-07 16:24:30 -07:00
command_ut.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
common.sh Consistently use nproc for counting the CPUs 2020-01-30 13:30:35 -05:00
compression.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
Kconfig post: Migrate to Kconfig 2022-12-05 16:11:50 -05:00
Makefile test: Add some tests for kconfig.h 2022-08-10 13:38:30 -04:00
nokia_rx51_test.sh Nokia RX-51: Add booting from UBI into test script 2022-09-15 16:11:46 -04:00
print_ut.c lib: Move string tests to the string module 2022-04-25 10:00:03 -04:00
run test: Fix typo in test name 2022-10-21 21:37:47 -04:00
str_ut.c lib: Add a way to find the postiion of a trailing number 2022-04-25 10:00:03 -04:00
test-main.c test: Add a way to detect a test that breaks another 2022-11-07 16:24:30 -07:00
time_ut.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
unicode_ut.c test: unit test for u16_strlcat() 2022-05-03 21:39:22 +02:00
ut.c test: Add a way to skip console checking until a string matches 2021-09-16 14:39:40 -04:00