u-boot/drivers
Sean Anderson ab12179b3e arm: imx: Check header before calling spl_load_imx_container
Make sure we have an IMX header before calling spl_load_imx_container,
since if we don't it will fail with -ENOENT. This allows us to fall back to
legacy/raw images if they are also enabled.

This is a functional change, one which likely should have been in place
from the start, but a functional change nonetheless. Previously, all
non-IMX8 images (except FITs without FIT_FULL) would be optimized out if
the only image load method enabled supported IMX8 images. With this change,
support for other image types now has an effect.

There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with
SPL_BOOTROM_SUPPORT:

    imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk

and four with SPL_MMC:

    deneb imx8qxp_mek giedi imx8qm_mek

All of these boards also have SPL_RAW_IMAGE_SUPPORT and
SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support
enabled. Of the six load methods affected by this patch, only SPL_MMC and
SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER.
spl_romapi_load_image_seekable does not support legacy or raw images, so
there is no growth. However, mmc_load_image_raw_sector does support loading
legacy/raw images. Since these images could not have been booted before, I
have disabled support for legacy/raw images on these four boards. This
reduces bloat from around 800 bytes to around 200.

There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both
enabled, so we do not need to worry about potentially falling back to
legacy images in a secure boot scenario.

Future work could include merging imx_container.h with imx8image.h, since
they appear to define mostly the same structures.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
2023-10-17 20:50:52 -04:00
..
adc common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
ata arm: mvebu: sata_mv: Add bootstd hook to enable sata_bootdev 2023-10-16 11:10:42 +02:00
axi axi: fix definition of axi_sandbox_get_emul() 2023-06-01 12:32:03 -04:00
bios_emulator common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
block dm: blk: Drop blk_{read,write}_devnum() 2023-10-10 16:25:48 -04:00
bootcount common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
bus bus: Optionally include TI sysc driver in SPL/TPL 2022-12-02 08:39:00 -05:00
button dm: button: add support for linux_code in button-gpio.c driver 2023-02-10 12:50:01 -05:00
cache drivers: use dev_read_addr_ptr when cast to pointer 2023-05-06 17:28:18 +08:00
clk Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh 2023-10-17 09:15:56 -04:00
core core: introduce dev_read_addr_name[_size]_ptr() functions 2023-10-13 10:15:41 -07:00
cpu cpu: Remove unused NEEDS_MANUAL_RELOC code bits 2023-09-14 10:42:24 -04:00
crypto crypto: rsa: Remove unused NEEDS_MANUAL_RELOC code bits 2023-09-14 10:42:24 -04:00
ddr treewide: unify the linker symbol reference format 2023-08-09 09:21:42 -04:00
demo demo: migrate uclass to livetree 2021-10-05 08:50:15 -04:00
dfu dfu: mtd: mark bad the MTD block on erase error 2023-10-13 10:49:07 +02:00
dma treewide: use dev_read_addr_*_ptr() where appropriate 2023-10-13 14:01:42 -06:00
extcon extcon: add MAX14526 MUIC support 2023-05-02 14:23:58 -04:00
fastboot common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
firmware firmware: scmi: Fix clearing variable 2023-10-13 21:21:07 -04:00
fpga arm64: zynqmp: Fix Siva's email address format 2023-10-09 10:25:32 +02:00
fuzz sandbox: Implement fuzzing engine driver 2022-06-23 12:58:19 -04:00
fwu-mdata FWU: Add FWU metadata access driver for MTD storage regions 2023-06-09 13:52:40 -04:00
gpio gpio: Add RZ/G2L GPIO driver 2023-10-16 15:46:18 +02:00
hwspinlock hwspinlock: Remove unused NEEDS_MANUAL_RELOC code bits 2023-09-14 10:42:24 -04:00
i2c Merge branch 'next' 2023-10-02 10:55:44 -04:00
input input: avoid NULL dereference 2023-10-11 10:35:24 -04:00
iommu iommu: Implement mapping IOMMUs for PCI devices 2023-01-27 14:47:58 -05:00
led drivers: led: bcm6858: do not use null label to find the top 2023-07-25 12:44:46 -04:00
mailbox treewide: use dev_read_addr_*_ptr() where appropriate 2023-10-13 14:01:42 -06:00
memory memory: atmel-ebi: add Atmel EBI (External Bus Interface) driver 2022-12-08 18:06:27 +02:00
mfd mfd: syscon: atmel-smc: Add new helpers to ease SMC regs manipulation 2022-12-08 18:06:27 +02:00
misc misc: fs_loader: Fix alignment of fs_loader driver 2023-10-11 13:22:32 -04:00
mmc mmc: renesas-sdhi: Initialize module on RZ/G2L 2023-10-17 03:27:42 +02:00
mtd mtd: spinand: winbond: add Winbond W25N02KV flash support 2023-10-13 10:49:07 +02:00
mux Correct SPL uses of MULTIPLEXER 2023-03-02 17:45:58 -05:00
net Xilinx changes for v2024.01-rc1 v3 2023-10-13 08:45:55 -04:00
nvme blk: Use a macro for the typical block size 2023-10-10 16:19:29 -04:00
pch x86: Convert some debug statements to use logging 2023-07-17 17:23:14 +08:00
pci Merge tag 'u-boot-rockchip-20231007' of https://source.denx.de/u-boot/custodians/u-boot-rockchip 2023-10-08 09:58:55 -04:00
pci_endpoint dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
phy - add Amlogic A1 clock driver 2023-10-16 09:09:54 -04:00
pinctrl gpio: Add RZ/G2L GPIO driver 2023-10-16 15:46:18 +02:00
power scmi: refactor the code to hide a channel from devices 2023-10-13 16:59:23 -04:00
pwm pwm: mtk: add support for MediaTek MT7988 SoC 2023-08-03 09:40:49 -04:00
qe global: Finish CONFIG -> CFG migration 2023-01-20 12:27:24 -05:00
ram treewide: use dev_read_addr_*_ptr() where appropriate 2023-10-13 14:01:42 -06:00
reboot-mode reboot-mode: Add NVMEM reboot mode 2023-01-11 11:54:50 -05:00
remoteproc common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
reset - add Amlogic A1 clock driver 2023-10-16 09:09:54 -04:00
rng drivers: rng: add support for Meson S4 2023-10-13 11:30:42 +02:00
rtc drivers: rtc: max313xx: provide read8/write8 2023-07-25 12:44:46 -04:00
scsi scsi: Add buffer_aligned check pass-through 2023-08-22 15:17:53 -04:00
serial Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh 2023-10-17 09:15:56 -04:00
sm drivers: introduce Meson Secure Monitor driver 2023-10-15 12:23:48 +02:00
smem smem: msm: add missing <linux/sizes.h> 2022-10-12 08:56:24 -04:00
soc treewide: use dev_read_addr_*_ptr() where appropriate 2023-10-13 14:01:42 -06:00
sound test: test sandbox sound driver more rigorously 2022-12-05 17:43:21 +01:00
spi spi: mtk_spim: prevent global pll clock override 2023-10-11 13:21:33 -04:00
spmi spmi: msm: add arbiter version 5 support 2021-10-31 08:46:44 -04:00
sysinfo sysinfo: gpio: fix loop over DT "revisions" array 2023-03-30 15:09:59 -04:00
sysreset common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
tee drivers: tee: sandbox: Fix SCP03 control emulator 2023-04-28 11:30:17 -06:00
thermal thermal: imx_tmu: Increase the polling interval 2023-09-04 17:26:44 +02:00
timer riscv: andesv5: Prefer using the generic RISC-V timer driver in S-mode 2023-10-04 18:23:54 +08:00
tpm common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
ufs ufs: ufs-renesas: Drop include common.h 2023-09-09 10:13:24 -04:00
usb arm: imx: Check header before calling spl_load_imx_container 2023-10-17 20:50:52 -04:00
video video: Mark truetype_measure() static 2023-10-11 15:43:55 -04:00
virtio bootstd: Rename bootdev_setup_sibling_blk() 2023-08-09 23:31:11 +08: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 common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
xen xen: Limit execution to EL1 only 2023-04-25 15:31:28 -04:00
Kconfig drivers: introduce Secure Monitor uclass 2023-10-15 12:23:48 +02:00
Makefile drivers: introduce Secure Monitor uclass 2023-10-15 12:23:48 +02:00