Hi folks

Having finally persuaded my x86 machine to cross compile kernels for SA
Riscos
machines, (see below for more info on this)
I can now compile a kernel which at least un-compresses.. there are still

problems though

1. Is the CONFIG_CPU_ARMV4 reqired for SA-RPC machines?.. running
menuconfig
or xconfig and defining as riscos SA machine, I get compilation failing
in
proc-arm6,7.S at lines 77 and 78 with:
Can not represent IMMEDIATE relocation in this object file format (0)

manually editing config so that CONFIG_CPU_ARMV4 = y      permits 
compilation to complete


2. there are worrying assembler type warnings that keep appearing..
typically
such as that the destination register is the same as the writeback base
reg... Is this 
sort of thing actually expected?

3. Is there an easy way to filter just the warnings/errors from the large
quantity of
info flowing past during compilation



cross compiling kernels

to get going I did the following:

base dir is /usr/src

a) Binutils.. with gz and patch files in ./sources/binu19a  (i.e.
binutils-2.9.1.0.19a)
files are binu19a.gz and binutils-p, the relevant patch file for arm use
tar -xzf ./sources/binu*/binu19*
gzip -cd ./sources/binu*/binut* | patch -p0
this creates /usr/src/binutils-2.9.1.0.19a

b) egcs..
as above, in ./sources/egcs   files are (for convenience)
egcs1.1b.gz       the base egcs1.1b archive
egcs11b-111     patch   to get it to egcs-1.1.1
egcs111ad        patch to add arm to egcs-1.1.1
applied as

tar -xzf ./sources/eg*/egcs1.*
gzip -cd ./sources/eg*/egcs11b* | patch -p0
gzip -cd ./sources/eg*/egcs111* | patch -p0

c) the linux kernel.. get this in place and 
make menuconfig, or whatever.
configure it for your arm processor and exit, saving things
then 
make symlinks
 to set up the header links

then 
mkdir ./arm
mkdir ./arm/binu
mkdir ./arm/egcs

then cd ./arm/binu*
type ../../binu*/configure --host=i686-pc-linux --target=arm-linux
--prefix=/usr
make
make install

this will build arm version tools in /usr/bin, all prefixed by arm-linux-

Now the difference.. thanks to chris rutter <[EMAIL PROTECTED]> suggested
this..
COPY the headers into the egcs arm tree, instead of just linking it...

mkdir /usr/src/arm/egcs/include
cp -a /usr/src/linux/include/arm-asm /usr/src/arm/egcs/include/asm
cp -a /usr/src/linux/include/linux /usr/src/arm/egcs/include/linux

then.. 
cd /usr/src/arm/egcs
./../eg*/configure --host=i6i6-pc-linux --target=arm-linux --prefix=/usr
cd gcc
make LANGUAGES="C"
make LANGUAGES="C" install

this sets up /usr/bin/arm-linux-gcc

and you are ready to compile kernels.. dont forget to edit the linux
kernel Makefile
to set 
CROSS_COMPILE = /usr/bin/arm-linux-
( the default value still has arm-linuxelf-   in it...)




-- 
                      John Ballance
 Castle Technology, Ore Trading Estate, Woodbridge Road, Framlingham,
Suffolk UK IP13 9LL  Tel  44 (0) 1728 621 631, Fax  44 (0) 1728 621 179
web: http://www.castle-technology.co.uk or http://www.castlet.demon.co.uk

unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]

Reply via email to