]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
kernel-devicetree.bbclass: search dtb in all subdirectories of arch/${ARCH}/boot
authorAndreas Oberritter <obi@opendreambox.org>
Thu, 23 Nov 2017 20:56:51 +0000 (21:56 +0100)
committerAndreas Oberritter <obi@opendreambox.org>
Mon, 8 Apr 2019 11:49:57 +0000 (13:49 +0200)
Fixes installation of dtbs grouped in vendor subdirectories in cases
where the subdirectory is not part of the entries in KERNEL_DEVICETREE.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
meta/classes/kernel-devicetree.bbclass

index de12f2613893111c81caf95424bfb772674b8bae..457ad994bcffa725d1a8393b8ad640ca20f93a03 100644 (file)
@@ -18,15 +18,6 @@ normalize_dtb () {
        echo "$dtb"
 }
 
-get_real_dtb_path_in_kernel () {
-       dtb="$1"
-       dtb_path="${B}/arch/${ARCH}/boot/dts/$dtb"
-       if [ ! -e "$dtb_path" ]; then
-               dtb_path="${B}/arch/${ARCH}/boot/$dtb"
-       fi
-       echo "$dtb_path"
-}
-
 do_configure_append() {
        if [ "${KERNEL_DEVICETREE_BUNDLE}" = "1" ]; then
                if echo ${KERNEL_IMAGETYPE_FOR_MAKE} | grep -q 'zImage'; then
@@ -61,7 +52,7 @@ do_install_append() {
                dtb=`normalize_dtb "$dtbf"`
                dtb_ext=${dtb##*.}
                dtb_base_name=`basename $dtb .$dtb_ext`
-               dtb_path=`get_real_dtb_path_in_kernel "$dtb"`
+               dtb_path=`find ${B}/arch/${ARCH}/boot -path "*/$dtb" -print -quit`
                install -m 0644 $dtb_path ${D}/${KERNEL_IMAGEDEST}/$dtb_base_name.$dtb_ext
        done
 }