On Wed, 12 Aug 1998, Michael Engel wrote:
> Hi,
>
> > 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
Is the PATH enviroment variable pointing at the cross compile programs? I
installed them in /usr/local/bin, the usual place if you compile binutils
for yourself for example.
> > $ 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 ...
Or netboot, check the Makefile in arch/mips/dec/boot for possibilities,
`make netboot` leaves nbImage in that directory from which a DECstation
is able to boot via network.
> > 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?
I never had to edit a Makefile of the original source to compile, have
you looked at http://www.inter.nl.net/users/schnecke/html/mips there's
some related info and links.
> The top-level Makefile in the linux/mips source tree, correct. Try adding
> -I/usr/include
> 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.
Agree with that Michael, the 2.1.99 source from decstation.unix-ag.org
has never given me any troubles, without the logical ones
of course.:-) Trying to compile unsupported hardware for
example. 'patch-2.1.99-pl2.tar.gz' applied correctly, I only had to move
a new file to the right place which can been seen looking at the diff
(the right location that is).
Regards,
Richard
|