From: Jamin Lin <jamin_lin@aspeedtech.com>
To: <openembedded-core@lists.openembedded.org>
Cc: <troy_lee@aspeedtech.com>, <jamin_lin@aspeedtech.com>,
<vince_chang@aspeedtech.com>
Subject: [PATCH v6 2/3] uboot-sign: support to add users specific image tree source
Date: Mon, 17 Feb 2025 16:52:32 +0800 [thread overview]
Message-ID: <20250217085233.2201043-3-jamin_lin@aspeedtech.com> (raw)
In-Reply-To: <20250217085233.2201043-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 add their private
images into u-boot FIT image for specific application and purpose.
To make this bbclass more flexible and support to add users specific snippet
ITS, creates a new "UBOOT_FIT_USER_SETTINGS" variable. Users can add their
specific snippet ITS into this variable.
Example:
```
UBOOT_FIT_MY_ITS = '\
myfw {\n\
description = \"MY Firmware\";\n\
data = /incbin/(\"myfw.bin\");\n\
type = \"mytype\";\n\
arch = \"myarch\";\n\
os = \"myos\";\n\
load = <0xb2000000>;\n\
entry = <0xb2000000>;\n\
compression = \"none\";\n\
};\n\
'
UBOOT_FIT_USER_SETTINGS = "${UBOOT_FIT_MY_ITS}"
```
The generated ITS
```
myfw {
description = "My Firmware";
data = /incbin/("myfw.bin");
type = "mytype";
arch = "myarch";
os = "myos";
load = <0xb2000000>;
entry = <0xb2000000>;
compression = "none";
};
```
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 | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/meta/classes-recipe/uboot-sign.bbclass b/meta/classes-recipe/uboot-sign.bbclass
index 5c198324ee..c1fc89a05a 100644
--- a/meta/classes-recipe/uboot-sign.bbclass
+++ b/meta/classes-recipe/uboot-sign.bbclass
@@ -98,6 +98,13 @@ UBOOT_FIT_ARM_TRUSTED_FIRMWARE_IMAGE ?= "bl31.bin"
UBOOT_FIT_TEE ?= "0"
UBOOT_FIT_TEE_IMAGE ?= "tee-raw.bin"
+# User specific settings
+UBOOT_FIT_USER_SETTINGS ?= ""
+
+# 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}"
@@ -372,6 +379,15 @@ EOF
conf_loadables="\"atf\", ${conf_loadables}"
uboot_fitimage_atf
fi
+
+ if [ -n "${UBOOT_FIT_USER_SETTINGS}" ] ; then
+ echo -e "${UBOOT_FIT_USER_SETTINGS}" >> ${UBOOT_ITS}
+ fi
+
+ if [ -n "${UBOOT_FIT_CONF_USER_LOADABLES}" ] ; then
+ conf_loadables="${conf_loadables}${UBOOT_FIT_CONF_USER_LOADABLES}"
+ fi
+
cat << EOF >> ${UBOOT_ITS}
};
--
2.25.1
next prev parent reply other threads:[~2025-02-17 8:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-17 8:52 [PATCH v6 0/3] uboot-sign: support ATF and TFE ITS generation Jamin Lin
2025-02-17 8:52 ` [PATCH v6 1/3] uboot-sign: support to create TEE and ATF image tree source Jamin Lin
2025-02-17 8:52 ` Jamin Lin [this message]
2025-02-17 8:52 ` [PATCH v6 3/3] oe-selftest: fitimage: add testcases to test ATF and TEE 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=20250217085233.2201043-3-jamin_lin@aspeedtech.com \
--to=jamin_lin@aspeedtech.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=troy_lee@aspeedtech.com \
--cc=vince_chang@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