How to build a cross compiler for Linux/MIPS

Here's how to build the cross compiler tools for Linux. Please send feedback to

imp@village.org

The configuration name for Linux MIPS is currently mipsel-unknown-linuxelf. Some of the developers prefer the shorthand of mipsel-linuxelf. The former follows the FSF conventions to the letter, while the latter follows the traditional linux conventions. The port currently is dominated by little endian machine developers. There is also support for big endian by replacing mipsel- with mips- in the above strings. I have followed the traditional linux conventions in this document.

Worst case this process requires about 150M of disk space. This will settle down to a mere 20M if you delete most of the sources once you have built them. This space requirement is exclusive of the kernel itself and the other programs that you may wish to build.

Step 1: Get the right sources.

Currently, you will need to grab binutils 2.6 and gcc 2.7.2. Unfortunately, these do not work out of the box. A patch for binutils and a patch for gcc are needed.

You also need to grab the current libc for some parts of the build. Unfortunately, the latest snapshot of the library is included in the glibc 951212, an older snapshot of the library, is available from fnet, and it should be sufficient.

You will need about 12.5M (45M if you grab the root disk) of disk space for the raw .gz files alone. A 28.8 modem can grab about 6M/hr. A 14.4 about 3M/hr. A 56k line about 12M/hr. A T1 can grab about 275M/hr. 2400 baud is right out.

Step 2: Building binutils

This will require about 35-40M of disk space. Plus an additional 10.5M of space to install the binaries. On a 486DX2-66 it took about 15 minutes to build and install.

Step 3: Installing the libraries

This will take 2.2M of disk space on a permanant basis. You will need to do this in order for the cross compiler to finish compiling correctly!

Step 4: Build gcc

This step will require 43 M in disk. 6 M of disk is required to do an installation. It takes about 30 minutes to build on a 486DX2-66.

Congratulations. You now have a cross compiler!

$Id: build.html,v 1.1 1996/12/31 04:27:59 imp Exp $