Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
G5: PPC32 and PPC64: livecds && optimized builds
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
Syzygy
n00b
n00b


Joined: 30 Apr 2004
Posts: 31
Location: Beloit, WI

PostPosted: Fri Apr 30, 2004 4:03 am    Post subject: G5: PPC32 and PPC64: livecds && optimized builds Reply with quote

I've heard a lot of different CFLAGS settings floating around for those with G5 computers. Most people seem to be sticking with -mcpu=powerpc, but I read on another post that a Portage snapshot exists where -mcpu can be set to 970. Is this still around?

In addition, does anyone have any other recommendations to make the system (in order of importance):

1. Stable
2. Wicked fast

Thanks.
_________________
Tim Morgan
DP G5/1.8GHz, no working Gentoo (yet...)
Back to top
View user's profile Send private message
korg
n00b
n00b


Joined: 27 Jan 2004
Posts: 46

PostPosted: Fri Apr 30, 2004 6:00 am    Post subject: Reply with quote

I asked this on:

https://forums.gentoo.org/viewtopic.php?t=166282

but noone has an answer so far. I think its a state secret :-)

Im trying lots of flags, but so far nothing has turned out stable at all. :-(

Im building with
cflags="-pipe"
and Ill see how that goes.... :)
Back to top
View user's profile Send private message
Syzygy
n00b
n00b


Joined: 30 Apr 2004
Posts: 31
Location: Beloit, WI

PostPosted: Fri Apr 30, 2004 7:04 am    Post subject: Reply with quote

Thanks korg. Do you have any idea as to which download is most stable? Floating around I see stage2 and stage3 for G5, stage1 through stage3 for PPC64, and other tars specifically for 3.3+ versions of GCC (which, supposedly, support the mcpu=970 tag). Kinda confused as to which one I'm supposed to be using... :)
_________________
Tim Morgan
DP G5/1.8GHz, no working Gentoo (yet...)
Back to top
View user's profile Send private message
korg
n00b
n00b


Joined: 27 Jan 2004
Posts: 46

PostPosted: Fri Apr 30, 2004 9:18 am    Post subject: Reply with quote

Nope no idea. :-/

Ive tried stages 1,2 and 3 and I get the same behaviour, so it's either me, or something that works for the developers and not 'noobies' :).

Ive added more to my thread on this... (with where Im upto in trying all the combinations that I can find of things :-/ )
Back to top
View user's profile Send private message
Syzygy
n00b
n00b


Joined: 30 Apr 2004
Posts: 31
Location: Beloit, WI

PostPosted: Sat May 01, 2004 6:22 am    Post subject: Reply with quote

OK, some hunting shows a current state of affairs:

At metadistribution.org we find the release verison of the 2004.1 LiveCD's. They claim to be able to boot G3 through G5, but they suggest using an experimental stage set with GCC 3.3.3 for those who want to optimize for G5.

At http://dev.gentoo.org/~tgall/ we find a 2004.1 LiveCD specifically for the G5 that predates the release, and a PPC64 stage set that also predates the release.

We also have this statement:

Quote:
I recommend also putting ppc64 in the keywords for gcc 3.4 and building that. You'll need to unmask a newer binutils and remove the binutils reference in /usr/portage/profiles/package.mask but it seems to work very well.


I honestly have little idea what it means (although I'm assuming unmasking has something to do with emerge options), and given the datedness of the site, I'm going to go ahead and ignore it for now.

Given this, I will try to boot from the 2004.1 release LiveCD, and then install the GCC 3.3.3 stage set. We'll see how it goes. (See you on lynx!)
_________________
Tim Morgan
DP G5/1.8GHz, no working Gentoo (yet...)
Back to top
View user's profile Send private message
korg
n00b
n00b


Joined: 27 Jan 2004
Posts: 46

PostPosted: Sat May 01, 2004 1:36 pm    Post subject: Reply with quote

My personal experiance with gentoo on a g5 is actually kind of a nightmare.

Ive compiled from stage1 about 20 times now with every different stage I can find (and there are lots) and lots of different cflags/chost to try and get it working.

pvdabeel said:
That's the 64bit version. Still very experimental. Try the 32bit
version that one is stable on G5.

:-(
Back to top
View user's profile Send private message
korg
n00b
n00b


Joined: 27 Jan 2004
Posts: 46

PostPosted: Sat May 01, 2004 1:55 pm    Post subject: Reply with quote

[ edited out build problems with ppc32 stages under a ppc64 kernel. Dispite the fact that ppc64 kernels will run ppc32 programs, uname returns a ppc64 value, so some programs use this rather than chost it seems. I think this was my problem.]

[Im going to try again with ppc64 and setting "ppc64 ~ppc64" and see if that goes any better]

[The following would still be useful from g5 owners who got it all working :) ]

If anyone has had _ANY_ luck getting a G5 to install could they please post here and include:

* the cd they booted from
* the stage/tarball they built from
* the chost/cflags they used.

Id like to hear that atleast _one_ person has got this going so that I know its not just me going insane......


Last edited by korg on Mon May 03, 2004 7:23 am; edited 1 time in total
Back to top
View user's profile Send private message
Syzygy
n00b
n00b


Joined: 30 Apr 2004
Posts: 31
Location: Beloit, WI

PostPosted: Sat May 01, 2004 8:02 pm    Post subject: Reply with quote

OK, I'm installing it with the 2004.1 universal ISO and the prerelease GCC 3.3.3 stage set (stage 2, in particular, but that doesn't matter here.)

Problem is, I can't get a package list. "emerge sync" dies, and "emerge-rwebsync" panics the kernel. Downloading and untarring the package list manually from metadistribution.org yields the same kernel panic. The data is as follows:

It happens when untarring portage/app-xemacs/eshell/files/digest-eshell-1.03

The error occurs is dma_trm_tasklet+0xf8/0x1c8 [ohci1394]

It's worth noting that I'm attempting to install on an external FireWire hard drive... Anyone else have similar issues/solutions?
_________________
Tim Morgan
DP G5/1.8GHz, no working Gentoo (yet...)
Back to top
View user's profile Send private message
pvdabeel
Retired Dev
Retired Dev


Joined: 25 Mar 2003
Posts: 188
Location: Belgium

PostPosted: Sun May 02, 2004 12:36 am    Post subject: Reply with quote

Hi,

As you know the G5 can run in either 32bit or 64bit mode. Apple for instance runs its operating system in 32bit on the G5. Gentoo Linux on the other hand can be run in both 32 or 64bit mode on the G5. We are the first Linux distro to provide people with -real- 64bit ppc stuff.

The 2004.0 and 2004.1 universal-ppc livecds boot your G5 in 32bit mode, and you're able to install Gentoo in 32bit mode. The safest, but fastest CFLAGS for gcc-3.2.3 are: -O3 -mcpu=powerpc -mabi=altivec -maltivec -fno-strict-aliasing -pipe. Gcc-3.2.3 hasn't got a functional -mcpu=G5 (or -mcpu=970 if you prefer numbers), however we have a gcc-3.3.3 ebuild in testing, that supports -mcpu=970. If you unmask the latest gcc-3.3.3 pre snapshot, you're able to build G5 optimized stuff, starting from a stage1. I have also provided experimental G5 optimized (32bit) stages on both http://www.metadistribution.org/gentoo/ or http://dev.gentoo.org/~pvdabeel/experimental/. These stages are called experimental because there is one ebuild that doesn't compile perfect yet (qt), but for the rest they are stable. Once I figure out the qt bug, I'll build G5 optimized GRP. In any case 2004.2 will have G5 optimized GRP. Keep watching the sites mentioned earlier for pre-release stuff. One important thing to mention about gcc-3.3.3 is that it requires the -fno-strict-aliasing flag in your CFLAGS.

Now, as you may have noticed there is also a universal-ppc64 floating around on my homepages. This livecd is the first ppc64 (64bit) livecd. It currently is only G5 compatible, but we're working on making it compatible with IBMs supercomputers. Both me and Tom Gall (who also works at IBM) are working on this. The ppc64 stages that can be found on our homepages, were build using an early gcc-3.3.3 snapshot (an older one than the one I used to build 32bit optimized G5 stages). Tom is currently updating the stages, and we're hoping to do an official (test?) release quite soon.

What's the difference between ppc64 and ppc32 in gentoo/ppc world? Well, currently ppc32 is much more mature, while ppc64 is a bit more adventurous, but I expect both to be at the same level of quality quite soon. PPC64 can run PPC32 code, but not the other way around.
We have a separate keyword because some things on ppc64 are slightly different, there may be bugs that happen on ppc64 but not in ppc32 land, the bootloader for instance differs slightly, and of course core packages such as the compiler and glibc require some patches not needed on ppc32. Tom has promised to do run some benchmarks and put them on the homepage.

Please take into account that the 32bit livecd cannot really easily be used to perform a 64bit installation. The 64bit livecd can be used to do a 32bit installation, but note that the 64bit livecd kernel (2.6.6_pre) is less stable than the (2.6.5) 32bit kernel, this may render installation a bit difficult.

Best regards,

Pieter Van den Abeele
Back to top
View user's profile Send private message
Syzygy
n00b
n00b


Joined: 30 Apr 2004
Posts: 31
Location: Beloit, WI

PostPosted: Sun May 02, 2004 1:58 am    Post subject: Reply with quote

Thanks for the status report... now that I have things cleared up, I went ahead and downloaded the ppc64 LiveCD. I realize it's really prerelease, and I certainly expected to do a little hair-pulling in order to get it to work, but the error I'm getting is pretty terminal.

I boot from the CD, launch G5-SMP just fine, and the kernel loads, and loads, and loads... and then crashes. It tries to mount the RAM disk but it can't find it at address 0. Then it panics when the RAM disk remains unmounted.

Have you encountered this before, or is there some configuration step I'm missing?

By the way, I went ahead and donated to your guys's development, under the realization that writing a 64-bit operating system isn't exactly a cakewalk.
_________________
Tim Morgan
DP G5/1.8GHz, no working Gentoo (yet...)
Back to top
View user's profile Send private message
pvdabeel
Retired Dev
Retired Dev


Joined: 25 Mar 2003
Posts: 188
Location: Belgium

PostPosted: Sun May 02, 2004 4:37 pm    Post subject: Reply with quote

Syzygy wrote:
Thanks for the status report... now that I have things cleared up, I went ahead and downloaded the ppc64 LiveCD. I realize it's really prerelease, and I certainly expected to do a little hair-pulling in order to get it to work, but the error I'm getting is pretty terminal.

I boot from the CD, launch G5-SMP just fine, and the kernel loads, and loads, and loads... and then crashes. It tries to mount the RAM disk but it can't find it at address 0. Then it panics when the RAM disk remains unmounted.

Have you encountered this before, or is there some configuration step I'm missing?

By the way, I went ahead and donated to your guys's development, under the realization that writing a 64-bit operating system isn't exactly a cakewalk.


Keep watching http://dev.gentoo.org/~tgall/ for updates :-)
Back to top
View user's profile Send private message
korg
n00b
n00b


Joined: 27 Jan 2004
Posts: 46

PostPosted: Mon May 03, 2004 6:53 am    Post subject: Reply with quote

Outstanding problems
=================

* g5 ppc32: vim emerge doesnt work (can someone else check this?) (Is this an sign of underlying problems or just a vim bug?)

* g5 ppc64: boot cd for ppc64 has fdisk _NOT_ mac-fdisk so you cant partition your mac disk. [fix: use the ppc32 disk to partition, then reboot with the ppc64 disk].

* kernel build instructions are... well somewhat confusing. I _THINK_ the best advice so far is to get it directly as discussed here https://forums.gentoo.org/viewtopic.php?t=164932 (Can someone confirm this as the best way to get a g5 kernel built?)

* ppc64 bootstrap-2.6.sh failed. :-/ (well it got _most_ of the way there ;) but not quite finished ;-). Pity :)

ppc32 for g5 built
==============

Well, I just finished installing from...

install-ppc-minimal-2004.1.iso
stage2-g5-20040420.tar.bz2

with the following in /etc/make.conf

#CFLAGS="-O3 -mcpu=powerpc -pipe"
CFLAGS="-O1 -mcpu=powerpc -pipe"
CHOST="powerpc-unknown-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j3"
USE="-emacs -ppc64"

Everything seems to pretty well work, except for a few issues listed below.

problems
----------

Im back to being unable to build vim. Last time I got to this point I managed to compile vim by:
1) recompiling gcc & glibc without any -O flag
2) just extracting the source tar and compiling it myself without gentoo's emerge patching vim.

Using the above above, Ive even got X compiled :) although configging it was a bastard. Xeasyconfig gave me 1152x768 which looked dumb on my 1024x768 lcd, so I ended up not using that. But xf86config managed to get the right frequency, although I had to manually edit in my mouse setting into the XF86config.

I have not compiled a kernel yet. Im using the 2.6.6-rc1-ames kernel from the ppc64 cd. Because Im running a kernel that reports its arch as ppc64, Ive had to write a replacement for [/usr]/bin/uname which sed's out the 64 from ppc64 to get a couple of packages to compile (hermes leaps to mind as one). It's an ugly hack, but *shrugs*.


Building ppc64 from stage1
===================
OK, so Im runninga ppc64 kernel:

Linux kali 2.6.6-rc1-ames #2 SMP Sat Apr 24 23:39:57 Local time zone must be set--see zic ppc PPC970, altivec supported PowerMac7,2 GNU/Linux

with make.conf:

CFLAGS="-O2 -mcpu=970 -mabi=altivec -maltivec -fno-strict-aliasing -pipe"
CHOST="powerpc64-unknown-linux-gnu"
CXXFLAGS="${CFLAGS}"
USE="ppc64"
MAKEOPTS="-j2"

and I just tar extracted:

stage1-ppc64-20040430.tar.bz2

(and mounted /dev, /proc, /sys, etc) and I run bootstrap-2.6.sh and it gets up to compiling perl and then I get:

CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -O2 -mcpu=970 -mabi=altivec -maltivec -fno-strict-aliasing -pipe -Wall
`sh cflags "optimize='-O2 -mcpu=970 -mabi=altivec -maltivec -fno-strict-aliasing -pipe'" pp_sort.o` -fPIC pp_sort.c
CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -O2 -mcpu=970 -mabi=altivec -maltivec -fno-strict-aliasing -pipe -Wall
gcc -o libperl.so.1.5.8 -L/usr/local/lib perl.o gv.o toke.o perly.o op.o pad.o regcomp.o dump.o util.o mg.o reentr.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o xsutils.o globals.o perlio.o perlapi.o numeric.o locale.o pp_pack.o pp_sort.o -lnsl -ldl -lm -lcrypt -lutil -lc -lbsd -Wl,-soname -Wl,libperl.so.`echo libperl.so.1.5.8 | cut -d. -f3`
/usr/lib/gcc-lib/powerpc64-unknown-linux-gnu/3.3.3/../../../../lib64/crt1.o(.data.rel.ro.local+0x8): undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [libperl.so.1.5.8] Error 1

!!! ERROR: sys-devel/libperl-5.8.2 failed.
!!! Function src_compile, Line 206, Exitcode 2
!!! Unable to make libperl.so

It's doing the ncurses line in the bootstrap-2.6.sh, and emerge says that it has the following left:

[ebuild N ] sys-devel/libperl-5.8.2 +berkdb +gdbm -threads 0 kB
[ebuild N ] dev-lang/perl-5.8.2-r1 +berkdb -doc +gdbm -threads 0 kB
[ebuild N ] sys-devel/autoconf-2.58-r1 0 kB
[ebuild N ] sys-devel/libtool-1.5.2-r5 0 kB
[ebuild R ] sys-libs/ncurses-5.4-r1 -debug 0 kB

Interestingly Im not getting:

kali G5 # uname -a
Segmentation fault

Which is never a good sign :-).

Does anyone have any ideas?
Back to top
View user's profile Send private message
pvdabeel
Retired Dev
Retired Dev


Joined: 25 Mar 2003
Posts: 188
Location: Belgium

PostPosted: Mon May 03, 2004 2:11 pm    Post subject: Reply with quote

korg wrote:
* g5 ppc32: vim emerge doesnt work (can someone else check this?) (Is this an sign of underlying problems or just a vim bug?)


run ldconfig before emerging vim. vim-r8 is supposed to solve this, but not in ppc-stable yet I think.

Quote:
* g5 ppc64: boot cd for ppc64 has fdisk _NOT_ mac-fdisk so you cant partition your mac disk. [fix: use the ppc32 disk to partition, then reboot with the ppc64 disk].


True, forgot about it. But there is parted. Will reroll the cd when I've accumulated a few bugs to fix. (saving bandwidth).


Quote:


32bit:
#CFLAGS="-O3 -mcpu=powerpc -pipe"
CFLAGS="-O1 -mcpu=powerpc -pipe"
CHOST="powerpc-unknown-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j3"
USE="-emacs -ppc64"


Feel free to use -O3 and add -mabi=altivec -maltivec. G5 ppc32 is as stable as G4 32bit stable. It's not that apps that build on a G4 are going to break on a G5. See my post above for the -mcpu=970 or -mcpu=G5 thing, which can also be labeled rather stable, except that it triggers a bug in QT, which until now hasn't been solved and is apparently the only thing between stable G5 optimized 32bit GRP.

Quote:

Everything seems to pretty well work


I have a G5 myself with all packages having a ppc keyword build.

Quote:

I have not compiled a kernel yet. Im using the 2.6.6-rc1-ames kernel from the ppc64 cd. Because Im running a kernel that reports its arch as ppc64, Ive had to write a replacement for [/usr]/bin/uname which sed's out the 64 from ppc64 to get a couple of packages to compile (hermes leaps to mind as one). It's an ugly hack, but *shrugs*.


emerge gentoo-dev-sources is the recommended kernel for 32bit G5.

Imho it doesn't really make sense to use a ppc64 kernel with ppc32 userland. The userland isn't going to use any of the ppc64 stuff. And the ames kernel is at least very very very experimental at this point. The only reason for choosing a ppc64 kernel is to have ppc64 and ppc32 userland mixed, which is something that will make bugs hard to reproduce for us.


Quote:

Building ppc64 from stage1
===================
OK, so Im running a ppc64 kernel:

Linux kali 2.6.6-rc1-ames #2 SMP Sat Apr 24 23:39:57 Local time zone must be set--see zic ppc PPC970, altivec supported PowerMac7,2 GNU/Linux

with make.conf:

CFLAGS="-O2 -mcpu=970 -mabi=altivec -maltivec -fno-strict-aliasing -pipe"

Interestingly Im not getting:

kali G5 # uname -a
Segmentation fault

Which is never a good sign :-).

Does anyone have any ideas?


Yes, Like I said in my post above, -mcpu=G5 currently only works with gcc-3.3.3 in 32bit land.



32bit gentoo/ppc: 32bit kernel + 32 bit userland (generic powerpc) = ROCK SOLID

32bit gentoo/ppc: 32bit kernel + 32 bit userland (gcc 3.3.3 -mcpu=G5) = ROCK SOLID but triggers a bug in QT

64bit gentoo/ppc: 64bit kernel + 64bit userland (generic powerpc) = EXPERIMENTAL

64bit gentoo/ppc: 64bit kernel + 64bit userland (-mcpu=G5) =
MOST EXPERIMENTAL



64bit gentoo/ppc: 64bit kernel + A mix of the userlands = a mix between rock solid and experimental, but very hard to debug for us.
Back to top
View user's profile Send private message
korg
n00b
n00b


Joined: 27 Jan 2004
Posts: 46

PostPosted: Tue May 04, 2004 3:16 am    Post subject: Reply with quote

pcc32 on g5 from stage1
----------------------------

Im trying to build with -mcpu=g5 which means that I have to do:

mkdir /etc/portage
echo '=sys-devel/gcc-3.3.3_pre20040426' > /etc/portage/package.unmask

but then it looks for gcc-20040426.tar.bz2 which none of the mirrors seems to have that file.

It finds sys-devel/gcc-3.3.3_pre20040408-r1 ok.



2004.1 bootcd
----------------
On the g5, the cd definatly hangs on reboot after failing to unmount filesystems (this is without doing an install and mounting /mnt/gentoo/proc or anything like that).
Back to top
View user's profile Send private message
tgall_foo
n00b
n00b


Joined: 24 Dec 2003
Posts: 7
Location: Mantorville Mn, Earth

PostPosted: Tue May 04, 2004 4:22 am    Post subject: ppc64 optimizations Reply with quote

Quote:

Quote:
* g5 ppc64: boot cd for ppc64 has fdisk _NOT_ mac-fdisk so you cant partition your mac disk. [fix: use the ppc32 disk to partition, then reboot with the ppc64 disk].


True, forgot about it. But there is parted. Will reroll the cd when I've accumulated a few bugs to fix. (saving bandwidth).



Actually the current ppc64 stages (and next live cds) have macfdisk as well. You can certainly emerge mac-fdisk right now.

Quote:

Quote:


32bit:
#CFLAGS="-O3 -mcpu=powerpc -pipe"
CFLAGS="-O1 -mcpu=powerpc -pipe"
CHOST="powerpc-unknown-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j3"
USE="-emacs -ppc64"


Feel free to use -O3 and add -mabi=altivec -maltivec. G5 ppc32 is as stable as G4 32bit stable. It's not that apps that build on a G4 are going to break on a G5. See my post above for the -mcpu=970 or -mcpu=G5 thing, which can also be labeled rather stable, except that it triggers a bug in QT, which until now hasn't been solved and is apparently the only thing between stable G5 optimized 32bit GRP.

Quote:

Everything seems to pretty well work


I have a G5 myself with all packages having a ppc keyword build.

Quote:

I have not compiled a kernel yet. Im using the 2.6.6-rc1-ames kernel from the ppc64 cd. Because Im running a kernel that reports its arch as ppc64, Ive had to write a replacement for [/usr]/bin/uname which sed's out the 64 from ppc64 to get a couple of packages to compile (hermes leaps to mind as one). It's an ugly hack, but *shrugs*.


There's a tool so you don't have to do that ;-) It's called powerpc32 and well ... you guess what it does :-)

Quote:

emerge gentoo-dev-sources is the recommended kernel for 32bit G5.

Imho it doesn't really make sense to use a ppc64 kernel with ppc32 userland. The userland isn't going to use any of the ppc64 stuff. And the ames kernel is at least very very very experimental at this point. The only reason for choosing a ppc64 kernel is to have ppc64 and ppc32 userland mixed, which is something that will make bugs hard to reproduce for us.


However in reality you're insane if you're runing a 32 bit kernel on a g5. No one is really putting any time into the 32 bit ppc kernel for the g5. Not even ben. He recommends ppc64 as do I. Then the choice is 32 or 64 bit user space. And there I would say 32 is nice, stable and feature rich. PPC64 is experimental.. but fun.

Quote:

Quote:

Building ppc64 from stage1
===================
OK, so Im running a ppc64 kernel:

Linux kali 2.6.6-rc1-ames #2 SMP Sat Apr 24 23:39:57 Local time zone must be set--see zic ppc PPC970, altivec supported PowerMac7,2 GNU/Linux

with make.conf:

CFLAGS="-O2 -mcpu=970 -mabi=altivec -maltivec -fno-strict-aliasing -pipe"

Interestingly Im not getting:

kali G5 # uname -a
Segmentation fault

Which is never a good sign :-).

Does anyone have any ideas?


Yes, Like I said in my post above, -mcpu=G5 currently only works with gcc-3.3.3 in 32bit land.

With 3.3, -mcpu=g5 or -mcpu=970 doesn't work. But -mcpu=power4 does. (IIRC)

Quote:

32bit gentoo/ppc: 32bit kernel + 32 bit userland (generic powerpc) = ROCK SOLID

32bit gentoo/ppc: 32bit kernel + 32 bit userland (gcc 3.3.3 -mcpu=G5) = ROCK SOLID but triggers a bug in QT

64bit gentoo/ppc: 64bit kernel + 64bit userland (generic powerpc) = EXPERIMENTAL


I've used
-mtune=power3 to good effects. gcc for instance is ~33% faster.

-mtune=power4 should also be quite valid. I'll have to try that on my dual 970. That is actually valid for 970.

Quote:

64bit gentoo/ppc: 64bit kernel + 64bit userland (-mcpu=G5) =
MOST EXPERIMENTAL



64bit gentoo/ppc: 64bit kernel + A mix of the userlands = a mix between rock solid and experimental, but very hard to debug for us.

[/quote]
Naw. I run mixed 32 with 64 bit user lands that I chroot into. Works well. Tho soon as xorg builds on ppc64, I'll run the other way around.
Back to top
View user's profile Send private message
korg
n00b
n00b


Joined: 27 Jan 2004
Posts: 46

PostPosted: Tue May 04, 2004 5:43 am    Post subject: Re: ppc64 optimizations Reply with quote

tgall_foo wrote:

Actually the current ppc64 stages (and next live cds) have macfdisk as well. You can certainly emerge mac-fdisk right now.


:) Ive found that I usually need mac-fdisk before I have a place to extract the stages :) :) :).


Quote:

There's a tool so you don't have to do that ;-) It's called powerpc32 and well ... you guess what it does :-)


Sorry, is this is in some package or do you mean I should stop abusing the system and just boot to a ppc32 kernel? Or is it a chost value? :)


Quote:

Quote:

emerge gentoo-dev-sources is the recommended kernel for 32bit G5.

Imho it doesn't really make sense to use a ppc64 kernel with ppc32 userland. The userland isn't going to use any of the ppc64 stuff. And the ames kernel is at least very very very experimental at this point. The only reason for choosing a ppc64 kernel is to have ppc64 and ppc32 userland mixed, which is something that will make bugs hard to reproduce for us.


However in reality you're insane if you're runing a 32 bit kernel on a g5. No one is really putting any time into the 32 bit ppc kernel for the g5. Not even ben. He recommends ppc64 as do I. Then the choice is 32 or 64 bit user space. And there I would say 32 is nice, stable and feature rich. PPC64 is experimental.. but fun.



So, im insane for running kernel64/user32 but conversly im insane if I run kernel32 :). Excellent :).

So, running a ppc64 kernel and a ppc32 userspace _is_ ok then? :-/


Quote:

Quote:

Yes, Like I said in my post above, -mcpu=G5 currently only works with gcc-3.3.3 in 32bit land.


With 3.3, -mcpu=g5 or -mcpu=970 doesn't work. But -mcpu=power4 does. (IIRC)

I've used
-mtune=power3 to good effects. gcc for instance is ~33% faster.

-mtune=power4 should also be quite valid. I'll have to try that on my dual 970. That is actually valid for 970.


33% faster than... ? -mcpu=powerpc or mcpu=g5? :^) :)

Actually, now im totally confused about what flags to use :) haha.



Quote:

Quote:

64bit gentoo/ppc: 64bit kernel + A mix of the userlands = a mix between rock solid and experimental, but very hard to debug for us.


Naw. I run mixed 32 with 64 bit user lands that I chroot into. Works well. Tho soon as xorg builds on ppc64, I'll run the other way around.
[/quote]

I sense some dissagreement :) :).

But Im glad someone else is going for kernel64 + user32 [ + user64 test ] :)
Back to top
View user's profile Send private message
tgall_foo
n00b
n00b


Joined: 24 Dec 2003
Posts: 7
Location: Mantorville Mn, Earth

PostPosted: Tue May 04, 2004 1:53 pm    Post subject: Re: ppc64 optimizations Reply with quote

korg wrote:
tgall_foo wrote:

Actually the current ppc64 stages (and next live cds) have macfdisk as well. You can certainly emerge mac-fdisk right now.


:) Ive found that I usually need mac-fdisk before I have a place to extract the stages :) :) :).



hmm good point! That's what I get for replying late at night! Anyway just grab a new ppc64 stage, those have mac-fdisk on them now. I have the livecd stage1 built so just a matter of "final" assembly and there will be new livecds to boot.

Quote:

Quote:

There's a tool so you don't have to do that ;-) It's called powerpc32 and well ... you guess what it does :-)


Sorry, is this is in some package or do you mean I should stop abusing the system and just boot to a ppc32 kernel? Or is it a chost value? :)



It's actually a tool! so :

powerpc32 uname -a

will return a ppc system, not ppc64. It's handy for configure, portage and other tools, especially when you want them to think and act 32 bit and not get confused with the kernel. Handy stuff! It's on ftp.linuxppc64.org/pub/people/tgall

Quote:

Quote:


However in reality you're insane if you're runing a 32 bit kernel on a g5. No one is really putting any time into the 32 bit ppc kernel for the g5. Not even ben. He recommends ppc64 as do I. Then the choice is 32 or 64 bit user space. And there I would say 32 is nice, stable and feature rich. PPC64 is experimental.. but fun.



So, im insane for running kernel64/user32 but conversly im insane if I run kernel32 :). Excellent :).

So, running a ppc64 kernel and a ppc32 userspace _is_ ok then? :-/



No I think you're quite sane running a 64 bit kernel with 32 bit user space, espeically on a g5 or other rs/6000 or pseries hardware.

Quote:

Quote:

Quote:

Yes, Like I said in my post above, -mcpu=G5 currently only works with gcc-3.3.3 in 32bit land.


With 3.3, -mcpu=g5 or -mcpu=970 doesn't work. But -mcpu=power4 does. (IIRC)

I've used
-mtune=power3 to good effects. gcc for instance is ~33% faster.

-mtune=power4 should also be quite valid. I'll have to try that on my dual 970. That is actually valid for 970.


33% faster than... ? -mcpu=powerpc or mcpu=g5? :^) :)

Actually, now im totally confused about what flags to use :) haha.



The comparison was thus.

gcc targeting ppc64, running as a 64 bit application is 33% faster than gcc targeting ppc64 running as a 32 bit application.

pvdabeel can advise you as to the proper settings for ppc32.

For ppc64 on a g5 I'd set -mtune=power4 (for gcc 3.3-hammer) Tho I'll try this myself here in the next couple of days and do some comparisons.

-mtune=power3 I KNOW works. Least if you're on power3 hardware :-)

-mcpu=powerpc is effectively generic, so it's not that exciting least from a tuning/optimization perspective.

Note for my ppc64 settings I recommend, I suggest -mtune, NOT -mcpu. -mcpu is missimplemented and impies ppc32 at the moment!

Quote:

Quote:

Quote:

64bit gentoo/ppc: 64bit kernel + A mix of the userlands = a mix between rock solid and experimental, but very hard to debug for us.

Naw. I run mixed 32 with 64 bit user lands that I chroot into. Works well. Tho soon as xorg builds on ppc64, I'll run the other way around.


I sense some dissagreement :) :).

But Im glad someone else is going for kernel64 + user32 [ + user64 test ] :)


No we're not in disagreement, pvdabeel and I have much the same goals. At the end of the day we have a passion for the ppc/ppc64 architecture and our dedication is that the gentoo experience on these architectures will be fabulous no matter what hardware you have.
Back to top
View user's profile Send private message
pvdabeel
Retired Dev
Retired Dev


Joined: 25 Mar 2003
Posts: 188
Location: Belgium

PostPosted: Tue May 04, 2004 10:56 pm    Post subject: Re: ppc64 optimizations Reply with quote

Quote:

However in reality you're insane if you're runing a 32 bit kernel on a g5. No one is really putting any time into the 32 bit ppc kernel for the g5. Not even ben. He recommends ppc64 as do I. Then the choice is 32 or 64 bit user space. And there I would say 32 is nice, stable and feature rich. PPC64 is experimental.. but fun.


I think the difference in stability is also still noticeable at a kernel level, which is why I chose to recommend 32bit kernel for people wanting to use a G5 in a production environment. The kernel can still be updated to PPC64 later on, when it produces less oopses.

I completely agree with your argument for 32/64 mixed userland.


Quote:

With 3.3, -mcpu=g5 or -mcpu=970 doesn't work. But -mcpu=power4 does. (IIRC)


It seems to be rather solid on ppc32. Only qt segfaults during compilation. I am going to try and build optimized GRP sets for 32bit land.

Quote:

I've used
-mtune=power3 to good effects. gcc for instance is ~33% faster.

-mtune=power4 should also be quite valid. I'll have to try that on my dual 970. That is actually valid for 970.


Wasn't the power instructionset a superset of powerpc? I thought that powerpc was a scaled down version of POWER (some really exotic instructions removed.) Not sure how big the difference between POWER and POWERPC with the advent of 970 nowadays is. (Is my assumption that Power4 = 970 but 2 cores on dye and a larger cache (32M?), correct?)
Back to top
View user's profile Send private message
korg
n00b
n00b


Joined: 27 Jan 2004
Posts: 46

PostPosted: Fri May 07, 2004 6:13 am    Post subject: Reply with quote

[Ok, everything is up to date... everything is the same (sdiff fails, tcpdump doesnt build)]

Status update
===========

I thought Id post on the status of my G5 :) (ppc64 kernel + ppc32 userland).

Things are runniing along fine! Ive got X and lots of other horrid stuff going just fine :). (galeon, windowmaker, Eterms, xscreensaver).

The video is dog slow, but I havnt compiled a kernel yet, so *shrugs* that might be responsible for that ;-). Im more a command line user, so things that say 'opengl not supported' just hurt my head ;-)

Im running stage3-g5-20040420.tar.bz2 and the kernel from the ppc64 cd + its modules. it all seems to be working fine so far :).

problems
=======

sdiff
-----
echo "foo\nmoo\npoo\n" > /tmp/foo.n
echo "foo\nmoo\ngoo\npoo\n" > /tmp/foo.y
sdiff /tmp/foo.?

seems to hang, but and "strace sdiff ..." shows that it is outputting lots of tabs. Can someone else try this?

Actually, diff is behaving differently to how it does normally. It isnt giving '< line' type output, but rather '! line' which is just odd.

It seems that I have to use diff --normal to get the 'normal' diff output.

Actually, building the raw /usr/portage/distfiles/diffutils-2.8.4.tar.gz by hand (without emerge) gives the same result, which is just too weird.





nmh
----
nmh is masked for ppc but it builds and works fine (so far :). I can send and read and all that stuff. It does require vi, even though I have vim installed. Hmmm.

Eterm
------
The Eterm terminal info is not in /etc/termcap and the intotocap fails to convert it:

infotocap /usr/share/terminfo/E/Eterm
"/usr/share/terminfo/E/Eterm", line 1, col 1: Illegal character (expected alphanumeric or @%&*!#) - ^Z

I just changed my useflags to use terminfo and rebuilt zsh/screen and it's happy, but still... :)

(there is an eterm entry, but it's for emacs not Eterm)

tcpdump
---------
Fails to build on linking with....

tcpdump.o(.text+0x64a): In function `main':
: undefined reference to `pcap_debug'
tcpdump.o(.text+0x64e): In function `main':
: undefined reference to `pcap_debug'
collect2: ld returned 1 exit status
make: *** [tcpdump] Error 1

and I cant figure out why that is.

imwheel
---------
again, its masked, but it seems to work fine.

where should i report these?
--------------------------------
Where should I report these package things? Here to get verification or just submit them to the bugtracker?


Last edited by korg on Tue May 11, 2004 2:10 am; edited 1 time in total
Back to top
View user's profile Send private message
NetSyphon
n00b
n00b


Joined: 10 Apr 2004
Posts: 5
Location: VA,US

PostPosted: Mon May 10, 2004 6:12 pm    Post subject: Reply with quote

i cant get past the ramdisk thing "unable to mount ram" or something like that.. i spent all weekend working on it..

what i dont see is why waste our time installing a 32-bit OS. the whole reason i want this is to see what things would be like in native 100% 64! i did see that it works for some people and i dont know yet why it doesnt work for me.. i am new to apple hardware pretty much but i install gentoo on pc's without needing the handbook anymore..

so i just ask, when should i check back for 64 userland and 64 kernel? has that yellowdog thing already done it? is there anything i can do as a g5 owner to help the project out?


rock on mac lovas
Back to top
View user's profile Send private message
aarestad
n00b
n00b


Joined: 09 Jan 2004
Posts: 32
Location: Chicago, USA

PostPosted: Mon May 10, 2004 11:31 pm    Post subject: Re: ppc64 optimizations Reply with quote

tgall_foo wrote:

hmm good point! That's what I get for replying late at night! Anyway just grab a new ppc64 stage, those have mac-fdisk on them now. I have the livecd stage1 built so just a matter of "final" assembly and there will be new livecds to boot.


Pardon my ignorance, but how does this work on a fresh install? I just got a shiny new 80 gig HD for my G5 and would like to install Gentoo on it. I have the mini-install-universal-ppc64-2004.1 disk. How do I go about grabbing mac-fdisk on initial install?

(Again, sorry for the ignorance. I want to be smart, really! :oops:)
_________________
During times of universal deceit, telling the truth becomes a revolutionary act.
--George Orwell
Back to top
View user's profile Send private message
korg
n00b
n00b


Joined: 27 Jan 2004
Posts: 46

PostPosted: Tue May 11, 2004 1:36 am    Post subject: Re: ppc64 optimizations Reply with quote

aarestad wrote:

Pardon my ignorance, but how does this work on a fresh install? I just got a shiny new 80 gig HD for my G5 and would like to install Gentoo on it. I have the mini-install-universal-ppc64-2004.1 disk. How do I go about grabbing mac-fdisk on initial install?


Try using:

install-ppc-minimal-2004.1.iso

(the ppc32 boot cd) to boot from and fdisk your hard disk. Then reboot with the ppc64 cd and just skip the fdisk stage (because you already did it :).
Back to top
View user's profile Send private message
korg
n00b
n00b


Joined: 27 Jan 2004
Posts: 46

PostPosted: Tue May 11, 2004 1:42 am    Post subject: Reply with quote

NetSyphon wrote:
i cant get past the ramdisk thing "unable to mount ram" or something like that.. i spent all weekend working on it..


What cd are you using?

Quote:

what i dont see is why waste our time installing a 32-bit OS. the whole reason i want this is to see what things would be like in native 100% 64! i did see that it works for some people and i dont know yet why it doesnt work for me.. i am new to apple hardware pretty much but i install gentoo on pc's without needing the handbook anymore..

so i just ask, when should i check back for 64 userland and 64 kernel? has that yellowdog thing already done it? is there anything i can do as a g5 owner to help the project out?

rock on mac lovas


The install process is still a little magical. :)

The reason for using ppc32 base system is that the ppc64 software is still 'exciting' to use :).

My thinking was that Id run a ppc64 kernel (mostly stable) and a ppc32 base system (stable) and install a ppc64 base system and chroot into it (for 64/64 bit) for my experimental builds. That way, my base software would be stable, and the worst that could happen would be that my experimental compiles/chroot would die (no great loss).

When 64 base system becomes stable, Id just switch over to that and ditch the ppc32.
Back to top
View user's profile Send private message
NetSyphon
n00b
n00b


Joined: 10 Apr 2004
Posts: 5
Location: VA,US

PostPosted: Tue May 11, 2004 3:06 am    Post subject: Reply with quote

so you are using which boot cd? and when you run the mac-fdisk program can you delete partition one? i can change the size of it to make it match what the handbook says, but i still think i am not doing something right.

i know that the 2004.1 cd is flawed in that it doesnt usually detect ethernet cards right.. with my pc i had to modprobe, with this 2004.1 cd i just have to run net-setup eth0 to get it working. but then when i make all my filesystems, wiith the exception of the first partition, which isnt even something i have gotten to; i get archive errors (yes md5's are right, the fans rev then it stops...) on thestage1.from the 2004.1/stages/ppc/ folder. i only like to build from stage 1!

as for the pc, its the only flavor of linux imo that sets it apart from the rest.. bootstrapping!!!

this is crazy but fun for me anyway, i love osx and i like having support for sound and fw800.. i just think that someone isnt giving enough information to the developers about the arch maybe?

what is OSX.latest? 64-bit kernel?
Back to top
View user's profile Send private message
korg
n00b
n00b


Joined: 27 Jan 2004
Posts: 46

PostPosted: Tue May 11, 2004 5:20 am    Post subject: Reply with quote

NetSyphon wrote:
so you are using which boot cd? and when you run the mac-fdisk program can you delete partition one? i can change the size of it to make it match what the handbook says, but i still think i am not doing something right.



I tried lots of CD's before I got my machine working. I mac-fdisk'ed my system really quite early in the process and so I didnt really miss the lack of mac-fdisk on the ppc64 cd.

Try the install-ppc-minimal-2004.1.iso to boot from and fdisk your system with, then reboot with mini-install-universal-ppc64-2004.1.iso and do your install if you _really_ want a ppc64 userland system.

Personally, Id boot the install-ppc-minimal-2004.1.iso and do the full fdisk/install from that and then use that until ppc64 is more stable. It will still go fast ;)

If you really want ppc64, then you'll need to still boot the minimal to fdisk your system.
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
Goto page 1, 2  Next
Page 1 of 2

 
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