Subject: Cross toolchain problem??

From: Muthukumar Ratty <[email-masked]>
Date: Fri, 1 Mar 2002 21:25:49 -0500 (EST)

Hi,

My toolchain information
Host : redhat linux 7.1 in a i386 PC

Tool chains built as per Brad LaRonde's writeup. 
 (Building a Modern MIPS Cross-Toolchain for Linux)
gcc: version 3.0.3
binutils : version 2.11.92.0.7 20011016
glibc: version 2.2.3 with linux threads patch and mips-base-addr patch
	from Brad.

I was able to build kernel 2.4.3, I got from oss.sgi.com and it works fine
(thanks to everyone). So I assumed my toolchain is working fine. Next I
modified the yamon startup code (just used reset.S, gt64120.S, link.xn and
did some cleaning to get it compiled). When I tried to run srecconv.pl
util, I got error message "Out of memory!" (I wanto convert it into flash
format to download. The strange thing is, I have an Algorithmics toolchain
version egcs-2.90.23 980102, GNU ld 2.9.1/sde-4.0.3, and the srec I got
from it doesnt havethis problem)

I tried to trace down and found that the srec generated has load
address 0x80001000 for data and 0xbfc00000 for the startup code (this is
because the link.xn is defined this way). So when an associative array is
used in perl script srecconv.pl, it runs out of memory.  I dont know perl
and I am stuck here. Can somebody point me how to proceed? thanks a lot.
(i really want to have the data loaded at 0x80001000 but it should be
initially in flash).

So I changed the data load address to 0xbfc01000 and now the srecconv
works fine and I got a .fl image. But my "jal gt64120_init" is assembled
to use _gp and I dont think I set the _gp properly ( I am still in the
process of reading Dominics book:). so the code is not at all entering in
to the gt64120_init function. but when I change it to "j gt64120_init"
it works fine. (Cant I use "jal" here?)

Any help would be appreciated and sorry for this long mail,
Thanks,
Muthu

---

From: Muthukumar Ratty <[email-masked]>
Date: Fri, 1 Mar 2002 23:22:36 -0500 (EST)

To add to my previous mail:
The same code when I build with Algorithmics tool chain builds "jal
gt64120" properly, I mean it doesnt use _gp. 

But I cannot stick with Algorithmics tool chain because when I build the
kernel 2.4.3 it complains that "my Algorithmics toolchain is old and it
builds buggy kernel."

I am really stuck here for a while and any help would be appreciated.
Thanks a lot,
Muthu

---

From: Carsten Langgaard <[email-masked]>
Date: Sat, 02 Mar 2002 09:38:41 +0100

> kernel 2.4.3 it complains that "my Algorithmics toolchain is old and it

Just remove the check from the kernel.

---

From: Muthukumar Ratty <[email-masked]>
Date: Sat, 2 Mar 2002 09:59:30 -0500 (EST)

Thanks Carsten,
But wont it produce any buggy kernel as the warning says?
Muthu

---

From: Carsten Langgaard <[email-masked]>
Date: Sun, 03 Mar 2002 12:14:37 +0100

Hopefully not with the Algorithmics toolchain, otherwise we will like to
know.

/Carsten

---

From: Dominic Sweetman <[email-masked]>
Date: Sun, 3 Mar 2002 13:22:57 +0000

> Hopefully not with the Algorithmics toolchain, otherwise we will like to

Speaking for Algorithmics: I suspect there may be problems building a
2.4+ kernel with SDE-MIPS v4.0c.  The people who made 2.4 were very
enthusiastic about the latest and greatest language extensions in GCC,
and SDE-MIPS v4.0c is based on quite an old compiler.

2.2 should be fine with SDE-MIPS v4.0c; 2.4+ is known to work with
SDE-MIPS v5.0, which is only in beta so far.  With some makefile
tweaks that should build kernels with no trouble.

Soon there should be a compiler distribution from Algorithmics which
is based on the v5.0 sources, but configured for Linux.  That should
be best.

-- 
Dominic Sweetman
Algorithmics Ltd
The Fruit Farm, Ely Road, Chittering, CAMBS CB5 9PH, ENGLAND
phone +44 1223 706200/fax +44 1223 706250/direct +44 1223 706205
http://www.algor.co.uk