LFS on PowerPC?
ken at kenmoffat.uklinux.net
Fri May 21 16:19:44 PDT 2004
On Sat, 22 May 2004, James Buchanan wrote:
> Has anyone gotten an LFS system happening on macppc?
> I'm thinking of grabing a cheap second hand macppc from ebay and having
> a crack at it. Any tips/advice appreciated...
> Boy, would I like to completely and permanently replace this dog of an
> Intel x86 system...
Loads of people have done it over the years, but many of them are no
longer active in LFS. I know that Sebastien Maerten (sorry Seb, my
keyboard isn't set up for accents) has been testing recently on mac, and
Jeremy Huntwork has built 5.1-pre2 on a G4/450. I've got LFS-4.1 on an
iBook. [ I'm assuming you are looking at "New World" macs where the OS
is supplied on CD, not in a ROM, and they use Open Firmware to boot. ]
The ppc uses ld.so.1 as the loader, not ld-linux.so.2. If you use the
FSF binutils like the books do then you might want the patch to alter
the ld tests (turns out the test itself is the problem on ppc32, not
what it is testing for).
In chapter 6, you'll need mac-fdisk to understand mac partitions, plus
hfsutils, /dev/nvram, powerpc-utils (only for nvsetenv, so you can just
`make nvsetenv'), and yaboot. I build them in that order at the end of
chapter 6. Clearly grub won't build (x86 assembler in it), although
grub2 will probably support OF ppcs when it is eventually released
(maybe at the same time as the hurd, i.e. don't hold your breath).
For the kernel, any machine not brand new should be supported by the
stock kernels. Recent laptops don't sleep properly with the nVidia
hardware, and there are no specs for the airport-plus wifi.
Recovery CDs are /very/ different (thought I'd cracked it after a lot
of fiddling about with yaboot's mapping, but then it failed me after I
had to reset the OF when I got something wrong in my yaboot.conf). The
partitioning is also somewhat different from an x86 PC, lots of
apple-this and apple-that partitions - you may want to read up on yaboot
before determining how to partition the disk.
You'll probably need at least a 2GB partition to build in (more is
always handy if you try to build big applications with debugging) -
glibc-2.3.3 takes a GB itself to build on ppc.
Laptops have other needs too (power management with pmud,
emulate_3_buttons for the single-button trackpad), and getting the
keyboard to map correctly on both the console and in X can be an
adventure in itself - if it is wrong, you really need to fix the console
keytable before you can build LFS!
In BLFS there is the occasional old package with endian problems (e.g.
fortune-mod-9708), but patches generally exist.
The hint on cross-compiling LFS from OSX may be useful to you.
If you get a desktop mac without a monitor, make sure you know how you
are going to connect to your monitor. If you already use a KVM switch
you'll need adaptors.
das eine Mal als Tragödie, das andere Mal als Farce
More information about the lfs-support