When using EXTERNAL_KERNEL_DEVICETREE, collect DTB overlays too (*.dtbo)
as well as iterating down into sub-directories so using the behaviour
for naming which matches KERNEL_DEVICETREE.

Signed-off-by: Alex Kiernan <[email protected]>
---

Changes in v2:
- ensure that the order of dtb/dtbo files in the generated fitimage is
  reproducible.

 meta/classes/kernel-fitimage.bbclass | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index ec18a3d69921..72b05ff8d1dd 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -391,11 +391,10 @@ fitimage_assemble() {
 
        if [ -n "${EXTERNAL_KERNEL_DEVICETREE}" ]; then
                dtbcount=1
-               for DTBFILE in ${EXTERNAL_KERNEL_DEVICETREE}/*.dtb; do
-                       DTB=`basename ${DTBFILE}`
+               for DTB in $(find "${EXTERNAL_KERNEL_DEVICETREE}" \( -name 
'*.dtb' -o -name '*.dtbo' \) -printf '%P\n' | sort); do
                        DTB=$(echo "${DTB}" | tr '/' '_')
                        DTBS="${DTBS} ${DTB}"
-                       fitimage_emit_section_dtb ${1} ${DTB} ${DTBFILE}
+                       fitimage_emit_section_dtb ${1} ${DTB} 
"${EXTERNAL_KERNEL_DEVICETREE}/${DTB}"
                done
        fi
 
-- 
2.17.1

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to