]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
kernel-devicetree: make shell scripts posix compliant
authorMartin Jansa <Martin.Jansa@gmail.com>
Fri, 12 May 2023 17:22:20 +0000 (12:22 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 22 May 2023 09:53:44 +0000 (10:53 +0100)
Use the notation suggested by Martin Jansa to avoid a bashism. Also
switch KERNEL_DTBVENDORED to the more common 0/1 notation instead of
true/false.

Fixes: 04ab57d200 (kernel-devicetree: allow specification of dtb
directory, 2023-05-02)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Randolph Sapp <rs@ti.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
meta/classes-recipe/kernel-devicetree.bbclass
meta/classes-recipe/kernel.bbclass

index a6c6c5f227e1a9c715726721c0410f4365b57331..831fdd1527bb75d1a7ed8c65f8159bf14821c0b2 100644 (file)
@@ -82,7 +82,7 @@ do_install:append() {
        for dtbf in ${KERNEL_DEVICETREE}; do
                dtb=`normalize_dtb "$dtbf"`
                dtb_path=`get_real_dtb_path_in_kernel "$dtb"`
-               if [ ${KERNEL_DTBVENDORED} == "false" ]; then
+               if "${@'false' if oe.types.boolean(d.getVar('KERNEL_DTBVENDORED')) else 'true'}"; then
                        dtb_ext=${dtb##*.}
                        dtb_base_name=`basename $dtb .$dtb_ext`
                        dtb=$dtb_base_name.$dtb_ext
@@ -97,7 +97,7 @@ do_deploy:append() {
                dtb_ext=${dtb##*.}
                dtb_base_name=`basename $dtb .$dtb_ext`
                install -d $deployDir
-               if [ ${KERNEL_DTBVENDORED} == "false" ]; then
+               if "${@'false' if oe.types.boolean(d.getVar('KERNEL_DTBVENDORED')) else 'true'}"; then
                        dtb=$dtb_base_name.$dtb_ext
                fi
                install -m 0644 ${D}/${KERNEL_DTBDEST}/$dtb $deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext
index 8f022b234d57830a5b3c9ab24cfb68af5444b6c9..4bce64cf6ae50a78e87084be3ed36349082f47bd 100644 (file)
@@ -216,7 +216,7 @@ KERNEL_RELEASE ?= "${KERNEL_VERSION}"
 KERNEL_OUTPUT_DIR ?= "arch/${ARCH}/boot"
 KERNEL_IMAGEDEST ?= "boot"
 KERNEL_DTBDEST ?= "${KERNEL_IMAGEDEST}"
-KERNEL_DTBVENDORED ?= "false"
+KERNEL_DTBVENDORED ?= "0"
 
 #
 # configuration