mbox series

[v2,0/4] uboot-sign: support an SPL FIT with firmware loadables and extra configurations

Message ID 20261121085937.411140-1-viswanath.kraleti@oss.qualcomm.com
Headers show
Series uboot-sign: support an SPL FIT with firmware loadables and extra configurations | expand

Message

Viswanath Kraleti Nov. 21, 2026, 8:59 a.m. UTC
The Qualcomm Shikra open boot flow replaces XBL with the U-Boot SPL,
which loads its images from a single FIT. Besides BL31, OP-TEE and
U-Boot, that FIT carries the PMIC, DDR, QcLib and RPM firmware, and has a
second configuration, "pre-ddr", holding the images the SPL loads ahead
of DDR init. The SPL picks the configuration by its description, and
reads the image data stored after the FIT structure.

uboot-sign can't build that FIT today, short of writing the extra image
and configuration nodes as ITS text in UBOOT_FIT_USER_SETTINGS, along
with copies of the hash and signature nodes the class would give them.
This series adds what is needed so the layer can describe them with
variables instead:

  1. UBOOT_FIT_MKIMAGE_EXTRA_OPTS, to pass options such as -E to
     mkimage when the fitImage is created and signed
  2. write the image hash and signature nodes in one place, so every
     image node is signed alike
  3. UBOOT_FIT_LOADABLES and UBOOT_FIT_LOADABLE_* varflags, for
     additional images, and UBOOT_FIT_CONF_LOADABLES to load them from
     the default configuration
  4. UBOOT_FIT_CONFIGURATIONS and UBOOT_FIT_CONFIGURATION_* varflags,
     for additional configurations, each checked with fit_check_sign -c

All defaults leave the generated ITS unchanged. Each patch extends the
U-Boot FIT selftests, and oe-selftest -r fitimage.UBootFitImageTests
passes on master with the series applied.

Changes in v2:
- Rework the series after the v1 review: the extra images and
  configurations are now variables and varflags handled by the class,
  so no ITS text has to carry its own hash and signature nodes
- Rename SPL_MKIMAGE_ARGS to UBOOT_FIT_MKIMAGE_EXTRA_OPTS, separate from
  the kernel FIT_MKIMAGE_EXTRA_OPTS
- Add a patch writing the image hash and signature nodes in one place
- Add UBOOT_FIT_LOADABLES, UBOOT_FIT_LOADABLE_* and
  UBOOT_FIT_CONF_LOADABLES
- Replace UBOOT_FIT_USER_CONFIGURATIONS and UBOOT_FIT_CONF_NAME with
  UBOOT_FIT_CONFIGURATIONS and UBOOT_FIT_CONFIGURATION_*
- Drop UBOOT_FIT_TEE_TYPE and UBOOT_FIT_FDT
- Add selftests for the new variables, signed and unsigned
- v1: https://lists.openembedded.org/g/openembedded-core/message/249691

Viswanath Kraleti (4):
  uboot-sign: add UBOOT_FIT_MKIMAGE_EXTRA_OPTS
  uboot-sign: write the image hash and signature nodes in one place
  uboot-sign: add UBOOT_FIT_LOADABLES
  uboot-sign: add UBOOT_FIT_CONFIGURATIONS

 meta/classes-recipe/uboot-sign.bbclass   | 313 ++++++++++++++------
 meta/lib/oeqa/selftest/cases/fitimage.py | 352 ++++++++++++++++++++++-
 2 files changed, 579 insertions(+), 86 deletions(-)