Gentoo on a Powerbook G4 12” Super
paolo Updated version of this article coming soon : new informations, configuration tips, hacks and more
Learn how to configure Gentoo ( and other GNU / Linux distributions ) on a Powerbook G4 12” Super !
~# cat /proc/cpuinfo
processor : 0 cpu : 7447A, altivec supported clock : 1499.999994MHz revision : 0.2 (pvr 8003 0102) bogomips : 36.73 timebase : 18432000 platform : PowerMac machine : PowerBook6,8 motherboard : PowerBook6,8 MacRISC3 Power Macintosh detected as : 287 (PowerBook G4 12") pmac flags : 0000001a L2 cache : 512K unified pmac-generation : NewWorld
~# lspci
0000:00:0b.0 Host bridge: Apple Computer Inc. UniNorth 2 AGP 0000:00:10.0 VGA compatible controller: nVidia Corporation NV34M [GeForce FX Go5200] (rev a1) 0001:10:0b.0 Host bridge: Apple Computer Inc. UniNorth 2 PCI 0001:10:12.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 03) 0001:10:17.0 Class ff00: Apple Computer Inc. KeyLargo/Intrepid Mac I/O 0001:10:18.0 USB Controller: Apple Computer Inc. KeyLargo/Intrepid USB 0001:10:19.0 USB Controller: Apple Computer Inc. KeyLargo/Intrepid USB 0001:10:1a.0 USB Controller: Apple Computer Inc. KeyLargo/Intrepid USB 0001:10:1b.0 USB Controller: NEC Corporation USB (rev 43) 0001:10:1b.1 USB Controller: NEC Corporation USB (rev 43) 0001:10:1b.2 USB Controller: NEC Corporation USB 2.0 (rev 04) 0002:20:0b.0 Host bridge: Apple Computer Inc. UniNorth 2 Internal PCI 0002:20:0d.0 Class ff00: Apple Computer Inc. UniNorth/Intrepid ATA/100 0002:20:0e.0 FireWire (IEEE 1394): Apple Computer Inc. UniNorth 2 FireWire (rev 81) 0002:20:0f.0 Ethernet controller: Apple Computer Inc. UniNorth 2 GMAC (Sun GEM) (rev 80)
Working Hardware
- Core HW (MPC7447A CPU (1.5 GHz), Apple UniNorth 2 chipsetIDE hard disk)
- Graphics (no 3d hardware acceleration)
- Ethernet
- Sound
- USB 1.1 and 2.0
- Bluetooth
- Keyboard
- Trackpad
- Battery status
- Temperature
- Apple Airport Extreme wireless card ( Broadcom BCM4306 )
Current Linux kernel version: Linux-2.6.21 [ .config ]
Current CFLAGS: “-O2 -pipe -mcpu=7450 -maltivec -mabi=altivec -mstring -frename-registers -fivopts -ftree-vectorize”
Trackpad / touchpad configuration
Now you could add to keys as left and right mouse buttons, so add these lines to /etc/sysctl.conf:
dev/mac_hid/mouse_button_emulation = 1
dev/mac_hid/mouse_button2_keycode = 97
dev/mac_hid/mouse_button3_keycode = 100
Now FN+CRTL and FN+ALT are the two mouse buttons.
Apple Airport Extreme wireless card ( Broadcom BCM4306 )
- Use my kernel configuration file: bcm43xx support will be enabled .
- Donwload fwcutter ( utility to extract wireless card firmware ) . Remember to get the latest snapshots .
- Copy bcm43xx-{SNAPSHOTDATE}__forlinux{KERNELVER}__.patch.bz2 , patch your kernel , open kernel configuration ( make menuconfig ) , select softmac ( in networking section ) and bcm43xx ( in devices->networking->wireless ) . Then rebuild the new kernel ( make ) and reboot .
-
- Extract bcm43xx-fwcutter
- Then copy from Mac Os X system /System/Library/Extensions/AppleAirPort2.kext/Contents/MacOS/AppleAirPort2 to fwcutter directory ; AppleAirport2 is the firmware of your card . If you have not Mac Os X installed try searching the firmware online
- Run : ./fwcutter AppleAirport2 ( this command will extract .fw files )
- Run : make installfw ( .fw files will be copied to /lib/firmware/ )
- ifconfig eth1 up
- iwconfig eth1 essid “Youressid”
Posted in Linux |


November 21st, 2007 at 6:47 am
Hi, I just wanted to thank you for this handy info. It helped me get my wireless going on my 12 inch 1.33 Ghz Powerbook G4.
Also, something to add here. I was looking around for CFLAGs and found that two of the flags you posted proabably should not be used.
From:
http://tstotts.net/linux/gentoopb.html
Some CFLAGS that should not be used on a CPU in the 7450 family include:
-O3 This level of optimization is currently unstable on all gcc versions with regards to G4 processors. Wrong or incomplete binary code may be produced.
-fsigned-char While this may be necessary to compile a few packages, it will break most. The decision whether to use this flag should be left to the package maintainer, and should only ever be used as a compilation work-around—and only when the ramifications of using this flag are understood.
-mpowerpc-gfxopt This option is inferred by various mcpu flags whenever it is optimal, and so is generally redundant. However, with regards to 7400 and 7450 compilations, the gfx options nearly always have no effect or decrease performance. As such, they should be avoided. Any documentation that suggests their use on the high-end G4s is mistaken as these flags only have real benefit on G3s and possibly the earliest (500 MHz) G4s.
Some gcc-4* CFLAGS that could provide additional optimizations for a CPU in the 7450 family include:
-frename-registers
-fivopts
-ftree-vectorize
December 5th, 2007 at 6:37 pm
Uhm, I had that powerbook for two years with that CFLAGS optimizations and nothing has happened but I’ll update this post with your hints.
Thanks a lot.