u-boot/arch/arm/include/asm/mach-imx
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
..
ahab.h arm: imx: Check header before calling spl_load_imx_container 2023-10-17 20:50:52 -04:00
boot_mode.h imx: add USB2_BOOT type 2022-07-26 11:29:00 +02:00
dma.h common: Drop net.h from common header 2020-05-18 17:33:31 -04:00
ele_api.h imx: imx8ulp: start the ELE RNG at boot 2023-07-13 11:29:40 +02:00
gpio.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
hab.h mx6dq: hab: Fix chip version in hab.h code 2021-04-08 09:18:29 +02:00
imx-nandbcb.h cmd: nandbcb: Reconstruct the nandbcb tool for all platforms 2020-05-10 20:55:20 +02:00
imximage.cfg SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
iomux-v3.h imx: add basic i.MX9 support 2022-07-26 11:29:00 +02:00
module_fuse.h Correct SPL uses of IMX_MODULE_FUSE 2023-02-10 07:41:39 -05:00
mu_hal.h misc: imx: S400_API: Move S400 MU and API to a common place 2022-07-26 11:29:00 +02:00
mx5_video.h video: Drop references to CONFIG_VIDEO et al 2022-03-28 20:17:07 +02:00
mxc_i2c.h dm: i2c: use CONFIG_IS_ENABLED macro for DM_I2C/DM_I2C_GPIO 2021-02-21 06:08:00 +01:00
rdc-sema.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
regs-apbh.h mtd: nand: support GPMI NAND driver for i.MX8 2020-05-10 20:55:20 +02:00
regs-bch.h mtd: nand: support GPMI NAND driver for i.MX8 2020-05-10 20:55:20 +02:00
regs-common.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
regs-gpmi.h imx: gpmi: Add register needed to control nand bus timing 2022-10-09 10:42:26 +02:00
regs-lcdif.h video: mxsfb: add support for i.MXRT 2020-04-18 12:54:43 +02:00
regs-usbphy.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sata.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
spi.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sys_proto.h imx: imx8: bootaux: Add i.MX8 M4 boot support 2023-07-13 11:29:40 +02:00
syscounter.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
video.h video: ipuv3: add DM_VIDEO support 2019-04-13 20:30:09 +02:00