Patchwork Patch for fixing build issues with external kernel modules.

login
register
mail settings
Submitter Franz Leitl
Date May 8, 2011, 10:30 p.m.
Message ID <201105090030.17354.leitl@fim.uni-passau.de>
Download mbox | patch
Permalink /patch/3417/
State New, archived
Headers show

Comments

Franz Leitl - May 8, 2011, 10:30 p.m.
Hi,

Hopefully this time the patch is "attached".

Regards
Franz

---
 meta/classes/kernel.bbclass |    2 +-
 meta/classes/module.bbclass |    9 ++++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

Patch

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 70a782f..9835130 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -149,7 +149,7 @@  kernel_do_install() {
        #
        oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean
        make -C $kerneldir _mrproper_scripts
-       find $kerneldir -path $kerneldir/scripts -prune -o -name "*.[csS]" -
exec rm '{}' \;
+       find $kerneldir -path $kerneldir/scripts -prune -o -name "*.[sS]" -
exec rm '{}' \;
        find $kerneldir/Documentation -name "*.txt" -exec rm '{}' \;
 
        # Remove the following binaries which cause strip errors
diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass
index 572df0d..e5b705a 100644
--- a/meta/classes/module.bbclass
+++ b/meta/classes/module.bbclass
@@ -11,13 +11,18 @@  inherit module-base
 do_make_scripts() {
        unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS 
        oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \
-                  -C ${STAGING_KERNEL_DIR} scripts
+               -C ${STAGING_KERNEL_DIR} scripts
+        oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \
+                -C ${STAGING_KERNEL_DIR} prepare
 }
 
 module_do_compile() {
+
+
        do_make_scripts
        unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
        oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR}   \
+                   KERNELDIR=${STAGING_KERNEL_DIR}  \
                   KERNEL_SRC=${STAGING_KERNEL_DIR}    \
                   KERNEL_VERSION=${KERNEL_VERSION}    \
                   CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
@@ -28,6 +33,8 @@  module_do_compile() {
 module_do_install() {
        unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
        oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" \
+                   KERNEL_PATH=${STAGING_KERNEL_DIR}   \
+                   KERNELDIR=${STAGING_KERNEL_DIR}  \
                   KERNEL_SRC=${STAGING_KERNEL_DIR} \
                   CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
                   modules_install