RE: Building Kernels and Kernel modules

Kevin Curtis <[email protected]>
Newsgroups gmane.linux.aurora.devel
Message-ID <[email protected]>
Hi everyone,
	I have now signed up to the list as requested.  I work for a company
that manufactures PCI WAN cards.  We have Intel Linux drivers for our own
X.25 stack and also sync drivers that allow syncppp or the generic hdlc
modules to be used.  We would like to port these ultra-linux.  I chose the
aurora-linux distribution because it was the most upto date, and it
installed (via the text install) with out any problems.  So far everything
looks good.

	However, there seems to be some things I need to be aware of about
developing in this environment.  Is there a howto or other publication that
will make me aware of the "right way" to go about developing?

	I have no problem about where I get the Kernel from, so I will
download one from auroralinux.org later today.

	I am using the gcc compiler "out of the box".  So I guess I need to
replace it with kgcc.  I will get this organised as soon as I can.

Thanks for your help so far.  I'm sure I'll have some more questions soon.


Kevin Curtis
Linux Development
FarSite Communications Ltd
[email protected]
tel:   +44 1256 330461
fax:  +44 1256 854931
http://www.farsite.co.uk

-----Original Message-----
From: Tom 'spot' Callaway [mailto:[email protected]]
Sent: 25 April 2003 18:00
To: [email protected]
Cc: Kevin Curtis
Subject: Re: [aurora-sparc-devel] Building Kernels and Kernel modules


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.