Hi all,

I'm trying to compile a Hello World loadable kernel module for 2.6,
but am failing at the MODPOST stage.  The ultimate end is to get an
Edge Port Module LKM working for the MCF5275, but that's somewhat
irrelevant right now.

>From the make output, it would appear that MODPOST can't find the
symtab.  There's a pile of other warnings, and I'm not sure if they
are related or not.  I have enabled the loadable module support in the
kernel options, and am using the m68k-uclinux-tools-20061214
toolchain.  The hello world module and Makefile is taken straight from
a tutorial.

I'm really not sure what the symtab is or how I can fix the fact that
it's not found.  Can someone help me out?  I've included the make
output, the modTest.c, and the Makefile at the end of this email

Thanks!
-David

[EMAIL PROTECTED]:~/uCLinux/uClinux-dist/user/modTest$ make
make -C /home/rr/uCLinux/uClinux-dist/linux-2.6.x/ M=`pwd`
make[1]: Entering directory `/home/rr/uCLinux/uClinux-dist/linux-2.6.x'
 LD      /home/rr/uCLinux/uClinux-dist/user/modTest/built-in.o
 CC [M]  /home/rr/uCLinux/uClinux-dist/user/modTest/modTest.o
In file included from include/linux/cache.h:4,
                from include/linux/time.h:7,
                from include/linux/stat.h:60,
                from include/linux/module.h:10,
                from /home/rr/uCLinux/uClinux-dist/user/modTest/modTest.c:1:
include/linux/kernel.h:149: warning: conflicting types for built-in
function 'snprintf'
include/linux/kernel.h:151: warning: conflicting types for built-in
function 'vsnprintf'
In file included from include/linux/string.h:19,
                from include/linux/bitmap.h:8,
                from include/linux/nodemask.h:85,
                from include/linux/mmzone.h:16,
                from include/linux/gfp.h:4,
                from include/linux/slab.h:14,
                from include/linux/percpu.h:5,
                from include/asm-generic/local.h:4,
                from include/asm/local.h:4,
                from include/linux/module.h:19,
                from /home/rr/uCLinux/uClinux-dist/user/modTest/modTest.c:1:
include/asm/string.h:24: warning: conflicting types for built-in
function 'strncpy'
include/asm/string.h:92: warning: conflicting types for built-in
function 'memset'
include/asm/string.h:95: warning: conflicting types for built-in
function 'memcpy'
In file included from include/linux/bitmap.h:8,
                from include/linux/nodemask.h:85,
                from include/linux/mmzone.h:16,
                from include/linux/gfp.h:4,
                from include/linux/slab.h:14,
                from include/linux/percpu.h:5,
                from include/asm-generic/local.h:4,
                from include/asm/local.h:4,
                from include/linux/module.h:19,
                from /home/rr/uCLinux/uClinux-dist/user/modTest/modTest.c:1:
include/linux/string.h:34: warning: conflicting types for built-in
function 'strncat'
include/linux/string.h:43: warning: conflicting types for built-in
function 'strncmp'
include/linux/string.h:52: warning: conflicting types for built-in
function 'strncasecmp'
include/linux/string.h:68: warning: conflicting types for built-in
function 'strlen'
include/linux/string.h:80: warning: conflicting types for built-in
function 'strspn'
include/linux/string.h:83: warning: conflicting types for built-in
function 'strcspn'
include/linux/string.h:93: warning: conflicting types for built-in
function 'memmove'
include/linux/string.h:99: warning: conflicting types for built-in
function 'memcmp'
 Building modules, stage 2.
 MODPOST 1 modules
WARNING: vmlinux: 'strcat' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strcmp' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strncmp' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strchr' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strrchr' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strlen' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strnlen' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'memmove' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'memcmp' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'memscan' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strstr' exported twice. Previous export was in vmlinux
FATAL: /home/rr/uCLinux/uClinux-dist/user/modTest/modTest.o has no symtab?
make[2]: [__modpost] Error 1 (ignored)
 CC      /home/rr/uCLinux/uClinux-dist/user/modTest/modTest.mod.o
gcc: /home/rr/uCLinux/uClinux-dist/user/modTest/modTest.mod.c: No such
file or directory
gcc: no input files
make[2]: *** [/home/rr/uCLinux/uClinux-dist/user/modTest/modTest.mod.o] Error 1
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/home/rr/uCLinux/uClinux-dist/linux-2.6.x'
make: *** [default] Error 2

-------------------------------
I've taken the hello world module straight from a tutorial:

#include <linux/module.h>

int init_module()
{
        printk("Hello...\n");
        return 0;
}

void cleanup_module()
{
        printk("World...\n");
}

----------------------------------------
And am using this Makefile:

obj-m:=modTest.o
default:
        make -C /home/rr/uCLinux/uClinux-dist/linux-2.6.x/ M=`pwd`
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to