Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SGI O2 and gentoo linux
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
DGilmour
Tux's lil' helper
Tux's lil' helper


Joined: 28 Aug 2005
Posts: 132
Location: Abbadia San Salvatore

PostPosted: Tue Dec 20, 2005 2:07 pm    Post subject: SGI O2 and gentoo linux Reply with quote

I don't speak englis. This is my first english Topic.
I want install gentoo linux on my SGI O2. I have reed the handbook for mips processor. My SGI is:

System IP32;
Processor type R5000;
Main memory 512Mbyte.

I have a problem with kerenel compilation.
...
# make
/bin/sh: mips64-linux-objdump: command not found
/bin/sh: mips64-linux-ld: command not found
...
make: *** Error

How can i found this command?
Where i commit mistake?

Bye, Keres.
Back to top
View user's profile Send private message
aidy
l33t
l33t


Joined: 07 Apr 2005
Posts: 915

PostPosted: Tue Dec 20, 2005 3:14 pm    Post subject: Reply with quote

Try 'emerge gentoolkit' and then do 'equery mips64-linux-objdump' to see what packages have it.
Back to top
View user's profile Send private message
creideiki
n00b
n00b


Joined: 19 Feb 2003
Posts: 61
Location: Linköping, Sweden

PostPosted: Tue Dec 20, 2005 6:19 pm    Post subject: Reply with quote

The sys-devel/gcc-mips64 package, which you should have gotten automatically, says there are special things to do to build a MIPS64 kernel:

Quote:
For 2.6.x kernel builds:
alias mips64make="make ARCH=mips CROSS_COMPILE=mips64-unknown-linux-gnu-"

Then to compile a kernel, simply goto the kernel source directory, and issue:
mips64make <target>
Where <target> is one of the usual kernel targets
Back to top
View user's profile Send private message
e-ipi
Apprentice
Apprentice


Joined: 23 Aug 2005
Posts: 192

PostPosted: Tue Dec 20, 2005 10:42 pm    Post subject: Reply with quote

creideiki wrote:
The sys-devel/gcc-mips64 package, which you should have gotten automatically, says there are special things to do to build a MIPS64 kernel:

Quote:
For 2.6.x kernel builds:
alias mips64make="make ARCH=mips CROSS_COMPILE=mips64-unknown-linux-gnu-"

Then to compile a kernel, simply goto the kernel source directory, and issue:
mips64make <target>
Where <target> is one of the usual kernel targets


Isn't the O2 a 32 bit machine? I'd suggest trying something other than mips64.
Back to top
View user's profile Send private message
Kumba
Developer
Developer


Joined: 16 Jul 2002
Posts: 393
Location: Sigma 957

PostPosted: Tue Dec 20, 2005 11:31 pm    Post subject: Reply with quote

SGI O2 systems are MIPS64 machines, although at one point in time, they could function as 32bit. However, it wasn't practical to support both modes, so upstream linux-mips development stripped the 32bit kernel functionality out.

sys-devel/gcc-mips64 only builds a C compiler. The referenced utilities being sought are provided by binutils. Running `binutils-config --mips` should provide the necessary tools, as well as making sure that the cross-compile option in the Kernel configuration is set (since all our systems currently run a 32bit userland only, and we're building a 64bit kernel target), and the CROSS_COMPILE option needs to be passed on the command line ala:

CROSS_COMPILE=mips64-unknown-linux-gnu-

So the referenced code segment is correct. That's actually the very bash alias I use to build all my mips kernels.


--Kumba
_________________
"The past tempts us, the present confuses us, the future frightens us. And our lives slip away, moment by moment, lost in that vast, terrible in-between."
--Emperor Turhan, Centauri Republic
Back to top
View user's profile Send private message
iMike
Apprentice
Apprentice


Joined: 01 Apr 2005
Posts: 217
Location: Stockholm, Sweden

PostPosted: Sat Dec 24, 2005 8:04 pm    Post subject: Reply with quote

I had a similar problem when I went to make the kernel on my O2. Now I am wondering if my compiler is set up correctly, and generally which compiler is the "correct" one to use.

Background:

I had booted from the MIPS Live CD (2005-06-10) and downloaded Gentoo portage and stage3 files from 20051017. I got errors similar errors about "ar", "ld", etc not being found. I didn't know what else to do (this thread was not around then) so I hacked in the needed links. I used gcc-config -B and got:
Code:

/usr/mips-unknown-linux-gnu/gcc-bin/3.4.3-20050110

So I put in the (hopefully) appropriate links in the above directory:
Code:

cd /usr/mips-unknown-linux-gnu/gcc-bin/3.4.3-20050110
ln -s /usr/bin/nm mips64-linux-nm

similar for "mips64-linux-ar", "mips64-linux-ld", "mips64-linux-gcc", and possibly others. This allowed me to compile a kernel that I am now using successfully.

At this point, when I do gcc-config -l, I get:
Code:

[1] mips-unknown-linux-gnu-3.4.3-20050110 *
[2] mips-unknown-linux-gnu-3.4.3-20050110-hardenednopiessp


Having read this thread, I just now emerged gcc-mips64 (emerge -pv told me it was new). I tried doing gcc-config -l, but it doesn't show up. How can one make gcc-mips64 the default compiler? Should I do that? Is it safe to assume the links I put by hand in /usr/mips-unknown-linux-gnu/gcc-bin/3.4.3-20050110 won't make any difference at that point?

As for which compiler is in general the "correct" one to use for a MIPS O2, my question there is that if I do an "emerge -vauDN world" I see it is ready to go get the gcc-3.4.4 compiler. I realize there is a long road ahead in updating my system to gcc-3.4.4, following the gcc upgrade guide and taking a few days. There does not seem to be a gcc-mips64-3.4.4 though. So is gcc-3.4.4 the correct compiler for me?
Back to top
View user's profile Send private message
Kumba
Developer
Developer


Joined: 16 Jul 2002
Posts: 393
Location: Sigma 957

PostPosted: Fri Jan 06, 2006 6:29 am    Post subject: Reply with quote

iMike wrote:
I had a similar problem when I went to make the kernel on my O2. Now I am wondering if my compiler is set up correctly, and generally which compiler is the "correct" one to use.

Background:

[snip]
iMike wrote:
Having read this thread, I just now emerged gcc-mips64 (emerge -pv told me it was new). I tried doing gcc-config -l, but it doesn't show up. How can one make gcc-mips64 the default compiler? Should I do that? Is it safe to assume the links I put by hand in /usr/mips-unknown-linux-gnu/gcc-bin/3.4.3-20050110 won't make any difference at that point?

As for which compiler is in general the "correct" one to use for a MIPS O2, my question there is that if I do an "emerge -vauDN world" I see it is ready to go get the gcc-3.4.4 compiler. I realize there is a long road ahead in updating my system to gcc-3.4.4, following the gcc upgrade guide and taking a few days. There does not seem to be a gcc-mips64-3.4.4 though. So is gcc-3.4.4 the correct compiler for me?


You went the really long way. I'll explain:

O2, Octane, Origin, and Indigo2 Impact all run 64bit kernels of one form or another, but they only run 32bit (o32 ABI) userlands. As such, the default compiler, also known as the system compiler, is mips-unknown-linux-gnu-gcc (for a glibc system). For uclibc, it's mips-unknown-linux-uclibc-gcc. This is basically saying ${CHOST}-gcc. In Gentoo, we use the full CHOST, that is arch-vendor-os-userland format. Debian and others tend to stick to the shorter form of CHOST, arch-os.

Due to the fact upstream development is mostly comprised of Debian developers, and because mips can run on different userlands (glibc, uclibc, etc), they rightly saw it fit to have the kernel makefile use the shortened form of CHOST when referencing cross-build utilities.

Now, gcc-mips64 is a simplistic ebuild. It's basically a few chunks of a very old gcc-3.3.x ebuild carved out to build a C-Only compiler for kernel building, way before tools like gcc-config, binutils-config, and the toolchain EClasses came along and made life awhole lot simpler. As such, it doesn't get listed in gcc-config outputs and cannot be set as any kind of a system compiler, hence the referenced alias command in the pkg_postinst() section of the ebuild. It basically forces the kernel to use our longhand form of the CHOST so it can find all the right tools needed to build the kernel.

We've got a newer ebuild, kgcc64, in the tree in sys-devel that will eventually replace gcc-mips64, gcc-sparc64, gcc-powerpc64, etc.. However, it kinda violates a couple QA rules in its operation at the moment, so it's not very heavily used until we can either get some mechanisms in portage to make it work properly, or modify the toolchain EClass to work around these QA issues. Once kgcc64 is fixed and replaces all the other variants, it will list itself in gcc-config -l as a cross-compiler to pick in addition to the system compiler. Buit that's a ways down the road for now.


--Kumba
_________________
"The past tempts us, the present confuses us, the future frightens us. And our lives slip away, moment by moment, lost in that vast, terrible in-between."
--Emperor Turhan, Centauri Republic


Last edited by Kumba on Sat Jan 07, 2006 9:35 pm; edited 1 time in total
Back to top
View user's profile Send private message
iMike
Apprentice
Apprentice


Joined: 01 Apr 2005
Posts: 217
Location: Stockholm, Sweden

PostPosted: Sat Jan 07, 2006 10:29 am    Post subject: Reply with quote

Kumba,

That explains a lot, thank you for that! It's good to have this understanding of where things have been and where they are headed.

/iMike
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum