]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
linux-dtb.inc: search dtb in all subdirectories of arch/*/boot
authorAndreas Oberritter <obi@opendreambox.org>
Wed, 22 Mar 2017 22:53:53 +0000 (23:53 +0100)
committerAndreas Oberritter <obi@opendreambox.org>
Mon, 8 Apr 2019 11:49:57 +0000 (13:49 +0200)
Some architectures, like arm64, organize dts files in vendor
subdirectories.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
meta/recipes-kernel/linux/linux-dtb.inc

index 0174c80d852743b5a0cd4df9e45a99ad69c3d3e7..22e374fa88f8d8e62bf4376c85686889a00dc543 100644 (file)
@@ -16,15 +16,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_compile_append() {
        for DTB in ${KERNEL_DEVICETREE}; do
                DTB=`normalize_dtb "${DTB}"`
@@ -40,7 +31,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=`get_real_dtb_path_in_kernel "${DTB}"`
+                       DTB_PATH=`find ${B}/arch/${ARCH}/boot -name "${DTB}"`
                        install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT}
                done
        done
@@ -56,7 +47,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=`get_real_dtb_path_in_kernel "${DTB}"`
+                       DTB_PATH=`find ${B}/arch/${ARCH}/boot -name "${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}