Skip to contentSkip to conversation

MIPS kernel!

DISCUSSION Nicu Popovici 5 participants 8 messages Nov 8, 2000 – Nov 9, 2000 2 messages not in the archive MIPS

lore
Share & tools
lore
#0 lore raw

Hello ,

I tried to cross compile the kernel from ftp.embedix.com, meaning that I found that this embedix Linux is made to work on any platform . I have an Atlas board and a QED processsor ( a mips one ) and I fail in trying to cross compile the linux-2.2.13. I get the following errors.

/home/nicu/Kituri/Lineo/linux-2.2.13/scripts/mkdep amigaffs.c bitmap.c di /home/nicu/Kituri/Lineo/linux-2.2.13/include/asm/atomic.h:47: invalid operands to binary + /home/nicu/Kituri/Lineo/linux-2.2.13/include/asm/atomic.h: In function `atomic_sub':
/home/nicu/Kituri/Lineo/linux-2.2.13/include/asm/atomic.h:57: invalid operands to binary - /home/nicu/Kituri/Lineo/linux-2.2.13/include/asm/atomic.h: In function `atomic_add_return':
/home/nicu/Kituri/Lineo/linux-2.2.13/include/asm/atomic.h:67:
incompatible types in assignment /home/nicu/Kituri/Lineo/linux-2.2.13/include/asm/atomic.h:69:
incompatible types in assignment /home/nicu/Kituri/Lineo/linux-2.2.13/include/asm/atomic.h: In function `atomic_sub_return':
/home/nicu/Kituri/Lineo/linux-2.2.13/include/asm/atomic.h:81:
incompatible types in assignment /home/nicu/Kituri/Lineo/linux-2.2.13/include/asm/atomic.h:83:
incompatible types in assignment /home/nicu/Kituri/Lineo/linux-2.2.13/include/asm/timex.h: In function `get_cycles':
In file included from /home/nicu/Kituri/Lineo/linux-2.2.13/include/linux/timex.h:138,
from
/home/nicu/Kituri/Lineo/linux-2.2.13/include/linux/sched.h:14,
from
/home/nicu/Kituri/Lineo/linux-2.2.13/include/linux/mm.h:4,
from
/home/nicu/Kituri/Lineo/linux-2.2.13/include/linux/slab.h:14,
from
/home/nicu/Kituri/Lineo/linux-2.2.13/include/linux/malloc.h:4,
from
/home/nicu/Kituri/Lineo/linux-2.2.13/include/linux/proc_fs.h:5,

                 from init/main.c:15:

/home/nicu/Kituri/Lineo/linux-2.2.13/include/asm/timex.h:36: warning:
implicit declaration of function read_32bit_cp0_register' /home/nicu/Kituri/Lineo/linux-2.2.13/include/asm/timex.h:36: CP0_COUNT'

undeclared (first use this function) /home/nicu/Kituri/Lineo/linux-2.2.13/include/asm/timex.h:36: (Each undeclared identifier is reported only once /home/nicu/Kituri/Lineo/linux-2.2.13/include/asm/timex.h:36: for each function it appears in.)
make: *** [init/main.o] Error 1

Another weird thing . When I received my Atlas board I gqt a CD with the kernel sources and binaries. I installed the binaries on the Atlas board and it works fine but when I tried to cross compile the kernel I get some stupid errors like the one above. I realy do not understand anything , does anyone cross compiled a kernele for MIPS processors and Atlas boards ? The version is linux 2.2.12.( the Hard Hat Linux ).

Thak you for all your help.

Regards,
Nicu

begin:vcard
n:POPOVICI;Nicolae Octavian
tel;cell:+40 93 605020
x-mozilla-html:FALSE
org:SC Silicon Service SRL;Software
adr:;;;;;;
version:2.1
email;internet:[email protected]
title:Software engineer
x-mozilla-cpt:;0
fn:Nicolae Octavian POPOVICI
end:vcard

#1 lore raw
Quoted 4 lines

I tried to cross compile the kernel from ftp.embedix.com, meaning that I found that this embedix Linux is made to work on any platform . I have an Atlas board and a QED processsor ( a mips one ) and I fail in trying to cross compile the linux-2.2.13. I get the following errors.

...
[errors snipped]
...

Quoted 6 lines

Another weird thing . When I received my Atlas board I gqt a CD with the kernel sources and binaries. I installed the binaries on the Atlas board and it works fine but when I tried to cross compile the kernel I get some stupid errors like the one above. I realy do not understand anything , does anyone cross compiled a kernele for MIPS processors and Atlas boards ? The version is linux 2.2.12.( the Hard Hat Linux ).

In general, at MIPS, we generally build native or semi-native (mipsel on mipseb machines and vice versa). In cross-builds of other components, however, I have observed that problems such as those you describe can result from include files
on the host platform being erroneously pulled in to the cross-build. Cross-gcc and the makefiles have been known to be set up such that, if the needed include file can be found neither in the explicitly requested directories nor in the cross-compiler's default includes, it will silently search the host /usr/include directories.

One quick-and-dirty way to test this would be to temporarily rename /usr/include on your host platform to /usr/include.native or whatever, and then make your /usr/include a symbolic link to the include directory of your MIPS Linux tree. This should either let you build correctly or give you a more useful error message telling you which include file is missing from your cross-environment or MIPS kernel distribution. Just don't forget to put things back the way they were!

Regards,

Kevin K.

#2 lore raw
Quoted 9 lines · Kevin D. Kissell

In general, at MIPS, we generally build native or semi-native (mipsel on mipseb machines and vice versa). In cross-builds of other components, however, I have observed that problems such as those you describe can result from include files
on the host platform being erroneously pulled in to the cross-build. Cross-gcc and the makefiles have been known to be set up such that, if the needed include file can be found neither in the explicitly requested directories nor in the cross-compiler's default includes, it will silently search the host /usr/include directories.

This is either a bug in the version that you're using, a wrongly installed compiled or simply wrong -I directives passed to the compiler. The crosscompiler rpms as distributed on oss will only search:

/usr/lib/gcc-lib/mips-linux/egcs-2.91.66/include
/usr/mips-linux/include

by default. I just tried, egcs-1.1.2-2 also doesn't search silently in other directories. So it's not a problem of gcc itself which leaves the makefiles. If you find any instance of the wrong directories being searched, please tell me. Or better, include a patch :-)

Ralf

#3 lore raw
Quoted 13 lines · Ralf Baechle
Quoted 9 lines · Kevin D. Kissell

In general, at MIPS, we generally build native or semi-native (mipsel on mipseb machines and vice versa). In cross-builds of other components, however, I have observed that problems such as those you describe can result from include files
on the host platform being erroneously pulled in to the cross-build. Cross-gcc and the makefiles have been known to be set up such that, if the needed include file can be found neither in the explicitly requested directories nor in the cross-compiler's default includes, it will silently search the host /usr/include directories.

Quoted 2 lines

This is either a bug in the version that you're using, a wrongly installed compiled or simply wrong -I directives passed to the compiler.

Obviously. And my thought was that Nicu may well be being bit by one or the other.

Quoted 9 lines

The crosscompiler rpms as distributed on oss will only search:

/usr/lib/gcc-lib/mips-linux/egcs-2.91.66/include
/usr/mips-linux/include

by default. I just tried, egcs-1.1.2-2 also doesn't search silently in other directories. So it's not a problem of gcc itself which leaves the makefiles. If you find any instance of the wrong directories being searched, please tell me. Or better, include a patch :-)

I saw an instance of this on the order of a year ago. I don't remember which compiler I was using, nor where I got it. I have no ability nor really much desire to try to reconstruct the environment to reproduce the problem!

Kevin K.

#4 lore raw
Quoted 9 lines · Kevin D. Kissell
Quoted 4 lines

by default. I just tried, egcs-1.1.2-2 also doesn't search silently in other directories. So it's not a problem of gcc itself which leaves the makefiles. If you find any instance of the wrong directories being searched, please tell me. Or better, include a patch :-)

I saw an instance of this on the order of a year ago. I don't remember which compiler I was using, nor where I got it. I have no ability nor really much desire to try to reconstruct the environment to reproduce the problem!

It think you can missconfigure a compiler to do something like that on a i386-linux host by ``configure mips-linux'' or so. That will or course also hose your native compiler.

Ralf

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw
Quoted 11 lines · Ralf Baechle
Quoted 5 lines · Nicu Popovici

I managed to pass that stage with crosscompiler.
I managed to make the following thing
make CROSS_COMPILE=mips-linux-

and I get the follwing error.

What kernel are you trying to build and where did you download it from?

Ralf

I try to compile the linux 2.2.13 and I got that one from ftp.lineo.com.
I also tried to cross compile the linux_2_2 from CVS repository from oss.sgi.com and I managed but that one does not have support for my ATLAS borad and I can not run it on my machine.

Regards,
Nicu

begin:vcard
n:POPOVICI;Nicolae Octavian
tel;cell:+40 93 605020
x-mozilla-html:FALSE
org:SC Silicon Service SRL;Software
adr:;;;;;;
version:2.1
email;internet:[email protected]
title:Software engineer
x-mozilla-cpt:;0
fn:Nicolae Octavian POPOVICI
end:vcard

#8 lore raw
Quoted 4 lines · Nicu Popovici

I try to compile the linux 2.2.13 and I got that one from ftp.lineo.com.
I also tried to cross compile the linux_2_2 from CVS repository from oss.sgi.com and I managed but that one does not have support for my ATLAS borad and I can not run it on my machine.

Did you also try 2.4 from oss.sgi.com ? If not you should try it, because IIRC 2.2 doesn't have ATLAS support but 2.4 has. I think I remember seeing a CVS commit which included ATLAS support into 2.4 ... correct me if I'm wrong.

HTH, Klaus

Signature · 4 lines
Full Name   : Klaus Naumann     | (http://www.mgnet.de/) (Germany)
Nickname    : Spock             | Org.: Mad Guys Network
Phone / FAX : ++49/177/7862964  | E-Mail: ([email protected])
PGP Key     : www.mgnet.de/keys/key_spock.txt
#9 lore raw
Quoted 7 lines · Klaus Naumann
Quoted 4 lines · Nicu Popovici

I try to compile the linux 2.2.13 and I got that one from ftp.lineo.com.
I also tried to cross compile the linux_2_2 from CVS repository from oss.sgi.com and I managed but that one does not have support for my ATLAS borad and I can not run it on my machine.

Quoted 5 lines

Did you also try 2.4 from oss.sgi.com ? If not you should try it, because IIRC 2.2 doesn't have ATLAS support but 2.4 has. I think I remember seeing a CVS commit which included ATLAS support into 2.4 ... correct me if I'm wrong.

The current version in the CVS repository doesn't work yet,.
I have sent Ralf a set of patches that should make it work, but I don't think he has committed it yet.

Quoted 8 lines

HTH, Klaus

--
Full Name : Klaus Naumann | (http://www.mgnet.de/) (Germany)
Nickname : Spock | Org.: Mad Guys Network
Phone / FAX : ++49/177/7862964 | E-Mail: ([email protected])
PGP Key : www.mgnet.de/keys/key_spock.txt

--

_    _ ____  ___   Carsten Langgaard   Mailto:[email protected]
|\  /|||___)(___   MIPS Denmark        Direct: +45 4486 5527
| \/ |||    ____)  Lautrupvang 4B      Switch: +45 4486 5555
  TECHNOLOGIES     2750 Ballerup       Fax...: +45 4486 5556
                   Denmark             http://www.mips.com