Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo in a Xserve (G5)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
spiv
n00b
n00b


Joined: 13 Sep 2003
Posts: 21
Location: Mexico City

PostPosted: Fri Feb 25, 2005 11:52 pm    Post subject: Gentoo in a Xserve (G5) Reply with quote

Hi this is an account of my journey to install Gentoo in a Xserve machine and in particular of getting the IBM XL Fortran Advanced Editon Compiler run in gentoo.
First I dowloaded the minimal install CD 2004.3 for ppc64 and compared checksums and digital signatures, all was right and fine. All the initial installation from booting the CD until the end of the installation guide was uneventful and pretty smooth. I used only -O2 for optimization flags and set the arch to ppc64, in fact so nice was the install the only problem I got was a bad checksum in a file of gcc-config.
I emerged this kernel: gentoo-dev-sources-2.6.9-r9 and used the config of the livecd for a template to custom my kernel. Here I got to first trouble the Xserve was so noisy that was like a rocket ready to launch, all of it fans were running at top speed all the time. So I searched for a patch that could handle the thermal control in the Xserves and I came with this: http://ozlabs.org/ppc32-patches/patch.pl?id=200, this patches are based in the vanilla 2.8.10 kernel so I had to download the vanilla kernel and pull the 2 files then patch them and replace the ones in the gentoo-dev kernel. This patch is a real life saver the kernel is rock solid and the noise and thermal managmente is almost equal to OSX.
After getting a minimal system installed emacs,vim,nmap,gdb,pciutils,lynx,gentoolkit,lam-mpi,xorg-x11 and rpm (really sad about this one).
Well I need more than 2 GB for the application that are going to run on this machine so that clears any thought about using a 32-bit kernel, but I need still a 32-bit userland for running the compiler because it is in 32-bits (it can output 32 or 64 bits code the default will be 64) this is the first major problem I faced because it was evident gentoo ppc has no biarch support right now the use of a symlink from lib64 to lib was all I got to see to understand this. This was very bad because if I wanted to install a 32-bit glibc and etal I will install to lib and will overwrite my 64-bit libs and bork the machine. So I rebooted with the LiveCD removed the symlink, mkdir lib64 and moved all the libs then finally chrooted to check that all was fine.
So I had lib ready to accept my 32-bit userland no the problem was to get one. I tried first the gentoo way first setting multitarget to binutils (crosscompiling support but doesnt work with gas so what use it is really?) I got a biarch gcc already so the next step was getting a powerpc linux headers so I could compile glibc for powerpc, first time died because the build told me I need a more recent binutils I emerge the last version that had the ~ppc64 keyword and tried again. This time it worked and tried to build glibc but It died with a assambler error (finally gas not crosscompiling got me)
Then I tried using the set of scripts from http://www.penguinppc.org but died building the 64-bit static glibc but I got a 32-bit static glibc I used it to get a 32-bit userland to run the compiler but the damn compiler checks internally using rpm if the whole compiler set of rpms are installed so I had to emerge rpm and installed them using rpm to fool the compiler, but was worthless because all dies with his type of error:

Code:

postmortem.o(.text+0x1c): In function `.main':
: undefined reference to `.reset_exception_bits'
postmortem.o(.text+0x8c): In function `.main':
: undefined reference to `.query_exception_bits'


Code:

alice floating_point # ../../bin/xlf -q64 -qarch=ppc64 fhandler.F
** fhandler   === End of Compilation 1 ===
1501-510  Compilation successful for file fhandler.F.
/usr/lib/gcc/powerpc64-unknown-linux-gnu/3.4.3/../../../../lib64/crt1.o(.data.rel.ro.local+0x8): undefined reference to `main'


So in conclusion I am really pleased wih gentoo and the hard work of the people making this possible the only grip I have is the decision of making /lib64 a symlink to /lib it only did a effort to get a biarch system harder. But alas I am like Frodo when he gets to Mount Doom and cant throw the One Ring to lava but I my case no gollum is in sight so I will have to use Y-HPC that is the only distro that the compiler oficially supports. I so hate rpm ;).

Miscelanea output:
Code:

alice html # cat /proc/cpuinfo
processor       : 0
cpu             : PPC970FX, altivec supported
clock           : 2300.000000MHz
revision        : 3.0

processor       : 1
cpu             : PPC970FX, altivec supported
clock           : 2300.000000MHz
revision        : 3.0

timebase        : 33333333
machine         : RackMac3,1
motherboard     : RackMac3,1 MacRISC4 Power Macintosh
detected as     : 336 (XServe G5)
pmac flags      : 00000000
pmac-generation : NewWorld


Code:

alice html # free
             total       used       free     shared    buffers     cached
Mem:          3912        182       3729          0         39         84
-/+ buffers/cache:         57       3854
Swap:         8191          0       8191


Code:

alice html # lspci
0000:f0:0b.0 Host bridge: Apple Computer Inc.: Unknown device 0059
0001:00:01.0 PCI bridge: Advanced Micro Devices [AMD] AMD-8131 PCI-X Bridge (rev 12)
0001:00:02.0 PCI bridge: Advanced Micro Devices [AMD] AMD-8131 PCI-X Bridge (rev 12)
0001:00:03.0 PCI bridge: Apple Computer Inc. K2 HT-PCI Bridge
0001:00:04.0 PCI bridge: Apple Computer Inc. K2 HT-PCI Bridge
0001:00:05.0 PCI bridge: Apple Computer Inc. K2 HT-PCI Bridge
0001:00:06.0 PCI bridge: Apple Computer Inc. K2 HT-PCI Bridge
0001:00:07.0 PCI bridge: Apple Computer Inc. K2 HT-PCI Bridge
0001:01:07.0 Class ff00: Apple Computer Inc. K2 KeyLargo Mac/IO (rev 60)
0001:02:0b.0 USB Controller: NEC Corporation USB (rev 43)
0001:02:0b.1 USB Controller: NEC Corporation USB (rev 43)
0001:02:0b.2 USB Controller: NEC Corporation USB 2.0 (rev 04)
0001:03:0d.0 Class ff00: Apple Computer Inc. K2 ATA/100
0001:03:0e.0 FireWire (IEEE 1394): Apple Computer Inc. K2 FireWire
0001:05:0c.0 IDE interface: ServerWorks K2 SATA
0001:06:03.0 VGA compatible controller: ATI Technologies Inc Radeon RV100 QY [Radeon 7000/VE]
0001:07:04.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet (rev 03)
0001:07:04.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet (rev 03)
Back to top
View user's profile Send private message
samuraisam
n00b
n00b


Joined: 27 Feb 2005
Posts: 16

PostPosted: Mon Feb 28, 2005 4:43 am    Post subject: Reply with quote

So, how fast is Gentoo on the Mac compared to other high end systems? For a hosting company, I want to use Macs, but being an open source purist/extremist, it would be nice to use an OS like Gentoo if it runs fast enough.

There are, as far as I can see, many advantages to using the Mac hardware. Though, there are with custom-built PC hardware too, I guess it just depends on what's fastest.

-Sam
_________________
SamuraiBlog.com! Intelligent Blogs, intelligent forums!
SamuraiDev.com! The new DevSite!
Back to top
View user's profile Send private message
NewBlackDak
Guru
Guru


Joined: 02 Nov 2003
Posts: 512
Location: Utah County, UT

PostPosted: Thu Mar 03, 2005 2:57 am    Post subject: Reply with quote

I'm using gentoo on an eMac for an email server running Postfix/MySQL/Courier-imap/SSL/Clamav/PostfixAdmin/Apache2/Squirrelmail/OpenLDAP
It serves 5 virtual domains with ~125 users per domain. Noone has ever complained about speed.
All I can say is:
Code:

email root # uptime
 20:51:55 up 128 days, 21:56,  1 user,  load average: 1.11, 1.04, 1.01

_________________
Gentoo systems.
X2 4200+@2.6 - Athy
X2 3600+ - Myth
UltraSparc5 440 - sparcy
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC 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