Subject: MIPS Cross Compiler Tools

From: Marc Karasek <[email-masked]>
Date: Tue, 10 Jul 2001 12:27:43 -0400

I had a question about the cross compiler tools for MIPS, specifically
glibc.  I d/l the rpms from oss.sgi.com,  but they are only binutils, and
the compiler (C, C++).  

Are most people building glibc against these or are you building the tools
completely from scratch?  As glibc is needed to compile anything else other
than the kernel. 

Marc Karasek 
Sr. Firmware Eng
iVivity Inc

---

From: Steve Langasek <[email-masked]>
Date: Tue, 10 Jul 2001 11:35:20 -0500 (CDT)

Hi Marc,

> completely from scratch?  As glibc is needed to compile anything else other

You don't need a special 'cross-compiler' glibc in order to set up a
cross-build environment for MIPS; simply grab a glibc package that's
precompiled for MIPS and install it into your cross-build root directory.

I don't know who (if anyone) would have rpms for a recent mips glibc; I use
Debian, where I have the packages available as part of the distro.

Regards,
Steve Langasek
postmodern programmer

---

From: Pete Popov <[email-masked]>
Date: Tue, 10 Jul 2001 09:39:02 -0700

> completely from scratch?  As glibc is needed to compile anything else other

Friday or Monday MontaVista should have the HHL2.0 Journeyman mips 
release on the ftp site which will include the userland apps, cross AND 
native tools, etc.  The tools and glibc are very up to date. I would 
suggest checking Monday for the release and using that instead of 
building your own.

Pete

---

From: "H . J . Lu" <[email-masked]>
Date: Tue, 10 Jul 2001 09:46:27 -0700

> completely from scratch?  As glibc is needed to compile anything else other

My RedHat 7.1 release on oss.sgi.com has the complete cross toolchain:

H.J.
-----
My mini-port of RedHat 7.1 is at

ftp://oss.sgi.com/pub/linux/mips/redhat/7.1/

you should be able to put a small RedHat 7.1 on the mips/mipsel box and
compile the rest of RedHat 7.1 yourselves.

Here are something you should know:

1. The cross compiler hosted on RedHat 7.1/ia32 is provided as a
toolchain rpm. The binary rpms for the mips and mipsel cross compilers
are included.
2. You have to find a way to put those rpms on your machine. I use
network boot and NFS root to do it.

---

From: Marc Karasek <[email-masked]>
Date: 10 Jul 2001 13:05:01 -0400

This is for an embedded platform, with no harddrive.  So I will need to
use things like busybox, etc.  I just need the headers & libs.  So far I
have only been able to find glibc-2.2.2 from deb in an rpm format.
Could not get this to install in /usr/local/mips-linux/...  properly.  I
guess what I am really looking for is a tgz file of the libs/headers.
SO I can put it where I want it. Any packaged dist (RH, deb) would not
be usefull in this scenario.  At least that is my experience todate.... 

Thanks for the quick response..

--
/*************************
Marc Karasek
Sr. Firmware Engineer
iVivity Inc.
[email-masked]
(770) 986-8925
(770) 986-8926 Fax
*************************/

---

From: "H . J . Lu" <[email-masked]>
Date: Tue, 10 Jul 2001 10:07:40 -0700

> be usefull in this scenario.  At least that is my experience todate.... 

What are you talking about? Did you ask for the cross toolchain? What
does it have anything to do with your target?

H.J.

---

From: Marc Karasek <[email-masked]>
Date: 10 Jul 2001 13:09:42 -0400

Will these be in the form of rpms or tgz files??  In the case of rpm do
you know if they would be package similar to the ones on oss.sgi.com?
ie Setup for a crossdev enviroment.  I just really need the cross tools
as the dev is on an embedded system, with no harddrive.  The userland
stuff is pretty worthless to me.  I will be using busybox, tinylogin,
etc. for the standard bin utilities.  Having a few megabytes to store
everything in makes you very sensitive to size.... :-)

Thanks for the quick response...

---

From: Marc Karasek <[email-masked]>
Date: 10 Jul 2001 13:11:53 -0400

I really need the libs to cross-compile some other apps.  The target is
an embedded system, so I need to crosscompile things like busybox,
tinylogin, etc.  (It will NOT have a harddrive) I have done this before
with ARM and it is pretty easy once you get the tools in place.
Sometimes that is the hardest part... 

On 10 Jul 2001 11:35:20 -0500, Steve Langasek wrote:
> I don't know who (if anyone) would have rpms or a recent mips glibc; I use

---

From: Pete Popov <[email-masked]>
Date: Tue, 10 Jul 2001 10:55:53 -0700

Marc Karasek wrote:

> Will these be in the form of rpms or tgz files??  

rpm

In the case of rpm do
> you know if they would be package similar to the ones on oss.sgi.com?

I'm not sure how the oss.sgi.com tools are packaged. The MontaVista 
release gets installed in /opt/hardhat/<....>. The 
/opt/hardhat/devkit/mips/fp<le|be>/target is the root fs that gets 
mounted over nfs. The target root fs has all the userland apps and 
native tools. The /opt/hardhat/devkit/mips/fp_<le|be>/bin has the cross 
tools.

> as the dev is on an embedded system, with no harddrive.  

That's what we work with mostly as well.

> The userland
> etc. for the standard bin utilities.  

OK, but we have all of those packaged in rpm as well, and it's very easy 
to rebuild the rpms from the source rpms, if you need to rebuild them.

Pete

> Having a few megabytes to store

---

From: "Gleb O. Raiko" <[email-masked]>
Date: Wed, 11 Jul 2001 12:41:49 +0400

> guess what I am really looking for is a tgz file of the libs/headers.

I've got cross mipseb libc as rpm for a long time. Sure, it's installed
in /usr/mips-linux and has noarch format. The SPEC file just picks up
mips.rpm and builds noarch with /usr/mips-linux as root. Unfortunately,
I haven't a place where I may upload rpm for public access. If it's what
you need I may send the spec file by request.

Regards,
Gleb.