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.bbclass32
1 files changed, 32 insertions, 0 deletions
diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass
new file mode 100644
index 0000000..ad6f7af
--- /dev/null
+++ b/meta/classes/module.bbclass
@@ -0,0 +1,32 @@
1DEPENDS += "virtual/kernel"
2
3inherit module-base kernel-module-split
4
5addtask make_scripts after do_patch before do_compile
6do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
7do_make_scripts[deptask] = "do_populate_sysroot"
8
9module_do_compile() {
10 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
11 oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
12 KERNEL_SRC=${STAGING_KERNEL_DIR} \
13 KERNEL_VERSION=${KERNEL_VERSION} \
14 CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
15 AR="${KERNEL_AR}" \
16 ${MAKE_TARGETS}
17}
18
19module_do_install() {
20 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
21 oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" \
22 KERNEL_SRC=${STAGING_KERNEL_DIR} \
23 CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
24 modules_install
25}
26
27EXPORT_FUNCTIONS do_compile do_install
28
29# add all splitted modules to PN RDEPENDS, PN can be empty now
30KERNEL_MODULES_META_PACKAGE = "${PN}"
31FILES_${PN} = ""
32ALLOW_EMPTY_${PN} = "1"