RE: Building Kernels and Kernel modules

Kevin Curtis <[email protected]>
Newsgroups gmane.linux.aurora.devel
Message-ID <[email protected]>
Hi,
	At last I have got a Kernel to build (2.4.21.-pre7).  Now when I try
to build our X.25 module I get the following error:

cd ~/develop/ia64x25/src/kernel/
make 
gcc -m64 -Wall -Wstrict-prototypes -DMODULE -D__KERNEL__ -DLINUX -DFSK_HP2FS
-DCONFIG_X25_MODULE -DFSC_DEBUG=0 -O2	  -I/lib/modules/`uname
-r`/build/include -I/usr/src/linux/include -I../lib   -c -o fsx25main.o
fsx25main.c
In file included from
/lib/modules/2.4.21-pre7/build/include/asm/processor.h:23,
                 from
/lib/modules/2.4.21-pre7/build/include/linux/prefetch.h:13,
                 from /lib/modules/2.4.21-pre7/build/include/linux/list.h:6,
                 from
/lib/modules/2.4.21-pre7/build/include/linux/module.h:12,
                 from fsx25main.c:70:
/lib/modules/2.4.21-pre7/build/include/asm/page.h:111: global register
variable follows a function definition
/lib/modules/2.4.21-pre7/build/include/asm/page.h:111: warning:
call-clobbered register used for global register variable
make: *** [fsx25main.o] Error 1

Compilation exited abnormally with code 2 at Tue Apr 29 09:49:39

Is there a compile switch that I should have used, or one that I have used
that I shouldn't?

I have seem similar reports on Google of this error with the Tulip driver,
but noone has posted a reply.

I still have the logical link of gcc to kgcc.


You said that if I downloaded the Kernel from the Aurora tree, the gcc/kgcc
probelm would be sorted without me having to make the link.  How exactly is
this done?  When I applied the 21-pre7 patch, why didn't the Makefile get
updated to set the Kernel version accordingly?  I'm still not 100% convinced
I am doing the right thing.


This is what I did:

1) downloaded kernel-2.4.20-3.1sparc.src.rpm from 
   ftp://ftp.auroralinux.org/pub/aurora/scratch/kernel-04092003/

2) RPM'd it

3) unpacked the linux-2.4.20.tar.bz2 file in /usr/src/redhat/SOURCES to 
   /usr/src/linux-2.4.21-pre7

4) cd /usr/src

5) ln -s linux-2.4.21-pre7 linux

6) cd linux

7) patch < /usr/src/redhat/SOURCES/patch-2.4.21-pre7 -p1

8) make oldconfig

9) make dep && make vmlinux && make modules && make modules_install


I hope to get the module built today.  I can't wait to see if the loading
problem has gone away.


Kevin

-----Original Message-----
From: Tom 'spot' Callaway [mailto:[email protected]]
Sent: 28 April 2003 15:06
To: [email protected]
Subject: RE: [aurora-sparc-devel] Building Kernels and Kernel modules


On Mon, 2003-04-28 at 09:00, Kevin Curtis wrote:
> Hi,
> 	well, my progress today so far has been slow.  I installed the rpms
> for compat-egcs, and the linux src package for 2.4.20.  I uncompressed the
> linux-2.4.20.tar.bz2 file in /usr/src/redhat/SOURCES for the Kernel
sources
> and grabbed the kernel-2.4.20-sparc64-smp.config file from the same
> directory and built this Kernel in /usr/src/linux-2.4.20.  Do I need any
> patches on top of this?

If memory serves, the answer is yes. All my recent work has been with
2.4.21pre2 or higher. I strongly suggest that you start with a
kernel-source package from Aurora. It will be preconfigured to look for
kgcc instead of gcc (although, what you did should work ok). It will
also allow me to reproduce the bugs that you're seeing.

Are you still using an initrd? Also, if you've built multiple kernels
with the same name, you might have multiple module trees overlapping on
top of each other... thus, if ext3.o exists, mkinitrd will keep dragging
it in.

~spot
---
Tom "spot" Callaway <tcallawa(a)redhat*com> SAIR LCA, RHCE
Red Hat Enterprise Architect :: http://www.redhat.com
Project Leader for Aurora Sparc Linux :: http://auroralinux.org
GPG: D786 8B22 D9DB 1F8B 4AB7  448E 3C5E 99AD 9305 4260

The words and opinions reflected in this message do not necessarily
reflect those of my employer, Red Hat, and belong solely to me.

"Immature poets borrow, mature poets steal." --- T. S. Eliot

_______________________________________________
aurora-sparc-devel mailing list
[email protected]
http://lists.linuxpower.org/mailman/listinfo/aurora-sparc-devel
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.