summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre McCurdy <armccurdy@gmail.com>2018-01-15 19:30:38 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-19 12:37:13 +0000
commitf2d7b5b2eea864daceaf68c0f6a1527f267064a2 (patch)
tree41b5d160fc4d298952eda69f2b943473f510c9c0
parent1b96585b92c6c772565e6695dcb4f4e4155c3a9a (diff)
downloadpoky-f2d7b5b2eea864daceaf68c0f6a1527f267064a2.tar.gz
kernel: drop unnecessary True options from calls to getVar
The older style calls (plus a bashism in kernel.bbclass, fixed separately) were introduced via the recent change to add support for multiple kernel packages: http://git.openembedded.org/openembedded-core/commit/?id=6c8c899849d101fd1b86aad0b8eed05c7c785924 (From OE-Core rev: e660ef68de3b3891a26ed6e10d96dc4efaf03ffc) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/kernel-module-split.bbclass6
-rw-r--r--meta/classes/kernel.bbclass12
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-rt_4.10.bb2
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb2
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb2
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb2
-rw-r--r--meta/recipes-kernel/linux/linux-yocto.inc2
7 files changed, 14 insertions, 14 deletions
diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass
index 73c7f18c78..67ab4161da 100644
--- a/meta/classes/kernel-module-split.bbclass
+++ b/meta/classes/kernel-module-split.bbclass
@@ -30,7 +30,7 @@ do_install_append() {
30 30
31PACKAGESPLITFUNCS_prepend = "split_kernel_module_packages " 31PACKAGESPLITFUNCS_prepend = "split_kernel_module_packages "
32 32
33KERNEL_MODULES_META_PACKAGE ?= "${@ d.getVar("KERNEL_PACKAGE_NAME", True) or "kernel" }-modules" 33KERNEL_MODULES_META_PACKAGE ?= "${@ d.getVar("KERNEL_PACKAGE_NAME") or "kernel" }-modules"
34 34
35KERNEL_MODULE_PACKAGE_PREFIX ?= "" 35KERNEL_MODULE_PACKAGE_PREFIX ?= ""
36KERNEL_MODULE_PACKAGE_SUFFIX ?= "-${KERNEL_VERSION}" 36KERNEL_MODULE_PACKAGE_SUFFIX ?= "-${KERNEL_VERSION}"
@@ -129,8 +129,8 @@ python split_kernel_module_packages () {
129 postfix = format.split('%s')[1] 129 postfix = format.split('%s')[1]
130 d.setVar('RPROVIDES_' + pkg, pkg.replace(postfix, '')) 130 d.setVar('RPROVIDES_' + pkg, pkg.replace(postfix, ''))
131 131
132 kernel_package_name = d.getVar("KERNEL_PACKAGE_NAME", True) or "kernel" 132 kernel_package_name = d.getVar("KERNEL_PACKAGE_NAME") or "kernel"
133 kernel_version = d.getVar("KERNEL_VERSION", True) 133 kernel_version = d.getVar("KERNEL_VERSION")
134 134
135 module_regex = '^(.*)\.k?o$' 135 module_regex = '^(.*)\.k?o$'
136 136
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 6f01d87004..1ecb840caf 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -1,9 +1,9 @@
1inherit linux-kernel-base kernel-module-split 1inherit linux-kernel-base kernel-module-split
2 2
3KERNEL_PACKAGE_NAME ??= "kernel" 3KERNEL_PACKAGE_NAME ??= "kernel"
4KERNEL_DEPLOYSUBDIR ??= "${@ "" if (d.getVar("KERNEL_PACKAGE_NAME", True) == "kernel") else d.getVar("KERNEL_PACKAGE_NAME", True) }" 4KERNEL_DEPLOYSUBDIR ??= "${@ "" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else d.getVar("KERNEL_PACKAGE_NAME") }"
5 5
6PROVIDES += "${@ "virtual/kernel" if (d.getVar("KERNEL_PACKAGE_NAME", True) == "kernel") else "" }" 6PROVIDES += "${@ "virtual/kernel" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else "" }"
7DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native lzop-native" 7DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native lzop-native"
8PACKAGE_WRITE_DEPS += "depmodwrapper-cross" 8PACKAGE_WRITE_DEPS += "depmodwrapper-cross"
9 9
@@ -37,8 +37,8 @@ KERNEL_VERSION_PKG_NAME = "${@legitimize_package_name(d.getVar('KERNEL_VERSION')
37KERNEL_VERSION_PKG_NAME[vardepvalue] = "${LINUX_VERSION}" 37KERNEL_VERSION_PKG_NAME[vardepvalue] = "${LINUX_VERSION}"
38 38
39python __anonymous () { 39python __anonymous () {
40 pn = d.getVar("PN", True) 40 pn = d.getVar("PN")
41 kpn = d.getVar("KERNEL_PACKAGE_NAME", True) 41 kpn = d.getVar("KERNEL_PACKAGE_NAME")
42 42
43 # XXX Remove this after bug 11905 is resolved 43 # XXX Remove this after bug 11905 is resolved
44 # FILES_${KERNEL_PACKAGE_NAME}-dev doesn't expand correctly 44 # FILES_${KERNEL_PACKAGE_NAME}-dev doesn't expand correctly
@@ -52,7 +52,7 @@ python __anonymous () {
52 # kernel recipes (I.e. where KERNEL_PACKAGE_NAME != kernel) so that they 52 # kernel recipes (I.e. where KERNEL_PACKAGE_NAME != kernel) so that they
53 # may build in parallel with the default kernel without clobbering. 53 # may build in parallel with the default kernel without clobbering.
54 if kpn != "kernel": 54 if kpn != "kernel":
55 workdir = d.getVar("WORKDIR", True) 55 workdir = d.getVar("WORKDIR")
56 sourceDir = os.path.join(workdir, 'kernel-source') 56 sourceDir = os.path.join(workdir, 'kernel-source')
57 artifactsDir = os.path.join(workdir, 'kernel-build-artifacts') 57 artifactsDir = os.path.join(workdir, 'kernel-build-artifacts')
58 d.setVar("STAGING_KERNEL_DIR", sourceDir) 58 d.setVar("STAGING_KERNEL_DIR", sourceDir)
@@ -62,7 +62,7 @@ python __anonymous () {
62 type = d.getVar('KERNEL_IMAGETYPE') or "" 62 type = d.getVar('KERNEL_IMAGETYPE') or ""
63 alttype = d.getVar('KERNEL_ALT_IMAGETYPE') or "" 63 alttype = d.getVar('KERNEL_ALT_IMAGETYPE') or ""
64 types = d.getVar('KERNEL_IMAGETYPES') or "" 64 types = d.getVar('KERNEL_IMAGETYPES') or ""
65 kname = d.getVar('KERNEL_PACKAGE_NAME', True) or "kernel" 65 kname = d.getVar('KERNEL_PACKAGE_NAME') or "kernel"
66 if type not in types.split(): 66 if type not in types.split():
67 types = (type + ' ' + types).strip() 67 types = (type + ' ' + types).strip()
68 if alttype not in types.split(): 68 if alttype not in types.split():
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_4.10.bb b/meta/recipes-kernel/linux/linux-yocto-rt_4.10.bb
index 40d6e4ac23..8938ab85b3 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_4.10.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_4.10.bb
@@ -7,7 +7,7 @@ require recipes-kernel/linux/linux-yocto.inc
7# to build multiple virtual/kernel providers, e.g. as dependency of 7# to build multiple virtual/kernel providers, e.g. as dependency of
8# core-image-rt-sdk, core-image-rt. 8# core-image-rt-sdk, core-image-rt.
9python () { 9python () {
10 if d.getVar("KERNEL_PACKAGE_NAME", True) == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt": 10 if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
11 raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") 11 raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
12} 12}
13 13
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb b/meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb
index ed65f77a91..a89c08d29d 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_4.12.bb
@@ -7,7 +7,7 @@ require recipes-kernel/linux/linux-yocto.inc
7# to build multiple virtual/kernel providers, e.g. as dependency of 7# to build multiple virtual/kernel providers, e.g. as dependency of
8# core-image-rt-sdk, core-image-rt. 8# core-image-rt-sdk, core-image-rt.
9python () { 9python () {
10 if d.getVar("KERNEL_PACKAGE_NAME", True) == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt": 10 if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
11 raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") 11 raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
12} 12}
13 13
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb b/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb
index e1547e9960..949d477fd8 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb
@@ -7,7 +7,7 @@ require recipes-kernel/linux/linux-yocto.inc
7# to build multiple virtual/kernel providers, e.g. as dependency of 7# to build multiple virtual/kernel providers, e.g. as dependency of
8# core-image-rt-sdk, core-image-rt. 8# core-image-rt-sdk, core-image-rt.
9python () { 9python () {
10 if d.getVar("KERNEL_PACKAGE_NAME", True) == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt": 10 if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
11 raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") 11 raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
12} 12}
13 13
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb b/meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb
index fa25629861..99931b333d 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_4.9.bb
@@ -7,7 +7,7 @@ require recipes-kernel/linux/linux-yocto.inc
7# to build multiple virtual/kernel providers, e.g. as dependency of 7# to build multiple virtual/kernel providers, e.g. as dependency of
8# core-image-rt-sdk, core-image-rt. 8# core-image-rt-sdk, core-image-rt.
9python () { 9python () {
10 if d.getVar("KERNEL_PACKAGE_NAME", True) == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt": 10 if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-yocto-rt":
11 raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") 11 raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
12} 12}
13 13
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc b/meta/recipes-kernel/linux/linux-yocto.inc
index 8a70eb5018..87c06745cc 100644
--- a/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/meta/recipes-kernel/linux/linux-yocto.inc
@@ -12,7 +12,7 @@ INC_PR = "r4"
12# PREFERRED_PROVIDER for virtual/kernel. This avoids network access required 12# PREFERRED_PROVIDER for virtual/kernel. This avoids network access required
13# by the use of AUTOREV SRCREVs, which are the default for this recipe. 13# by the use of AUTOREV SRCREVs, which are the default for this recipe.
14python () { 14python () {
15 if d.getVar("KERNEL_PACKAGE_NAME", True) == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel", True) != d.getVar("PN", True): 15 if d.getVar("KERNEL_PACKAGE_NAME") == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != d.getVar("PN"):
16 d.delVar("BB_DONT_CACHE") 16 d.delVar("BB_DONT_CACHE")
17 raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to %s to enable it" % (d.getVar("PN"))) 17 raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to %s to enable it" % (d.getVar("PN")))
18} 18}