diff options
Diffstat (limited to 'meta/classes/module-base.bbclass')
-rw-r--r-- | meta/classes/module-base.bbclass | 23 |
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 @@ | |||
1 | inherit module_strip | ||
2 | |||
3 | inherit kernel-arch | ||
4 | |||
5 | export OS = "${TARGET_OS}" | ||
6 | export CROSS_COMPILE = "${TARGET_PREFIX}" | ||
7 | |||
8 | export KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}" | ||
9 | KERNEL_OBJECT_SUFFIX = ".ko" | ||
10 | |||
11 | # kernel modules are generally machine specific | ||
12 | PACKAGE_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 | # | ||
19 | do_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 | } | ||