[Top] [All Lists]

Re: help cross-compiling MIPS-kernel on i386 linux

Subject: Re: help cross-compiling MIPS-kernel on i386 linux
From: (Michael Engel)
Date: Wed, 12 Aug 1998 16:44:20 +0200 (MET DST)
In-reply-to: <> from "Kristoff Bonne" at Aug 12, 98 04:34:05 pm

> This is the first time I try to cross-compile a linux-kernel, so this may be 
> a stupid question, but I'll ask it anyway.
> I've ftp'ed and installed the following files onto a (intel) linux-box:
> - linux-2.1.99.tar.gz
> - mipsel-binutils-2.8.1-linux.i386.tar.gz
> - mipsel-gcc-2.7.2-linux.i386.tar.gz
> - patch-2.1.99-pl2.tar.gz
> $ cd $home/MIPS_linux/linux
> $ make menuconfig
> $ make dep ; make clean
> $ make zImage

Use make vmlinux instead of make zImage, we can't boot compressed images 
yet ...

> And then, thing start to go wrong!
> * First of all, this:
> as: unrecognized option `-cpu=r3000'

Huh, that's funny. It should usually say "mipsel-linux-as", if I'm not
mistaken. Could you check your kernel Makefile, please ?

> * This was just a warning, but then an error saying he cannot find a file 
> called 
> 'stdarg.h'.
> It appears the mipsel-linux-gcc command misses a '-I' option. (-I 
> /home/kristoff/MIPS_linux/usr/local/lib/gcc-lib/mipsel-linux/2.7.2/include/)
> I don't really know what file I need to edit to include this. Some 
> 'Makefile', I guess?

The top-level Makefile in the linux/mips source tree, correct. Try adding
to the compiler definition CC=mipsel-linux-gcc ...

This worked for me but I'm sure it's not the correct way to handle it.


> Looks to me like some bug in the source-code, but I did not see anything 
> wrong when installing the kernel source-code, nor when applying to path.
> (I did apply 'patch-2.1.99-pl2.tar.gz' on the original source-code).

I'll re-check the kernel and patch but I suspect there's something wrong
with your cross-compile setup.

        Michael Engel   (

<Prev in Thread] Current Thread [Next in Thread>