]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
linux-yocto: Fix COMPATIBLE_MACHINE regex match
authorAndrei Gherzan <andrei.gherzan@huawei.com>
Thu, 25 Aug 2022 17:59:15 +0000 (19:59 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 30 Aug 2022 09:28:26 +0000 (10:28 +0100)
With the current regex expression, a machine that is not part of the
compatible could match the regex expression.

For example, consider the following COMPATIBLE_MACHINE:

COMPATIBLE_MACHINE = "qemuarm|qemuarm64"

A machine definition bringing in "qemuarm-foo" would match against the
COMPATIBLE_MACHINE pattern above (see base.bbclass for implementation
details).

Fix this by matching the start and the end of the string.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
meta/recipes-kernel/linux/linux-yocto-dev.bb
meta/recipes-kernel/linux/linux-yocto-rt_5.15.bb
meta/recipes-kernel/linux/linux-yocto-rt_5.19.bb
meta/recipes-kernel/linux/linux-yocto-tiny_5.15.bb
meta/recipes-kernel/linux/linux-yocto-tiny_5.19.bb
meta/recipes-kernel/linux/linux-yocto_5.15.bb
meta/recipes-kernel/linux/linux-yocto_5.19.bb

index 5a420b7fb218252c99fedea03eba06ad7fdd8f78..b1b57beac3e0b40d65624fd4145ad4a01a757890 100644 (file)
@@ -50,7 +50,7 @@ PACKAGECONFIG[dt-validation] = ",,python3-dtschema-native"
 # we need the wrappers if validation isn't in the packageconfig
 DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'dt-validation', '', 'python3-dtschema-wrapper-native', d)}"
 
-COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64|qemuriscv32|qemuriscv64)"
+COMPATIBLE_MACHINE = "^(qemuarm|qemux86|qemuppc|qemumips|qemumips64|qemux86-64|qemuriscv32|qemuriscv64)$"
 
 KERNEL_DEVICETREE:qemuarmv5 = "versatile-pb.dtb"
 
index f374fb593fbfe0bfe2df3056375ca926ca300238..9e37494a4be16e84c5ffe47d6fb1e50ce11b9661 100644 (file)
@@ -31,7 +31,7 @@ KCONF_BSP_AUDIT_LEVEL = "1"
 
 LINUX_KERNEL_TYPE = "preempt-rt"
 
-COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuarmv5|qemuarm64|qemuppc|qemumips)"
+COMPATIBLE_MACHINE = "^(qemux86|qemux86-64|qemuarm|qemuarmv5|qemuarm64|qemuppc|qemumips)$"
 
 KERNEL_DEVICETREE:qemuarmv5 = "versatile-pb.dtb"
 
index 60ca638bdd616da13c8d3affd5668c5ff6380861..c12bec3e4e9c6147ffce0a3e7fefabfd05c399da 100644 (file)
@@ -31,7 +31,7 @@ KCONF_BSP_AUDIT_LEVEL = "1"
 
 LINUX_KERNEL_TYPE = "preempt-rt"
 
-COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuarmv5|qemuarm64|qemuppc|qemumips)"
+COMPATIBLE_MACHINE = "^(qemux86|qemux86-64|qemuarm|qemuarmv5|qemuarm64|qemuppc|qemumips)$"
 
 KERNEL_DEVICETREE:qemuarmv5 = "versatile-pb.dtb"
 
index f1b6f98c7741f79e3c27ac857201ab8752e7d062..2de32ffecd89bc1a01ed0e325dbc5ac6dd94b0cc 100644 (file)
@@ -22,7 +22,7 @@ PV = "${LINUX_VERSION}+git${SRCPV}"
 SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.15;destsuffix=${KMETA}"
 
-COMPATIBLE_MACHINE = "qemux86|qemux86-64|qemuarm64|qemuarm|qemuarmv5"
+COMPATIBLE_MACHINE = "^(qemux86|qemux86-64|qemuarm64|qemuarm|qemuarmv5)$"
 
 # Functionality flags
 KERNEL_FEATURES = ""
index c1638f5cc2db9b1721f275ee08f1f7f5721133b1..339f7f69a64db4667e31ea722beef138a9d9b894 100644 (file)
@@ -22,7 +22,7 @@ PV = "${LINUX_VERSION}+git${SRCPV}"
 SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.19;destsuffix=${KMETA}"
 
-COMPATIBLE_MACHINE = "qemux86|qemux86-64|qemuarm64|qemuarm|qemuarmv5"
+COMPATIBLE_MACHINE = "^(qemux86|qemux86-64|qemuarm64|qemuarm|qemuarmv5)$"
 
 # Functionality flags
 KERNEL_FEATURES = ""
index 26cdfb744a8af9d0a8b19e91c979538178424347..40c430aee341951514ff2c3fc9cc5ce3e759fd04 100644 (file)
@@ -51,7 +51,7 @@ KCONF_BSP_AUDIT_LEVEL = "1"
 
 KERNEL_DEVICETREE:qemuarmv5 = "versatile-pb.dtb"
 
-COMPATIBLE_MACHINE = "qemuarm|qemuarmv5|qemuarm64|qemux86|qemuppc|qemuppc64|qemumips|qemumips64|qemux86-64|qemuriscv64|qemuriscv32"
+COMPATIBLE_MACHINE = "^(qemuarm|qemuarmv5|qemuarm64|qemux86|qemuppc|qemuppc64|qemumips|qemumips64|qemux86-64|qemuriscv64|qemuriscv32)$"
 
 # Functionality flags
 KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
index 15c5aca8dacdf96eacd5eb113010f73c61af4187..0ff28aa952f255a40a0f7fbbf9687834f0fed8c5 100644 (file)
@@ -51,7 +51,7 @@ KCONF_BSP_AUDIT_LEVEL = "1"
 
 KERNEL_DEVICETREE:qemuarmv5 = "versatile-pb.dtb"
 
-COMPATIBLE_MACHINE = "qemuarm|qemuarmv5|qemuarm64|qemux86|qemuppc|qemuppc64|qemumips|qemumips64|qemux86-64|qemuriscv64|qemuriscv32"
+COMPATIBLE_MACHINE = "^(qemuarm|qemuarmv5|qemuarm64|qemux86|qemuppc|qemuppc64|qemumips|qemumips64|qemux86-64|qemuriscv64|qemuriscv32)$"
 
 # Functionality flags
 KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"