summaryrefslogtreecommitdiffstats
path: root/meta/classes/module.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/module.bbclass')
-rw-r--r--meta/classes/module.bbclass35
1 files changed, 5 insertions, 30 deletions
diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass
index 2c1888c8d2..ad6f7af1bb 100644
--- a/meta/classes/module.bbclass
+++ b/meta/classes/module.bbclass
@@ -1,6 +1,6 @@
1DEPENDS += "virtual/kernel" 1DEPENDS += "virtual/kernel"
2 2
3inherit module-base 3inherit module-base kernel-module-split
4 4
5addtask make_scripts after do_patch before do_compile 5addtask make_scripts after do_patch before do_compile
6do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock" 6do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
@@ -24,34 +24,9 @@ module_do_install() {
24 modules_install 24 modules_install
25} 25}
26 26
27module_pkg_postinst () {
28if [ -z "$D" ]; then
29 depmod -a ${KERNEL_VERSION}
30else
31 depmodwrapper -a -b $D ${KERNEL_VERSION}
32fi
33}
34
35module_pkg_postrm () {
36if [ -z "$D" ]; then
37 depmod -a ${KERNEL_VERSION}
38else
39 depmodwrapper -a -b $D ${KERNEL_VERSION}
40fi
41}
42
43EXPORT_FUNCTIONS do_compile do_install 27EXPORT_FUNCTIONS do_compile do_install
44 28
45MODULE_PACKAGES ?= "${PN}" 29# add all splitted modules to PN RDEPENDS, PN can be empty now
46 30KERNEL_MODULES_META_PACKAGE = "${PN}"
47python __anonymous() { 31FILES_${PN} = ""
48 for package in d.getVar("MODULE_PACKAGES", True).split(): 32ALLOW_EMPTY_${PN} = "1"
49 d.appendVar("RDEPENDS_%s" % package, " kernel-image")
50 files = d.getVar("MODULE_FILES_%s" % package, True) or "/etc /lib/modules"
51 d.appendVar("FILES_%s" % package, " " + files)
52 d.appendVar('pkg_postinst_%s' % package, " " + d.getVar('module_pkg_postinst', True))
53 d.appendVar('pkg_postrm_%s' % package, " " + d.getVar('module_pkg_postrm', True))
54 if not package in d.getVar("PACKAGES", True):
55 d.prependVar("PACKAGES", package + " ")
56}
57