summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2023-05-26 18:36:14 -0500
committerSteve Sakoman <steve@sakoman.com>2023-05-30 04:06:12 -1000
commitb7d6fc07462e6fca09d0db7f43a62920250ef053 (patch)
treedb4b4810542dbc2c50a263e80f914fdeb605981f
parent77d6118e20751f68ad7104edec8f14dbb5ba6ec1 (diff)
downloadopenembedded-core-b7d6fc07462e6fca09d0db7f43a62920250ef053.tar.gz
kernel-devicetree: make shell scripts posix compliant
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> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/classes/kernel-devicetree.bbclass4
-rw-r--r--meta/classes/kernel.bbclass2
2 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/kernel-devicetree.bbclass b/meta/classes/kernel-devicetree.bbclass
index 11b57adc92..e1e67cbc56 100644
--- a/meta/classes/kernel-devicetree.bbclass
+++ b/meta/classes/kernel-devicetree.bbclass
@@ -76,7 +76,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
@@ -91,7 +91,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
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 87dd46e6fa..3d5422b09e 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -211,7 +211,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