Search:  
Gentoo Wiki

Apple_Powerbook_G4

Contents

Introduction

deprecated, should be overworked as wlan is working, 3d is working etc

This wiki will describe the installation process of Gentoo Linux on an Apple Powerbook G4 15" SuperDrive. Updates as soon as I completely nail down everything with my personal configuration. Some of the main issues include sound and suspend-to-RAM/sleep capability, which I hope to address as soon as possible. For now I can provide a thorough description of the actual hardware, kernel modules/chipset support needed (and those not needed).

This wiki is aimed at pretty much everyone. New Gentoo users will (hopefully) find it an extremely informative document, while seasoned veterans may just be here looking for that one evasive setting they forgot. Either or, enjoy. =)

For the most part, follow the PPC Handbook to a 'T'. I'll try and highlight any quirks during the install, but this wiki mainly deals with post-configuration and kernel/module/keymapping issues.

Also, trying to consolidate the extremely good forum posts and howtos already out there and apply them to this specific machine.

Installation Environment

AFAIK, configuration varies on Powerbooks, iBooks, and older machines. This wiki is designed specifically for the Aluminum PowerBook 15" G4 5.4 (the new series is 5,6 i believe). However that does not mean that this information is not pertinent to your machine, and it may work. All I can guarantee is that it works on the 15" AlBook. :)

System Info

This is just a handy reference. =)

Some (commented) output commands on this specific machine so we're all on the same page:

Code: uname -a
Linux narya 2.6.11-gentoo-r6 #2 Sun Apr 10 02:06:56 MST 2005 ppc 7447A, altivec supported PowerBook5,4 GNU/Linux
Code: cat /proc/cpuinfo
 processor       : 0
 cpu             : 7447A, altivec supported /* Enable the altivec use flag! */
 clock           : 1499MHz
 revision        : 1.1 (pvr 8003 0101)
 bogomips        : 1495.04
 machine         : PowerBook5,4             /* This is the "old" generation before the 1Q 2005 price drop and 1.66 model */
 motherboard     : PowerBook5,4 MacRISC3 Power Macintosh
 detected as     : 287 (PowerBook G4 15")
 pmac flags      : 0000001b
 L2 cache        : 512K unified
 memory          : 512MB
 pmac-generation : NewWorld                 /* yaboot only*/
File: /etc/yaboot.conf
## yaboot.conf generated by yabootconfig 1.0.8
##
## run: "man yaboot.conf" for details. Do not make changes until you have!!
##
## For a dual-boot menu, add one or more of:
## bsd=/dev/hdaX, macos=/dev/hdaY, macosx=/dev/hdaZ

ofboot=hd:2
boot=/dev/hda2
device=/pci@f4000000/ata-6@d/disk@0: /* this is really just hd:2 */
partition=4
root=/dev/hda4
timeout=30
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot
enableofboot
enablecdboot
default=Linux-2.6.11-r1
image=/boot/kernel-2.6.11
        label=Linux-2.6.11
        read-only
        sysmap=/boot/System.map-2.6.11-old
image=/boot/kernel-2.6.11-old       /* always keep a kernel you KNOW will boot :) */
        label=Linux-2.6.11-old
        read-only
        sysmap=/boot/System.map-2.6.11-old
Code: lspci -v
0000:00:0b.0 Host bridge: Apple Computer Inc. UniNorth 2 AGP
        Flags: bus master, 66Mhz, medium devsel, latency 16
        Capabilities: [80] AGP version 1.0

0000:00:10.0 VGA compatible controller: ATI Technologies Inc RV350 [Mobility Radeon 9600 M10] (prog-if 00 [VGA])
        Subsystem: ATI Technologies Inc RV350 [Mobility Radeon 9600 M10]
        Flags: bus master, 66Mhz, medium devsel, latency 255, IRQ 48
        Memory at b8000000 (32-bit, prefetchable) [size=f1000000]
        I/O ports at 802400 [size=256]
        Memory at b0000000 (32-bit, non-prefetchable) [size=64K]
        Expansion ROM at 00020000 [disabled]
        Capabilities: [58] AGP version 2.0
        Capabilities: [50] Power Management version 2

NOTE: Will not work with XFree or xorg-x11 DRI!

0001:10:0b.0 Host bridge: Apple Computer Inc. UniNorth 2 PCI
        Flags: bus master, 66Mhz, medium devsel, latency 16

0001:10:12.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 03)
        Subsystem: Apple Computer Inc.: Unknown device 004e
        Flags: bus master, fast devsel, latency 16, IRQ 52
        Memory at a0006000 (32-bit, non-prefetchable) [disabled]
        Capabilities: [40] Power Management version 2

NOTE: THE ABOVE IS AIRPORT EXTREME AND WILL NOT WORK WITH LINUX!

0001:10:13.0 CardBus bridge: Texas Instruments PCI1510 PC card Cardbus Controller
        Flags: bus master, medium devsel, latency 168, IRQ 53
        Memory at a0004000 (32-bit, non-prefetchable)
        Bus: primary=10, secondary=11, subordinate=14, sec-latency=176
        Memory window 0: 90000000-9ffff000 (prefetchable)
        Memory window 1: f3000000-f31ff000
        I/O window 0: 00001000-000010ff
        I/O window 1: 00001400-000014ff
        16-bit legacy interface ports at 0001

NOTE: Works great. If you have Airport Extreme you'll probably want to get a USB or PCMCIA wireless dongle

0001:10:17.0 Class ff00: Apple Computer Inc. KeyLargo/Intrepid Mac I/O
        Flags: bus master, medium devsel, latency 16
        Memory at 80000000 (32-bit, non-prefetchable)

NOTE: Enable I2C support for this in the kernel

0001:10:18.0 USB Controller: Apple Computer Inc. KeyLargo/Intrepid USB (prog-if 10 [OHCI])
        Flags: medium devsel

0001:10:19.0 USB Controller: Apple Computer Inc. KeyLargo/Intrepid USB (prog-if 10 [OHCI])
        Flags: medium devsel

0001:10:1a.0 USB Controller: Apple Computer Inc. KeyLargo/Intrepid USB (prog-if 10 [OHCI])
        Flags: bus master, medium devsel, latency 16, IRQ 29
        Memory at a0003000 (32-bit, non-prefetchable)

0001:10:1b.0 USB Controller: NEC Corporation USB (rev 43) (prog-if 10 [OHCI])
        Subsystem: NEC Corporation USB
        Flags: bus master, medium devsel, latency 16, IRQ 63
        Memory at a0002000 (32-bit, non-prefetchable)
        Capabilities: [40] Power Management version 2

0001:10:1b.1 USB Controller: NEC Corporation USB (rev 43) (prog-if 10 [OHCI])
        Subsystem: NEC Corporation USB
        Flags: bus master, medium devsel, latency 16, IRQ 63
        Memory at a0001000 (32-bit, non-prefetchable)
        Capabilities: [40] Power Management version 2

0001:10:1b.2 USB Controller: NEC Corporation USB 2.0 (rev 04) (prog-if 20 [EHCI
)
        Subsystem: NEC Corporation USB 2.0
        Flags: bus master, medium devsel, latency 16, IRQ 63
        Memory at a0000000 (32-bit, non-prefetchable)
        Capabilities: [40] Power Management version 2

0002:24:0b.0 Host bridge: Apple Computer Inc. UniNorth 2 Internal PCI
        Flags: bus master, 66Mhz, medium devsel, latency 16

0002:24:0d.0 Class ff00: Apple Computer Inc. UniNorth/Intrepid ATA/100
        Flags: bus master, medium devsel, latency 32, IRQ 39
        Memory at f5004000 (32-bit, non-prefetchable)

0002:24:0e.0 FireWire (IEEE 1394): Apple Computer Inc. UniNorth 2 FireWire (rev 81) (prog-if 10 [OHCI])
        Subsystem: Apple Computer Inc.: Unknown device 5811
        Flags: bus master, medium devsel, latency 64, IRQ 40
        Memory at f5000000 (32-bit, non-prefetchable)
        Capabilities: [44] Power Management version 2

0002:24:0f.0 Ethernet controller: Apple Computer Inc. UniNorth 2 GMAC (Sun GEM) (rev 80)
        Flags: bus master, 66Mhz, slow devsel, latency 16, IRQ 41
        Memory at f5200000 (32-bit, non-prefetchable) [size=f5100000]
        Expansion ROM at 00100000 [disabled]

NOTE: Enable Sun GEM support in the kernel. Module is sungem.o

Kernel Configuration

Here I'll discuss some of the kernel options available to a PPC user, moreover which ones apply specifically to this machine.

Keep in mind, this is for an out-of-the-box, fresh-smelling PowerBook. Make exceptions for the obvious, e.g. you use SCSI hardware or I20.

The only options listed are the ones that I have selected, so they will appear out of order in make menuconfig.

To the nitty-gritty:

Processor

Linux Kernel Configuration: Processor Opts
Processor Type: (X) 6xx/7xx/74xx/52xx/8260
[*] AltiVec Support
[*] Thermal Management Support

Platform Options

Linux Kernel Configuration: Platform Opts
Machine Type: (X) CHRP/PowerMac/PReP
[*] Support for Open Firmware device tree in /proc
[*] Support for PReP Residual Data
[*] Support for reading of PReP Residual Data in /proc


Device Drivers

NOTE: This applies mostly to any special hardware you might be using, so be sure to DOUBLE CHECK before you change things around in this section! There are some things you most likely will not need listed below that are pretty obvious, but again, use your common sense.

Linux Kernel Configuration: Device Drivers
 Block devices  --->
     <*> RAM disk support                       /* Only needed if you want to use an initial ramdisk (initrd) for bootsplash, etc. */
     [*]   Initial RAM disk (initrd) support    /* enable this too, then, if so */
     <*> Packet writing on CD/DVD media         /* performance */
     [*]   Enable write caching                 /* use this only with known-good media unless you want a new coaster collection */

 ATA/ATAPI/MFM/RLL support --->
     <*> ATA/ATAPI/MFM/RLL support
          <*>   Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support
          <*>     Include IDE/ATA-2 DISK support
          <*>     Include IDE/ATAPI CDROM support
          <*>     generic/default IDE chipset support
          [*]     PCI IDE chipset support
          [*]       Sharing PCI IDE interrupts support
          <*>       Generic PCI IDE Chipset Support
          [*]       Generic PCI bus-master DMA support
          [*]         Use PCI DMA by default when available
          [*]     Builtin PowerMac IDE support
          [*]       Probe internal ATA/100 (Kauai) first
          [*]       PowerMac IDE DMA support
          [*]       Blink laptop LED on drive activity          /* the LED on the 'open' button - pers. preference */

 IEEE 1394 (FireWire) support  --->         /* this entire section is completely optional. Read the Help on each option for more info */
     <*> IEEE 1394 (FireWire) support
     <*>   OHCI-1394 support                /* we do in fact have 'such a card' :) */
     <*>   OHCI-1394 Video support          /* has anyone tried an iSight with this? */
     <*>   Ethernet over 1394               /* RFC 2734, no multicast though */
     <*>   OHCI-DV I/O support              /* for DV devices (again, iSight?) */
     <*>   Raw IEEE1394 I/O support         /* good idea for userspace programs */
 
 Macintosh device drivers  --->
     [*] Apple Desktop Bus (ADB) support          /* will disable kb if not selected */
     [*] Support for PMU  based PowerMacs
     [*]   Power management support for PowerBooks
     <*>     APM emulation
     [*]   Backlight control for LCD screens
     [*] Support for ADB input devices (keyboard, mice, ...)
     [*]   Support for mouse button 2+3 emulation
     <*> Support for thermal mgmnt on laptops with ADT 746x chipset     /* better control of gpu/cpu fans */

NB: There are way too many options in Networking to go over in detail, and most do not apply at all to the PowerBook 15.

 Networking support --->
     [*] Networking support                                     /* duh */
     <*> Bluetooth subsystem support  --->                      /* if you want to enable BT */
         ****WILL ADD TO THIS SECTION LATER****
     [*] Network device support
     Ethernet (10 or 100Mbit)  --->
          [*] Ethernet (10 or 100Mbit)
          <*>   Sun GEM support
     <*>   PPP (point-to-point protocol) support                /* enable for dialup, DSL, VPN */
         ****WILL ADD TO THIS SECTION LATER****
 
 Input device support --->
     [*] Provide legacy /dev/psaux device                       /* some old stuff uses this, same as /dev/input/mice */
 
 Character devices --->
     <*> /dev/nvram support                                     /* does this support OF? unsure... */
     <*> Generic /dev/rtc emulation
     [ ]   Extended RTC operation                               /* NOTE: THIS IS EMPTY BECAUSE YOU SHOULD _NOT_ SELECT IT */
     <*> /dev/agpgart (AGP Support)
     <*>   Apple UniNorth AGP support
     <*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)
     <*>   ATI Radeon                                           /* 2d acceleration only (no dri driver for ATI r300 on PPC */

 Graphics support --->                                          /* mostly framebuffer stuff in this section */
     [*]   Open Firmware frame buffer device support
     <*> ATI Radeon display support
     [*]   DDC/I2C for ATI Radeon support
     Console display driver support --->
          [*] VGA text console                                  /* liven up that vt =) */
          <*> Framebuffer console support                       /* enable fbcon useflag as well */
     Logo configuration
          [ ] Bootup logo                                       /* you must DISABLE this for bootsplash */
     [*] Backlight & LCD device support  --->                   /* remember to enable both options in the submenu under this */
     [*] Support for the framebuffer splash                     /* again, this is for fbsplash */

 /* NOTE: what follows in the sound section is hackish at best. I am still trying to get it nailed down and will update as necessary */

 Sound support --->                                             /* this is a real bitch. don't expect it to work right the first time */
     <*> Sound card support                                     /* still not sure if my config is working right either. =( */
     [ ] PowerMac DMA sound support                             /* this is the OSS module, don't enable it. I think. */
     Advanced Linux Sound Architecture --->
          <M> Advanced Linux Sound Architecture                 /* module snd */
          <M> Sequencer support                                 /* module snd_seq (?) */
          <M> OSS Mixer API                                     /* module snd_mixer_oss */
          <M> OSS PCM (digital audio) API                       /* module snd_pcm_oss */
          ALSA Mac Devices --->
               [M] PowerMac (AWACS...Keywest)                   /* module snd_powermac */

 USB support --->                                               /* Most options will relate to extra hardware you might have */
 <*> Support for Host-side USB                                  /* so enable any required support (mass storage, usb cdrom etc */
 [*] USB device filesystem                                      /* note: this has nothing to do with udev or devfs */
 [*] USB suspend/resume                                         /* needed for USB when waking from suspend to disk/ram */
 <*> EHCI HCD (USB 2.0) support
 <*> OHCI HCD support
 <*> USB Human Interface Device (full HID) support
 [*]   HID input layer support

File Systems

Other brief notes

Sleep/Suspend

emerge --sync
emerge -u gentoo-sources
cd /usr/src; rm linux; ln -s /usr/src/linux-2.6.11-r6 linux
cd linux; make menuconfig
make all
emerge pmud
emerge pbbuttonsd
rc-update add pmud default
rc-update add pbbuttonsd default

At this point you should be able to initiate suspend-to-RAM with the snooze command.

Open Firmware

printenv                                  /* this will give you a nice little printout of your settings. */
setenv boot-device hd:2                   /* this will reset your boot device to hd:2 (your bootstrap partition) */
boot hd:2,\\/boot/your.kernel.here        /* and hopefully all goes well */

To reset your settings:

reset-all

Links

Unresolved Issues

Mathias Grimm has developed an app called pbbuttonsd[1] to handle these special keys!

I know yours it is not a PowerBook but you can still try! It's working perfectly on my mac!

He's also developing a graphical interface (GTk based)

Thanks / Credits

Initially created from trial/error and a lot of resources on the net by [[[User:Sam|Sam]]]. A big thanks goes out to Theefer @ The Gentoo PPC Forum: Theefer

And of course, the Gentoo Foundation and the Gentoo Development Team for making such a wonderful system possible.

Retrieved from "http://www.gentoo-wiki.info/Apple_Powerbook_G4"

Last modified: Thu, 28 Aug 2008 22:41:00 +0000 Hits: 17,115