diff options
author | Ricardo Neri <ricardo.neri-calderon@linux.intel.com> | 2016-06-24 16:42:28 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-07-01 16:08:47 +0100 |
commit | 4f941e8c5ee8e95291c3beff0a2798aa13f8dfc8 (patch) | |
tree | 2a395810b9b4d08a1dc1bbd73d7c4656b35fa27f /meta/classes | |
parent | f6f531e7795dceefa8a42246cb9ed4efbffca2dd (diff) | |
download | openembedded-core-4f941e8c5ee8e95291c3beff0a2798aa13f8dfc8.tar.gz openembedded-core-4f941e8c5ee8e95291c3beff0a2798aa13f8dfc8.tar.bz2 openembedded-core-4f941e8c5ee8e95291c3beff0a2798aa13f8dfc8.zip |
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>
Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/kernel-module-split.bbclass | 6 |
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 " KERNEL_MODULES_META_PACKAGE ?= "kernel-modules" +KERNEL_MODULE_PACKAGE_PREFIX ?= "" + python split_kernel_module_packages () { import re @@ -181,7 +183,9 @@ python split_kernel_module_packages () { module_deps = parse_depmod() module_regex = '^(.*)\.k?o$' - module_pattern = 'kernel-module-%s' + + module_pattern_prefix = d.getVar('KERNEL_MODULE_PACKAGE_PREFIX', True) + module_pattern = module_pattern_prefix + 'kernel-module-%s' postinst = d.getVar('pkg_postinst_modules', True) postrm = d.getVar('pkg_postrm_modules', True) |