login
Header Space

 
 

Building Kernel Module

September 23, 2008 - 5:24pm
Submitted by rizzetti on September 23, 2008 - 5:24pm.
Linux

Hello,

I'm trying compile a external kernel module of a proprietary driver. The makefile build object files, but seems that where Building modules, stage 2 start the headers doesn't found. The output is something like that

....
LD [M] /Linux_PPC/EZpul_k26.o
Building modules, stage 2.
MODPOST 1 modules
WARNING: "__kmalloc" [/Linux_PPC/EZpul_k26.ko] undefined!
WARNING: "strlen" [/Linux_PPC/EZpul_k26.ko] undefined!
WARNING: "sprintf" [/Linux_PPC/EZpul_k26.ko] undefined!
WARNING: "jiffies" [/Linux_PPC/EZpul_k26.ko] undefined!
WARNING: "memset" [/Linux_PPC/EZpul_k26.ko] undefined!
WARNING: "printk" [/Linux_PPC/EZpul_k26.ko] undefined!
WARNING: "schedule_timeout" [/Linux_PPC/EZpul_k26.ko] undefined!
WARNING: "vsnprintf" [/Linux_PPC/EZpul_k26.ko] undefined!
WARNING: "kfree" [/Linux_PPC/EZpul_k26.ko] undefined!
WARNING: "memcpy" [/Linux_PPC/EZpul_k26.ko] undefined!
WARNING: "memmove" [/Linux_PPC/EZpul_k26.ko] undefined!
CC /Linux_PPC/EZpul_k26.mod.o
/Linux_PPC/EZpul_k26.mod.c:8: error: variable '__this_module' has initializer but incomplete type
...

The main Make invocation is like
$(MAKE) -C $(KDIR) M=$(PWD) BASEDIR=$(BASEDIR) CROSS_COMPILE=ppc_6xx- ARCH=powerpc

EXTRA_CFLAGS has a Include dirs for proprietary source code
CFLAGS has include for kernel source ($(KDIR)/include)

Where previous Variables are correctly set.

I searched about this, but can't found nothing helpfull.

Some Tip ?

Thanks a lot.

speck-geostationary