From: Jamin Lin <jamin_lin@aspeedtech.com>
To: <openembedded-core@lists.openembedded.org>
Cc: <troy_lee@aspeedtech.com>, <jamin_lin@aspeedtech.com>
Subject: [PATCH v4 2/3] uboot-sign: support to create users specific image tree source
Date: Mon, 18 Nov 2024 14:32:32 +0800 [thread overview]
Message-ID: <20241118063233.698679-3-jamin_lin@aspeedtech.com> (raw)
In-Reply-To: <20241118063233.698679-1-jamin_lin@aspeedtech.com>
Currently, uboot-sign.bbclass only supports to create Image Tree Source(ITS)
for "u-boot" and "flat_dt". However, users may want to support their private
images for specific application and purpose.
To make this bbclass more flexible and support users specific ITS, creates new
"uboot_fitimage_user_image" function. It is an empty function, so users can
create a bbappend to overwrite this function with their specific settings.
Otherwise, users need to overwrite the "uboot_fitimage_assemble" function.
Add a variable "UBOOT_FIT_USER_IMAGE" to enable users specific ITS generation
and it is disable by default.
Add a variable "UBOOT_FIT_CONF_USER_LOADABLES" to load users specific images
and it is an empty by default.
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
---
meta/classes-recipe/uboot-sign.bbclass | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/meta/classes-recipe/uboot-sign.bbclass b/meta/classes-recipe/uboot-sign.bbclass
index f1b3470127..3b61f239e3 100644
--- a/meta/classes-recipe/uboot-sign.bbclass
+++ b/meta/classes-recipe/uboot-sign.bbclass
@@ -100,6 +100,13 @@ UBOOT_FIT_ARM_TRUSTED_FIRMWARE_IMAGE ?= "bl31.bin"
UBOOT_FIT_TEE ?= "0"
UBOOT_FIT_TEE_IMAGE ?= "tee-raw.bin"
+# User specific image
+UBOOT_FIT_USER_IMAGE ?= "0"
+
+# 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 ?= ''
+
UBOOT_FIT_UBOOT_LOADADDRESS ?= "${UBOOT_LOADADDRESS}"
UBOOT_FIT_UBOOT_ENTRYPOINT ?= "${UBOOT_ENTRYPOINT}"
@@ -246,6 +253,12 @@ do_uboot_generate_rsa_keys() {
addtask uboot_generate_rsa_keys before do_uboot_assemble_fitimage after do_compile
+# Create a ITS file for the user specific image. It is an empty function and
+# users should create a bbappend to overwrite this function
+uboot_fitimage_user_image() {
+ bbwarn "Please add your specific image ITS settings for u-boot FIT image generation."
+}
+
# Create a ITS file for the atf
uboot_fitimage_atf() {
cat << EOF >> ${UBOOT_ITS}
@@ -366,6 +379,13 @@ EOF
conf_loadables="\"atf\", ${conf_loadables}"
uboot_fitimage_atf
fi
+
+ if [ "${UBOOT_FIT_USER_IMAGE}" = "1" ] ; then
+ if [ -n "${UBOOT_FIT_CONF_USER_LOADABLES}" ] ; then
+ conf_loadables="${conf_loadables}${UBOOT_FIT_CONF_USER_LOADABLES}"
+ fi
+ uboot_fitimage_user_image
+ fi
cat << EOF >> ${UBOOT_ITS}
};
--
2.25.1
next prev parent reply other threads:[~2024-11-18 6:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-18 6:32 [PATCH v4 0/3] uboot-sign: support ATF and TFE ITS generation Jamin Lin
2024-11-18 6:32 ` [PATCH v4 1/3] uboot-sign: support to create TEE and ATF image tree source Jamin Lin
2024-11-18 6:32 ` Jamin Lin [this message]
2024-11-18 6:32 ` [PATCH v4 3/3] oe-selftest: fitimage: add testcases to test ATF and TEE Jamin Lin
2024-11-28 13:51 ` [OE-core] [PATCH v4 0/3] uboot-sign: support ATF and TFE ITS generation Ross Burton
2024-12-02 5:39 ` Jamin Lin
2024-12-02 17:36 ` Ross Burton
2024-12-05 23:51 ` Adrian Freihofer
2024-12-06 1:12 ` Jamin Lin
[not found] ` <180E7161025130F9.8554@lists.openembedded.org>
2024-12-10 8:07 ` Jamin Lin
2024-12-11 2:46 ` Jamin Lin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241118063233.698679-3-jamin_lin@aspeedtech.com \
--to=jamin_lin@aspeedtech.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=troy_lee@aspeedtech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox