Re: Building Kernels and Kernel modules

"Tom 'spot' Callaway" <[email protected]>
Newsgroups gmane.linux.aurora.devel
Organization Red Hat
Message-ID <1051289977.12695.72.camel@zorak>
Kevin, I had to approve this post... -devel is a moderated list, please
signup if you anticipate posting replies. :)

On Fri, 2003-04-25 at 11:41, Kevin Curtis wrote:

> 1)  Building the 2.4.20 Kernel
> I have downloaded the 2.4.20 Kernel from www.kernel.org and started with the
> default config file (defconfig) from the /usr/src/linux/arch/sparc64
> directory.  The first time I built the Kernel all was OK.  However it didn't
> load because the required scsi driver wasn't included.  So I ran make
> xconfig to add it.  But then after a 

Well, the errors are being generated due to xconfig. Its not happy on
sparc. Use menuconfig instead.

Also, I strongly recommend that you consider using Aurora kernel trees
instead of Vanilla source. We patch things for reasons. ;)

There are recent (2.4.21pre7 based) source and binary packages in
ftp.auroralinux.org/pub/aurora/scratch/kernel-04092003/

At the very least, consider using the Aurora configs.

> Also, in an effort to reduce the number of modules, and therefore the build
> time, I have tries to trim the config.  I seem to have done something that
> produces the following message when the boot process tries to start init
> 
> INIT:  cannot fork, retry..
> 
> it does this ad infinitum.

This error is unfortunately vague... are you using the gcc 2.96 compiler
to build the kernel? If so, it is likely the source of that problem. All
kernels need to be built with the compat-egcs compiler on sparc.

> 2) 32 bit User / 64 Bit Kernel
> For sparc64 I realise that userland is 32 bits and Kernel space is 64 bits.
> I have built a Kernel module in userland and I am trying to load it into the
> Kernel.  I get the following error message:
> 
> [root@icarus kernel]# /sbin/insmod fred.o
> fsx25.o: ELF file fred.o not for this architecture

Thats odd. If you didn't precursor your build with sparc32, it should
have built for sparc64 by default.

Again, make sure you're using kgcc (compat-egcs) to build kernel bits,
and pass it -m64.

~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
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.