mirror of
https://git.yoctoproject.org/poky
synced 2026-04-17 09:32:12 +02:00
uboot-sign: Add support for setting firmware property in FIT configuration
Add the ability to set the "firmware" property in the FIT configuration node by introducing the UBOOT_FIT_CONF_FIRMWARE variable. This property defines the primary image to be executed during boot. If it is set, its value will be written into the FIT configuration under the "firmware" field. If not set, the bootloader will fall back to using the first entry in the "loadables" list. Using this property improves control over the boot sequence, especially in multi-binary boot scenarios. (From OE-Core rev: 82e1d7cbc855dbe4bec93f9b049851cbe376ea5e) 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>
This commit is contained in:
committed by
Richard Purdie
parent
a50b243ea6
commit
13d83810b8
@@ -101,6 +101,10 @@ UBOOT_FIT_TEE_IMAGE ?= "tee-raw.bin"
|
||||
# User specific settings
|
||||
UBOOT_FIT_USER_SETTINGS ?= ""
|
||||
|
||||
# Sets the firmware property to select the image to boot first.
|
||||
# If not set, the first entry in "loadables" is used instead.
|
||||
UBOOT_FIT_CONF_FIRMWARE ?= ""
|
||||
|
||||
# Unit name containing a list of users additional binaries to be loaded.
|
||||
# It is a comma-separated list of strings.
|
||||
UBOOT_FIT_CONF_USER_LOADABLES ?= ''
|
||||
@@ -361,6 +365,7 @@ EOF
|
||||
# we want to sign it so that the SPL can verify it
|
||||
uboot_fitimage_assemble() {
|
||||
conf_loadables="\"uboot\""
|
||||
conf_firmware=""
|
||||
rm -f ${UBOOT_ITS} ${UBOOT_FITIMAGE_BINARY}
|
||||
|
||||
# First we create the ITS script
|
||||
@@ -432,6 +437,10 @@ EOF
|
||||
conf_loadables="${conf_loadables}${UBOOT_FIT_CONF_USER_LOADABLES}"
|
||||
fi
|
||||
|
||||
if [ -n "${UBOOT_FIT_CONF_FIRMWARE}" ] ; then
|
||||
conf_firmware="firmware = \"${UBOOT_FIT_CONF_FIRMWARE}\";"
|
||||
fi
|
||||
|
||||
cat << EOF >> ${UBOOT_ITS}
|
||||
};
|
||||
|
||||
@@ -439,6 +448,7 @@ EOF
|
||||
default = "conf";
|
||||
conf {
|
||||
description = "Boot with signed U-Boot FIT";
|
||||
${conf_firmware}
|
||||
loadables = ${conf_loadables};
|
||||
fdt = "fdt";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user