summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/module.bbclass19
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 @@
1RDEPENDS_${PN} += "kernel-image"
2DEPENDS += "virtual/kernel" 1DEPENDS += "virtual/kernel"
3 2
4inherit module-base 3inherit module-base
@@ -25,7 +24,7 @@ module_do_install() {
25 modules_install 24 modules_install
26} 25}
27 26
28pkg_postinst_${PN}_append () { 27module_pkg_postinst () {
29if [ -z "$D" ]; then 28if [ -z "$D" ]; then
30 depmod -a ${KERNEL_VERSION} 29 depmod -a ${KERNEL_VERSION}
31else 30else
@@ -33,7 +32,7 @@ else
33fi 32fi
34} 33}
35 34
36pkg_postrm_${PN}_append () { 35module_pkg_postrm () {
37if [ -z "$D" ]; then 36if [ -z "$D" ]; then
38 depmod -a ${KERNEL_VERSION} 37 depmod -a ${KERNEL_VERSION}
39else 38else
@@ -43,4 +42,16 @@ fi
43 42
44EXPORT_FUNCTIONS do_compile do_install 43EXPORT_FUNCTIONS do_compile do_install
45 44
46FILES_${PN} = "/etc /lib/modules" 45MODULE_PACKAGES ?= "${PN}"
46
47python __anonymous() {
48 for package in d.getVar("MODULE_PACKAGES", True).split():
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