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_...@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
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#211533): https://lists.openembedded.org/g/openembedded-core/message/211533 Mute This Topic: https://lists.openembedded.org/mt/111228477/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-