diff options
| author | Jamin Lin <jamin_lin@aspeedtech.com> | 2025-02-17 16:52:32 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-02-27 10:55:17 +0000 |
| commit | 7be7e16cbb26f87ed1fda853c037265c0cbb00a3 (patch) | |
| tree | ef18241e2ce9f5fd06f00ae7606ab8c612b52f5f /meta/classes-recipe/uboot-sign.bbclass | |
| parent | e6ff7089771a332779e894959855c4788a4c9720 (diff) | |
| download | poky-7be7e16cbb26f87ed1fda853c037265c0cbb00a3.tar.gz | |
uboot-sign: support to add users specific image tree source
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.
(From OE-Core rev: c12e013453689697a8680f1c7de3e625a0ff28ec)
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 'meta/classes-recipe/uboot-sign.bbclass')
| -rw-r--r-- | meta/classes-recipe/uboot-sign.bbclass | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/meta/classes-recipe/uboot-sign.bbclass b/meta/classes-recipe/uboot-sign.bbclass index 598a89c816..76a81546e3 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" | |||
| 98 | UBOOT_FIT_TEE ?= "0" | 98 | UBOOT_FIT_TEE ?= "0" |
| 99 | UBOOT_FIT_TEE_IMAGE ?= "tee-raw.bin" | 99 | UBOOT_FIT_TEE_IMAGE ?= "tee-raw.bin" |
| 100 | 100 | ||
| 101 | # User specific settings | ||
| 102 | UBOOT_FIT_USER_SETTINGS ?= "" | ||
| 103 | |||
| 104 | # Unit name containing a list of users additional binaries to be loaded. | ||
| 105 | # It is a comma-separated list of strings. | ||
| 106 | UBOOT_FIT_CONF_USER_LOADABLES ?= '' | ||
| 107 | |||
| 101 | UBOOT_FIT_UBOOT_LOADADDRESS ?= "${UBOOT_LOADADDRESS}" | 108 | UBOOT_FIT_UBOOT_LOADADDRESS ?= "${UBOOT_LOADADDRESS}" |
| 102 | UBOOT_FIT_UBOOT_ENTRYPOINT ?= "${UBOOT_ENTRYPOINT}" | 109 | UBOOT_FIT_UBOOT_ENTRYPOINT ?= "${UBOOT_ENTRYPOINT}" |
| 103 | 110 | ||
| @@ -414,6 +421,15 @@ EOF | |||
| 414 | conf_loadables="\"atf\", ${conf_loadables}" | 421 | conf_loadables="\"atf\", ${conf_loadables}" |
| 415 | uboot_fitimage_atf | 422 | uboot_fitimage_atf |
| 416 | fi | 423 | fi |
| 424 | |||
| 425 | if [ -n "${UBOOT_FIT_USER_SETTINGS}" ] ; then | ||
| 426 | echo -e "${UBOOT_FIT_USER_SETTINGS}" >> ${UBOOT_ITS} | ||
| 427 | fi | ||
| 428 | |||
| 429 | if [ -n "${UBOOT_FIT_CONF_USER_LOADABLES}" ] ; then | ||
| 430 | conf_loadables="${conf_loadables}${UBOOT_FIT_CONF_USER_LOADABLES}" | ||
| 431 | fi | ||
| 432 | |||
| 417 | cat << EOF >> ${UBOOT_ITS} | 433 | cat << EOF >> ${UBOOT_ITS} |
| 418 | }; | 434 | }; |
| 419 | 435 | ||
