diff options
author | Jamin Lin <jamin_lin@aspeedtech.com> | 2025-06-17 16:10:50 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-06-19 21:54:43 +0100 |
commit | d8cd58cc7ad5d8b7c92ef6eb6f0b973f0276422d (patch) | |
tree | 5cf913eca69ac2bff80c8e6791bce29c5481cc55 /scripts/lib/devtool/ide_sdk.py | |
parent | eb9b83d6c9efec3b6aa70861fedb6ad531963945 (diff) | |
download | poky-d8cd58cc7ad5d8b7c92ef6eb6f0b973f0276422d.tar.gz |
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>
Diffstat (limited to 'scripts/lib/devtool/ide_sdk.py')
0 files changed, 0 insertions, 0 deletions