Skip to contentSkip to conversation

kernel-fitimage: Handle overlays in EXTERNAL_KERNEL_DEVICETREE

PATCH Superseded Alex Kiernan 1 participant 2 messages Jan 31, 2020 – Feb 8, 2020

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel-fitimage: Handle overlays in EXTERNAL_KERNEL_DEVICETREE

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.

---

 meta/classes/kernel-fitimage.bbclass | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
meta/classes/kernel-fitimage.bbclass +2 -3
index ec18a3d69921..d1b8cdc1f049 100644
@@ -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'); 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
 
Signature · 1 line
2.17.1
#1 lore raw
Quoted 19 lines · Alex Kiernan

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.

---

 meta/classes/kernel-fitimage.bbclass | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
meta/classes/kernel-fitimage.bbclass +0 -0
index ec18a3d69921..d1b8cdc1f049 100644
@@ -391,11 +391,10 @@ fitimage_assemble() {
 
        if [ -n "${EXTERNAL_KERNEL_DEVICETREE}" ]; then
                dtbcount=1

meta/classes/kernel-fitimage.bbclass fitimage_assemble() { · line 400

Quoted 10 lines
meta/classes/kernel-fitimage.bbclass +2 -3
-               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'); 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
 

Ping?

Signature · 1 line
Alex Kiernan