kernel-fitimage: generate a default conf@ entry for non-dtb images

Message ID
State New
Headers show
  • kernel-fitimage: generate a default conf@ entry for non-dtb images
Related show

Commit Message

Michael Scott May 20, 2019, 5:42 p.m.
Step 5 of fitimage_assemble() creates a series of configurations
for each kernel DTB referenced in the fitimage.  These
configurations are usually used as bootm parameters to alias items
like the kernel and ramdisk, etc.  The conf@ entries are also used
when generating signature data for verified boot.

Boards without kernel DTBs in the fitimage skip this step and no
conf@ entries are generated.  This presents a problem if the u-boot
scripts still wish to use the conf@ references for the kernel and

Examples of this would be using QEMU ARM64 or RISC-V based .WIC
images with a vfat boot partition and ext4 rootfs.  The fitImage
is stored in the boot partition similar to other actual HW.
However, without the conf@ entry the boot scripts still need to
use kernel@1 and ramdisk@1 hard-coded references.

Also, a u-boot patch is currently being tested which adds signing
/ verified boot functionality for HW which doesn't use appended
u-boot DTBs.  IE: QEMU uses prior stage hand-off and Raspberry
Pi 3 uses an embedded DTB, etc.  By having the conf@ entry in the
fitImage, the entire OE signing process "just works" for testing
this new setup.

Signed-off-by: Michael Scott <>

 meta/classes/kernel-fitimage.bbclass | 7 +++++++
 1 file changed, 7 insertions(+)


Openembedded-core mailing list


diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
index 2820ff9689..8ade9eb410 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -458,6 +458,13 @@  fitimage_assemble() {
 			i=`expr ${i} + 1`
+	else
+		# insert 1 default configuration w/o DTBs
+		if [ "x${ramdiskcount}" = "x1" ] ; then
+				fitimage_emit_section_config ${1} "${kernelcount}" "" "${ramdiskcount}" "${setupcount}" ""
+		else
+				fitimage_emit_section_config ${1} "${kernelcount}" "" "" "${setupcount}" ""
+		fi
 	fitimage_emit_section_maint ${1} sectend