summaryrefslogtreecommitdiffstats
path: root/meta/classes/module-base.bbclass
diff options
context:
space:
mode:
authorAdrian Dudau <adrian.dudau@enea.com>2013-12-12 13:38:32 +0100
committerAdrian Dudau <adrian.dudau@enea.com>2013-12-12 13:50:20 +0100
commite2e6f6fe07049f33cb6348780fa975162752e421 (patch)
treeb1813295411235d1297a0ed642b1346b24fdfb12 /meta/classes/module-base.bbclass
downloadpoky-e2e6f6fe07049f33cb6348780fa975162752e421.tar.gz
initial commit of Enea Linux 3.1
Migrated from the internal git server on the dora-enea branch Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
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}