summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRicardo Neri <ricardo.neri-calderon@linux.intel.com>2016-06-24 16:42:28 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-01 16:22:45 +0100
commit3e74ef223c487a4a8c6ab2d8392e9dfd7584b6ca (patch)
tree276139f84bfe53801d3913630d166d7184f9fc37
parentfff33f1c22c1b9276541273f27b651d755e3a42b (diff)
downloadpoky-3e74ef223c487a4a8c6ab2d8392e9dfd7584b6ca.tar.gz
kernel-module-split.bbclass: add a prefix for module package name pattern
When splitting kernel modules into individual packages, such packages take their names from the module name. This is OK under most of the circumstances. However, it may lead to package naming collisions if there exists two modules with the same name. Situations like this can occur when building testing modules. For instance, there exists testing versions of the modules for non-volatile memory that are built with different linker options but bear the same module name. If one wants to package such modules, it is be good to be able to name packages differently. This can be done by prefixing the package name with a KERNEL_MODULE_PACKAGE_PREFIX that can be set by the recipes that inherit from module.bbclass. Cc: Megha Dey <megha.dey@intel.com> (From OE-Core rev: 4f941e8c5ee8e95291c3beff0a2798aa13f8dfc8) Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.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
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass
index e1a70e6215..ed42d2b19d 100644
--- a/meta/classes/kernel-module-split.bbclass
+++ b/meta/classes/kernel-module-split.bbclass
@@ -30,6 +30,8 @@ PACKAGESPLITFUNCS_prepend = "split_kernel_module_packages "
30 30
31KERNEL_MODULES_META_PACKAGE ?= "kernel-modules" 31KERNEL_MODULES_META_PACKAGE ?= "kernel-modules"
32 32
33KERNEL_MODULE_PACKAGE_PREFIX ?= ""
34
33python split_kernel_module_packages () { 35python split_kernel_module_packages () {
34 import re 36 import re
35 37
@@ -181,7 +183,9 @@ python split_kernel_module_packages () {
181 183
182 module_deps = parse_depmod() 184 module_deps = parse_depmod()
183 module_regex = '^(.*)\.k?o$' 185 module_regex = '^(.*)\.k?o$'
184 module_pattern = 'kernel-module-%s' 186
187 module_pattern_prefix = d.getVar('KERNEL_MODULE_PACKAGE_PREFIX', True)
188 module_pattern = module_pattern_prefix + 'kernel-module-%s'
185 189
186 postinst = d.getVar('pkg_postinst_modules', True) 190 postinst = d.getVar('pkg_postinst_modules', True)
187 postrm = d.getVar('pkg_postrm_modules', True) 191 postrm = d.getVar('pkg_postrm_modules', True)