u-boot/drivers
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
..
adc sandbox: Finish migration to Kconfig 2022-12-22 10:31:48 -05:00
ata ata: ahci-pci: Replace magic constant by macro 2022-12-08 10:46:01 -05:00
axi WS cleanup: remove trailing empty lines 2021-09-30 08:08:56 -04:00
bios_emulator video: Rename structs and functions to avoid VBE 2022-08-12 08:14:23 -04:00
block dm: blk: Add probe in blk_first_device/blk_next_device 2022-11-07 16:24:30 -07:00
bootcount global: Move remaining CONFIG_SYS_* to CFG_SYS_* 2022-12-05 16:06:08 -05:00
bus bus: Optionally include TI sysc driver in SPL/TPL 2022-12-02 08:39:00 -05:00
button button: gpio: add DM_GPIO dependency 2022-08-23 12:39:06 +02:00
cache drivers: cache: ncore: Disable snoop filter 2022-06-17 16:27:05 +08:00
clk Prepare v2023.01-rc4 2022-12-21 13:09:01 -05:00
core global: Move remaining CONFIG_SYS_* to CFG_SYS_* 2022-12-05 16:06:08 -05:00
cpu dm: treewide: Do not opencode uclass_probe_all() 2022-10-17 21:17:12 -06:00
crypto global: Migrate CONFIG_SYS_FSL* symbols to the CFG_SYS namespace 2022-11-10 10:08:55 -05:00
ddr global: Migrate CONFIG_MAX_MEM_MAPPED to CFG 2022-12-23 10:14:51 -05:00
demo demo: migrate uclass to livetree 2021-10-05 08:50:15 -04:00
dfu blk: Switch over to using uclass IDs 2022-09-16 11:05:16 -04:00
dma ddr: fsl: Remove CONFIG_MEM_INIT_VALUE 2022-12-22 10:31:48 -05:00
fastboot Audit <flash.h> inclusion 2022-08-04 16:18:47 -04:00
firmware board: ti: introduce the basic files needed to support the am62a 2022-12-09 14:10:28 -05:00
fpga global: Migrate CONFIG_FPGA_DELAY to CFG 2022-12-23 10:09:42 -05:00
fuzz sandbox: Implement fuzzing engine driver 2022-06-23 12:58:19 -04:00
fwu-mdata FWU: Add FWU metadata access driver for GPT partitioned block devices 2022-10-31 14:47:32 -04:00
gpio Convert CONFIG_SH_GPIO_PFC et al to Kconfig 2022-12-05 16:08:37 -05:00
hwspinlock treewide: invaild -> invalid 2022-01-13 07:57:49 -05:00
i2c global: Migrate CONFIG_SYS_I2C_DIRECT_BUS to CFG 2022-12-23 10:15:12 -05:00
input input: Remove legacy KEYBOARD option 2022-10-21 13:47:56 -04:00
iommu iommu: Add M2 support to Apple DART driver 2022-07-25 09:38:47 -04:00
led led: led_pwm: typo 'iverted' on code comment 2022-11-02 13:58:17 -04:00
mailbox mailbox: zynqmp: Enable ipi mailbox driver for Versal NET 2022-09-26 14:23:29 +02:00
memory memory: Add TI GPMC driver 2022-10-26 15:21:12 -04:00
misc kbuild: Remove uncmd_spl logic 2022-12-23 10:15:13 -05:00
mmc Convert CONFIG_FSL_ESDHC_PIN_MUX to Kconfig 2022-12-22 10:31:48 -05:00
mtd global: Migrate CONFIG_MXC_NAND_REGS_BASE to CFG 2022-12-23 10:14:51 -05:00
mux treewide: invaild -> invalid 2022-01-13 07:57:49 -05:00
net global: Migrate CONFIG_TSEC_TBICR_SETTINGS to CFG 2022-12-23 10:15:12 -05:00
nvme Merge branch 'master' into next 2022-09-19 16:07:12 -04:00
pch treewide: Simply conditions with the new OF_REAL 2021-09-25 09:46:15 -06:00
pci pci-rcar-gen3: Rename CONFIG_SEND_ENABLE 2022-12-23 13:01:13 -05:00
pci_endpoint dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
phy phy: rockchip: handle clock without enable function 2022-12-19 10:56:12 +08:00
pinctrl pinctrl: sunxi: Add P2WI and RSB pinmuxes 2022-12-13 20:33:37 +00:00
power global: Migrate CONFIG_POWER_PFUZE3000_I2C_ADDR to CFG 2022-12-23 10:14:52 -05:00
pwm global: Migrate CONFIG_IMX6_PWM_PER_CLK to CFG 2022-12-23 10:10:40 -05:00
qe qe: Remove non-DM_ETH code 2022-12-07 16:04:17 -05:00
ram global: Remove unused CONFIG symbols 2022-12-22 10:31:48 -05:00
reboot-mode reboot-mode: migrate uclass to livetree 2021-10-05 08:50:15 -04:00
remoteproc remoteproc: ipu: Add driver to bring up ipu 2022-02-08 11:00:03 -05:00
reset reset: zynqmp: Enable reset driver for Versal NET 2022-09-26 14:23:29 +02:00
rng drivers: rng: optee_rng: register to CONFIG_OPTEE_SERVICE_DISCOVERY 2022-09-14 15:23:03 -04:00
rtc global: Migrate CONFIG_FTRTC010_PCLK to CFG 2022-12-23 10:09:43 -05:00
scsi global: Migrate CONFIG_SCSI_DEV_LIST to CFG 2022-12-23 10:15:11 -05:00
serial post: Move CONFIG_SYS_POST to CFG_SYS_POST 2022-12-23 13:01:13 -05:00
smem smem: msm: add missing <linux/sizes.h> 2022-10-12 08:56:24 -04:00
soc soc: ti: k3-socinfo: add am62a SoC entry 2022-12-09 14:10:28 -05:00
sound test: test sandbox sound driver more rigorously 2022-12-05 17:43:21 +01:00
spi cf_spi.c: Rename CONFIG_SPI_IDLE_VAL to SPI_IDLE_VAL 2022-12-23 13:01:13 -05:00
spmi spmi: msm: add arbiter version 5 support 2021-10-31 08:46:44 -04:00
sysinfo dm: core: Switch uclass_*_device_err to use uclass_*_device_check 2022-10-29 07:36:33 -06:00
sysreset global: Move remaining CONFIG_SYS_* to CFG_SYS_* 2022-12-05 16:06:08 -05:00
tee blk: Switch over to using uclass IDs 2022-09-16 11:05:16 -04:00
thermal thermal: add sandbox driver 2022-10-11 16:03:03 -04:00
timer global: Move remaining CONFIG_SYS_* to CFG_SYS_* 2022-12-05 16:06:08 -05:00
tpm tpm: Implement state command for Cr50 2022-09-03 16:59:05 +03:00
ufs lib: fix selection of CONFIG_CHARSET 2022-05-03 21:39:22 +02:00
usb cmd: source: Support specifying config name 2022-12-31 13:35:19 -05:00
video global: Migrate CONFIG_FB_ADDR to CFG 2022-12-23 10:09:42 -05:00
virtio dm: treewide: Do not opencode uclass_probe_all() 2022-10-17 21:17:12 -06:00
w1 dm: treewide: Do not use the return value of simple uclass iterator 2022-10-29 07:36:33 -06:00
w1-eeprom dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
watchdog global: Migrate CONFIG_DW_WDT_CLOCK_KHZ to CFG 2022-12-23 10:07:03 -05:00
xen xen: pvblock: Use uclass_probe_all 2022-11-02 13:58:17 -04:00
Kconfig FWU: Add support for the FWU Multi Bank Update feature 2022-10-31 14:47:32 -04:00
Makefile bus: Optionally include TI sysc driver in SPL/TPL 2022-12-02 08:39:00 -05:00