]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel-devicetree: Corrected normalize_dtb
authorPaulo Neves <ptsneves@gmail.com>
Mon, 2 Jul 2018 15:03:44 +0000 (17:03 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 3 Jul 2018 07:24:34 +0000 (08:24 +0100)
The normalize_dtb function was buggy because
it only converted from .dts suffix to .dtb
suffix if the user passed a full source path to
KERNEL_DEVICETREE containing the /dts/ path.
The problem is that if the user did that there
would be a warning.

On the othet hand if user just set the variable
KERNEL_DEVICETREE="file.dts" the bbclass translation
to the respective .dtb target did not occur and
make would fail saying it has no rule to make target
file.dts

This patch decouples the logic of having /dts/ in the
path from the target translation.

Signed-off-by: Paulo Neves <ptsneves@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/kernel-devicetree.bbclass

index 4f80cc62eb4a031a7ea676283ed0f75b4ff5c7e2..9866d844ab544e4f207a38370f01199c45874142 100644 (file)
@@ -13,8 +13,8 @@ normalize_dtb () {
        DTB="$1"
        if echo ${DTB} | grep -q '/dts/'; then
                bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
-               DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
        fi
+       DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
        echo "${DTB}"
 }