diff options
author | Saul Wold <sgw@linux.intel.com> | 2013-01-30 15:05:49 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-01 15:51:32 +0000 |
commit | 977aee43868499ab87a098f3798e90d6978836b9 (patch) | |
tree | 918f3228842f70db8236fdcf6fe6cbb7bf1b5bf8 /meta/classes | |
parent | 775621d65b5b72169913c817ed9de7973b2d5dcf (diff) | |
download | openembedded-core-977aee43868499ab87a098f3798e90d6978836b9.tar.gz openembedded-core-977aee43868499ab87a098f3798e90d6978836b9.tar.bz2 openembedded-core-977aee43868499ab87a098f3798e90d6978836b9.zip |
module.bbclass: Allow for modules to be packaged seperate from ${PN}
This patch will allow recipes that provide kernel modules to package
the module or modules in specific packages. That list is contained in
MODULE_PACKAGES, this defaults to to preserve the current behavior.
The package can also define MODULE_FILES to specify files.
[YOCTO #3803]
(From OE-Core rev: c1ff0467bf03a3342846f0d9dde74e34b740798f)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/module.bbclass | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass index c933d3226d..e2174a16fd 100644 --- a/meta/classes/module.bbclass +++ b/meta/classes/module.bbclass @@ -1,4 +1,3 @@ -RDEPENDS_${PN} += "kernel-image" DEPENDS += "virtual/kernel" inherit module-base @@ -25,7 +24,7 @@ module_do_install() { modules_install } -pkg_postinst_${PN}_append () { +module_pkg_postinst () { if [ -z "$D" ]; then depmod -a ${KERNEL_VERSION} else @@ -33,7 +32,7 @@ else fi } -pkg_postrm_${PN}_append () { +module_pkg_postrm () { if [ -z "$D" ]; then depmod -a ${KERNEL_VERSION} else @@ -43,4 +42,16 @@ fi EXPORT_FUNCTIONS do_compile do_install -FILES_${PN} = "/etc /lib/modules" +MODULE_PACKAGES ?= "${PN}" + +python __anonymous() { + for package in d.getVar("MODULE_PACKAGES", True).split(): + d.appendVar("RDEPENDS_%s" % package, " kernel-image") + files = d.getVar("MODULE_FILES_%s" % package, True) or "/etc /lib/modules" + d.appendVar("FILES_%s" % package, " " + files) + d.appendVar('pkg_postinst_%s' % package, " " + d.getVar('module_pkg_postinst', True)) + d.appendVar('pkg_postrm_%s' % package, " " + d.getVar('module_pkg_postrm', True)) + if not package in d.getVar("PACKAGES", True): + d.prependVar("PACKAGES", package + " ") +} + |