Skip to contentSkip to conversation

kernel-fitImage: Strip path component from dtb

PATCH New Frieder Schrempf 1 participant 1 message Nov 23, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel-fitImage: Strip path component from dtb

From: Ninad Palsule <[email protected]>

Machines that have added subdirectires to the KERNEL_DEVICETREE recently, such as arm32 boards that were moved under subdirectories in Linux 6.5, will have that subdirectory in the node name of the FIT. This breaks existing systems that select a configuration in u-boot by it's name.

Strip off the directory component from the device tree to preserve compatibility.

(From OE-Core rev: 941ba1a132bafa9c9be855fb91fec96d8b06299f)

---
 meta/classes/kernel-fitimage.bbclass | 5 +++++
 1 file changed, 5 insertions(+)
meta/classes/kernel-fitimage.bbclass +5 -0
index 27e17db951..194d825b0e 100644
@@ -542,6 +542,11 @@ fitimage_assemble() {
 				DTB_PATH="arch/${ARCH}/boot/$DTB"
 			fi
 
+			# Strip off the path component from the filename
+			if "${@'false' if oe.types.boolean(d.getVar('KERNEL_DTBVENDORED')) else 'true'}"; then
+				DTB=`basename $DTB`
+			fi
+
 			DTB=$(echo "$DTB" | tr '/' '_')
 
 			# Skip DTB if we've picked it up previously
Signature · 1 line
2.42.1