summaryrefslogtreecommitdiffstats
path: root/meta/classes/module-base.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/module-base.bbclass')
-rw-r--r--meta/classes/module-base.bbclass23
1 files changed, 23 insertions, 0 deletions
diff --git a/meta/classes/module-base.bbclass b/meta/classes/module-base.bbclass
new file mode 100644
index 0000000000..9dbb4b424b
--- /dev/null
+++ b/meta/classes/module-base.bbclass
@@ -0,0 +1,23 @@
1inherit module_strip
2
3inherit kernel-arch
4
5export OS = "${TARGET_OS}"
6export CROSS_COMPILE = "${TARGET_PREFIX}"
7
8export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}"
9KERNEL_OBJECT_SUFFIX = ".ko"
10
11# kernel modules are generally machine specific
12PACKAGE_ARCH = "${MACHINE_ARCH}"
13
14#
15# Ensure the hostprogs are available for module compilation. Modules that
16# inherit this recipe and override do_compile() should be sure to call
17# do_make_scripts() or ensure the scripts are built independently.
18#
19do_make_scripts() {
20 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
21 make CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \
22 -C ${STAGING_KERNEL_DIR} scripts
23}