]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
Revert "linux-dtb.inc: search dtb in all subdirectories of arch/*/boot"
authorAndreas Oberritter <obi@opendreambox.org>
Fri, 17 Nov 2017 17:50:26 +0000 (18:50 +0100)
committerAndreas Oberritter <obi@opendreambox.org>
Mon, 8 Apr 2019 11:49:57 +0000 (13:49 +0200)
This reverts commit f296e05812b13483c3452054f3aa48cab43194d5.

meta/recipes-kernel/linux/linux-dtb.inc

index 22e374fa88f8d8e62bf4376c85686889a00dc543..0174c80d852743b5a0cd4df9e45a99ad69c3d3e7 100644 (file)
@@ -16,6 +16,15 @@ 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_compile_append() {
        for DTB in ${KERNEL_DEVICETREE}; do
                DTB=`normalize_dtb "${DTB}"`
@@ -31,7 +40,7 @@ do_install_append() {
                for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
                        symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME}
                        DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
-                       DTB_PATH=`find ${B}/arch/${ARCH}/boot -name "${DTB}"`
+                       DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"`
                        install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT}
                done
        done
@@ -47,7 +56,7 @@ do_deploy_append() {
                        symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME}
                        DTB_NAME=`echo ${base_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
                        DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
-                       DTB_PATH=`find ${B}/arch/${ARCH}/boot -name "${DTB}"`
+                       DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"`
                        install -d ${DEPLOYDIR}
                        install -m 0644 ${DTB_PATH} ${DEPLOYDIR}/${DTB_NAME}.${DTB_EXT}
                        ln -sf ${DTB_NAME}.${DTB_EXT} ${DEPLOYDIR}/${DTB_SYMLINK_NAME}.${DTB_EXT}