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
ramdisk.

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 <m...@foundries.io>
---
 meta/classes/kernel-fitimage.bbclass | 7 +++++++
 1 file changed, 7 insertions(+)

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() {
                        fi
                        i=`expr ${i} + 1`
                done
+       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
        fi
 
        fitimage_emit_section_maint ${1} sectend
-- 
2.21.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to