u-boot/common
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
..
eeprom SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
init spl: Use SYS_MALLOC_F instead of SYS_MALLOC_F_LEN 2023-10-06 14:38:12 -04:00
spl arm: imx: Check header before calling spl_load_imx_container 2023-10-17 20:50:52 -04:00
autoboot.c autoboot: Rework CONFIG_AUTOBOOT_STOP_STR_* usage 2023-01-20 12:27:06 -05:00
avb_verify.c common: avb_verify: prevent opening incorrect session 2023-02-17 10:51:28 -05:00
bloblist.c bloblist: Add missing name 2023-10-06 14:38:13 -04:00
board_f.c bloblist: Support initing from multiple places 2023-10-06 14:38:13 -04:00
board_info.c board-info: Call sysinfo_detect() before sysinfo_get_str() 2021-07-14 16:48:00 -04:00
board_r.c spl: Use SYS_MALLOC_F instead of SYS_MALLOC_F_LEN 2023-10-06 14:38:12 -04:00
bootstage.c spl: Remove #ifdefs with BOOTSTAGE 2023-10-06 14:38:12 -04:00
bouncebuf.c common: bouncebuf: Add missing cast to dma_addr_t 2023-08-22 15:17:52 -04:00
cli.c cli: run_commandf(): small fixups 2023-03-30 15:09:59 -04:00
cli_getch.c cli: Correct several bugs in cli_getch() 2023-03-28 09:25:51 -04:00
cli_hush.c common: hush: Remove unused NEEDS_MANUAL_RELOC code bits 2023-09-14 10:42:24 -04:00
cli_readline.c cli: Add a function to set up a new cread 2023-10-11 15:43:54 -04:00
cli_simple.c cli: Support macro processing with a fixed-size buffer 2020-12-04 16:10:01 -05:00
command.c global: Finish CONFIG -> CFG migration 2023-01-20 12:27:24 -05:00
console.c console: Print out complete stdio device list 2023-08-02 16:32:31 +08:00
cros_ec.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
cyclic.c cyclic: get rid of cyclic_init() 2022-11-02 08:42:03 +01:00
ddr_spd.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
dfu.c common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
dlmalloc.c malloc: Enable assertions if UNIT_TEST is enabled 2023-10-11 13:22:29 -04:00
dlmalloc.src Consolidate bool type 2013-04-01 16:33:52 -04:00
edid.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
event.c common: event: Remove unused NEEDS_MANUAL_RELOC code bits 2023-09-14 10:42:24 -04:00
exports.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
flash.c Audit <flash.h> inclusion 2022-08-04 16:18:47 -04:00
hash.c common: hash: Remove unused NEEDS_MANUAL_RELOC code bits 2023-09-14 10:42:24 -04:00
hwconfig.c hwconfig: Allow to use restricted env 2022-08-20 18:12:51 -04:00
iomux.c IOMUX: Fix buffer overflow in iomux_replace_device() 2021-04-27 08:05:30 -04:00
iotrace.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
kallsyms.c global: Convert simple_strtoul() with hex to hextoul() 2021-08-02 13:32:14 -04:00
Kconfig event: Rename rest of EVENT_SPY to EVENT_SPY_FULL or EVENT_SPY* 2023-10-11 13:22:32 -04:00
kgdb.c common: board_r: drop initr_kgdb wrapper 2022-01-18 08:31:02 -05:00
kgdb_stubs.c common: Drop asm/ptrace.h from common header 2020-05-18 21:19:23 -04:00
log.c log: Tidy up an ambiguous comment 2023-07-17 17:12:07 +08:00
log_console.c log: Support outputing function names in SPL 2023-07-17 17:23:15 +08:00
log_syslog.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
main.c binman: add sign option for binman 2023-03-14 16:08:51 -06:00
Makefile spl: Use SYS_MALLOC_F instead of SYS_MALLOC_F_LEN 2023-10-06 14:38:12 -04:00
malloc_simple.c malloc: Annotate allocator for valgrind 2022-04-11 10:00:30 -04:00
memsize.c common/memsize.c: Fix get_ram_size() when cache is enabled 2023-06-21 16:54:25 -04:00
menu.c menu: Re-enable the ANSI codes 2023-06-23 14:38:16 -04:00
miiphyutil.c Convert CONFIG_PHY_RESET_DELAY to Kconfig 2022-03-25 12:01:15 +00:00
qfw.c qemu: Move qfw kernel setup into a common file 2023-02-06 13:04:53 -05:00
s_record.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
scp03.c common: SCP03 control (enable and provision of keys) 2021-03-13 13:14:52 -05:00
splash.c common: Replace #ifdef and #if with if's 2023-04-24 21:37:45 +02:00
splash_source.c common: splash_source: Fix type casting errors 2023-07-21 13:13:43 -04:00
stackprot.c Add support for stack-protector 2021-04-20 07:31:12 -04:00
stdio.c stdio: fix stdio_deregister_dev() 2023-10-09 15:24:31 -04:00
system_map.c
update.c common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
usb.c usb: Tidy up the usb_start flag 2023-05-13 09:52:32 -04:00
usb_hub.c usb: Drop unused ehci-faraday driver 2023-02-07 14:33:50 -05:00
usb_kbd.c cyclic: Use schedule() instead of WATCHDOG_RESET() 2022-09-18 10:26:33 +02:00
usb_onboard_hub.c usb: onboard-hub: add driver to manage onboard hub supplies 2023-01-12 16:19:53 +01:00
usb_storage.c blk: Use a macro for the typical block size 2023-10-10 16:19:29 -04:00
xyzModem.c cyclic: Use schedule() instead of WATCHDOG_RESET() 2022-09-18 10:26:33 +02:00