summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel-fitimage.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/kernel-fitimage.bbclass')
-rw-r--r--meta/classes/kernel-fitimage.bbclass20
1 files changed, 19 insertions, 1 deletions
diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
index 8ebd3ddd1e..3adb1c94db 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -30,6 +30,13 @@ python __anonymous () {
30 if image: 30 if image:
31 d.appendVarFlag('do_assemble_fitimage_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete') 31 d.appendVarFlag('do_assemble_fitimage_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
32 32
33 #check if there are any dtb providers
34 providerdtb = d.getVar("PREFERRED_PROVIDER_virtual/dtb")
35 if providerdtb:
36 d.appendVarFlag('do_assemble_fitimage', 'depends', ' virtual/dtb:do_populate_sysroot')
37 d.appendVarFlag('do_assemble_fitimage_initramfs', 'depends', ' virtual/dtb:do_populate_sysroot')
38 d.setVar('EXTERNAL_KERNEL_DEVICETREE', "${RECIPE_SYSROOT}/boot/devicetree")
39
33 # Verified boot will sign the fitImage and append the public key to 40 # Verified boot will sign the fitImage and append the public key to
34 # U-Boot dtb. We ensure the U-Boot dtb is deployed before assembling 41 # U-Boot dtb. We ensure the U-Boot dtb is deployed before assembling
35 # the fitImage: 42 # the fitImage:
@@ -373,7 +380,8 @@ fitimage_assemble() {
373 # 380 #
374 # Step 2: Prepare a DTB image section 381 # Step 2: Prepare a DTB image section
375 # 382 #
376 if [ -n "${KERNEL_DEVICETREE}" ]; then 383
384 if [ -z "${EXTERNAL_KERNEL_DEVICETREE}" ] && [ -n "${KERNEL_DEVICETREE}" ]; then
377 dtbcount=1 385 dtbcount=1
378 for DTB in ${KERNEL_DEVICETREE}; do 386 for DTB in ${KERNEL_DEVICETREE}; do
379 if echo ${DTB} | grep -q '/dts/'; then 387 if echo ${DTB} | grep -q '/dts/'; then
@@ -391,6 +399,16 @@ fitimage_assemble() {
391 done 399 done
392 fi 400 fi
393 401
402 if [ -n "${EXTERNAL_KERNEL_DEVICETREE}" ]; then
403 dtbcount=1
404 for DTBFILE in ${EXTERNAL_KERNEL_DEVICETREE}/*.dtb; do
405 DTB=`basename ${DTBFILE}`
406 DTB=$(echo "${DTB}" | tr '/' '_')
407 DTBS="${DTBS} ${DTB}"
408 fitimage_emit_section_dtb ${1} ${DTB} ${DTBFILE}
409 done
410 fi
411
394 # 412 #
395 # Step 3: Prepare a setup section. (For x86) 413 # Step 3: Prepare a setup section. (For x86)
396 # 414 #