summaryrefslogtreecommitdiff
path: root/classes/module.oeclass
diff options
context:
space:
mode:
authorMichael Lauer <mickey@vanille-media.de>2004-08-05 10:54:23 +0000
committerMichael Lauer <mickey@vanille-media.de>2004-08-05 10:54:23 +0000
commit3bf09930d865d4056e4577b75aff0a9032065dbf (patch)
tree44df367b210f05212187b905b65aa42f54f31b9e /classes/module.oeclass
parent63479cadd8521e43880b8d32288e1b4854f378f5 (diff)
use kernel-abiversion instead of kernel-version for external modules
BKrev: 411211df_5OfetKywF391rJssADBIQ
Diffstat (limited to 'classes/module.oeclass')
-rw-r--r--classes/module.oeclass32
1 files changed, 32 insertions, 0 deletions
diff --git a/classes/module.oeclass b/classes/module.oeclass
index e69de29bb2..68291b2918 100644
--- a/classes/module.oeclass
+++ b/classes/module.oeclass
@@ -0,0 +1,32 @@
+RDEPENDS_append = " kernel (${KERNEL_VERSION})"
+DEPENDS_append = " virtual/kernel"
+
+export ARCH = "${TARGET_ARCH}"
+export OS = "${TARGET_OS}"
+export CROSS_COMPILE = "${TARGET_PREFIX}"
+
+
+export KERNEL_VERSION = ${@base_read_file('${STAGING_DIR}/${HOST_SYS}/kernel/kernel-abiversion')}
+export KERNEL_SOURCE = ${@base_read_file('${STAGING_DIR}/${HOST_SYS}/kernel/kernel-source')}
+KERNEL_CCSUFFIX = ${@base_read_file('${STAGING_DIR}/${HOST_SYS}/kernel/kernel-ccsuffix')}
+KERNEL_LDSUFFIX = ${@base_read_file('${STAGING_DIR}/${HOST_SYS}/kernel/kernel-ldsuffix')}
+KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX}"
+KERNEL_LD = "${LD}${KERNEL_LDSUFFIX}"
+
+module_do_compile() {
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+ oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
+ KERNEL_SRC=${STAGING_KERNEL_DIR} \
+ KERNEL_VERSION=${KERNEL_VERSION} \
+ CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
+ ${MAKE_TARGETS}
+}
+
+module_do_install() {
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+ oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" CC="${KERNEL_CC}" LD="${KERNEL_LD}" modules_install
+}
+
+EXPORT_FUNCTIONS do_compile do_install
+
+FILES_${PN} = "/etc /lib/modules"