Kernel Module building problem

Murray Atkinson <[email protected]>
Newsgroups gmane.linux.suse.sparc
Organization Catapult Communications
Message-ID <[email protected]>
Hi,

we are trying to build a kernel module for a PCI card that we use in a Sparc 
Ultra10 under Solaris.

Is there any documentation or examples about building kernel modules for SuSE 
Sparc 7.3 ?

We've been using "Linux Device Drivers" from O'Reilly and have been able to 
develop a module under SuSE 7.3 on a PC, and are having problems building 
this module on a Sparc Ultra 10 platform.

When we compile our source code, we get the following error:

In file included from /lib/modules/2.4.14/build/include/asm/processor.h:23,
                 from /lib/modules/2.4.14/build/include/linux/prefetch.h:13,
                 from /lib/modules/2.4.14/build/include/linux/list.h:6,
                 from /lib/modules/2.4.14/build/include/linux/module.h:12,
                 from base_drv.c:2:
/lib/modules/2.4.14/build/include/asm/page.h:101: global register variable 
follows a function definition
/lib/modules/2.4.14/build/include/asm/page.h:101: warning: call-clobbered 
register used for global register variable
make: *** [base_drv.o] Error 1

Does anyone know if we are we missing some sort of configuration option ?

Any help would be greatly appreciated.

Regards,

Murray Atkinson.

Our Makefile includes this:

CC = /usr/bin/sparc64-linux-gcc -v

CFLAGS = -DBASE_DRV_DEBUG -DKERNEL -D__KERNEL__ -DMODULE \
         -I$(KERNELINC) -O -Wall

KERNELINC = /lib/modules/`uname -r`/build/include

Our /lib/modules/2.4.14/build points to /usr/src/linux-2.4.14.SuSE/
Our /lib/modules/2.4.14/build/include/linux/version.h contains
#define UTS_RELEASE "2.4.14"
#define LINUX_VERSION_CODE 132110
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.