poky/meta
Jamin Lin d8cd58cc7a uboot-sign: Support signing U-Boot FIT image without SPL
Previously, the signing flow in "uboot-sign.bbclass" assumed that SPL was always
present and that the FIT signing process must inject the public key into the
SPL DTB. This made it inflexible for use cases where only the U-Boot proper
FIT image is built and signed, with no SPL binary at all.

This change introduces the following adjustments:
- The `SPL_DTB_BINARY` variable can be explicitly set to an empty string
  to indicate that no SPL is present.
- The signing logic checks `SPL_DTB_BINARY` and skips injecting the
  key or verifying the SPL DTB if it is empty.
- The FIT image generation and deployment are always performed if
  `UBOOT_FITIMAGE_ENABLE` is enabled, regardless of the SPL settings.
- The deploy helper now uses a single check on `SPL_DTB_BINARY` to decide
  whether to deploy the signed SPL DTB.

Now the sign step checks if SPL_DTB_BINARY is empty:
If present, it signs the FIT image and injects the public key into the SPL DTB,
then verifies both.
If empty, it only signs the FIT image and generates the ITS with the signature
node, but does not attempt to verify or add the key to a non-existent SPL DTB.

Key Behavior Explained
If SPL_DTB_BINARY is empty, we assume there is no SPL.
If UBOOT_FITIMAGE_ENABLE=1, we always create the FIT image and ITS.
If SPL_SIGN_ENABLE=1, we always sign the FIT image, but only inject the key into
the SPL DTB if it exists.

Example usage:
  UBOOT_FITIMAGE_ENABLE = "1"
  SPL_SIGN_ENABLE = "1"
  SPL_DTB_BINARY = ""

This means:
  - Generate and sign the FIT image.
  - Do not attempt to sign or deploy an SPL DTB.

This aligns the implementation with real scenarios where some boards do not
require an SPL.

(From OE-Core rev: 7ad6acd8841752a5b75b8e2666bca5b609347cc1)

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-06-19 21:54:43 +01:00
..
classes spdx: add option to include only compiled sources 2025-06-17 23:38:18 +01:00
classes-global toolchain: Provide abstraction for recipe specific toolchain selection 2025-06-16 22:26:38 +01:00
classes-recipe uboot-sign: Support signing U-Boot FIT image without SPL 2025-06-19 21:54:43 +01:00
conf libpng: Add ptest 2025-06-19 21:54:43 +01:00
files oe/license_finder: consolidate hash->license maps 2025-06-16 17:57:30 +01:00
lib spdx: add option to include only compiled sources 2025-06-17 23:38:18 +01:00
recipes-bsp u-boot: move arm64 disabling fragments to versioned recipe 2025-06-09 17:43:41 +01:00
recipes-connectivity kea: upgrade 2.6.1 -> 2.6.3 2025-06-12 11:03:43 +01:00
recipes-core build-appliance-image: Update to master head revision 2025-06-18 14:08:15 +01:00
recipes-devtools toolchain: Provide abstraction for recipe specific toolchain selection 2025-06-16 22:26:38 +01:00
recipes-extended libsolv: upgrade 0.7.32 -> 0.7.33 2025-06-16 17:57:30 +01:00
recipes-gnome gtk4: upgrade 4.18.5 -> 4.18.6 2025-06-16 17:57:30 +01:00
recipes-graphics wayland-protocols: upgrade 1.44 -> 1.45 2025-06-16 17:57:30 +01:00
recipes-kernel lttng-modules: upgrade 2.13.18 -> 2.13.19 2025-06-16 17:57:30 +01:00
recipes-multimedia libpng: Add ptest 2025-06-19 21:54:43 +01:00
recipes-rt rt-tests: Fix build with glibc 2.41+ 2025-01-29 16:16:52 +00:00
recipes-sato puzzles: upgrade to latest revision 2025-06-12 11:03:43 +01:00
recipes-support libcheck: disable subunit support 2025-06-18 14:04:17 +01:00
site site/arm-linux: Fix typo for sizeof_char_p 2024-11-21 12:16:28 +00:00
COPYING.MIT
recipes.txt