Installation of a Gentoo on an iBook G4
ibook


[back]

This howto describes how I installed Linux on my iBook G4.

a) Install gentoo
Follow the instructions available on Gentoo's site.
They're quite clear and straight forward.
b) get latest kernel.
The most recent the kernel is, the less problems you have.
I'm currently using 2.6.7.
c) Patch the kernel
This is now useless under 2.6.
d) Compile the kernel
My .config is available, you might want it:
		wget /geek/powerbook/files/.config
		make oldconfig
	
If you want to do everything by yourself, you can use
		make config
	
Then go on with the normal compilation:
		make && sudo make modules_install
		cp vmlinux /boot/vmlinux-2.6
	
e) Update yaboot
You must add your new kernel to yaboot's config file, so it can be used.
		vi /etc/yaboot.conf 
		ybin -v
	
Here is the relevant part (don't forget to set root accordingly to your setup):
		image=/boot/vmlinux-2.6
			label=Linux
			root=/dev/hda12
			read-only
	
f) Configure X
You can use either XFree86 4.4.0 or Xorg. The differences are really thin.
g) Make DRI work
Here is my XF86Config-4 file, you can give it a look to see what options you need, or simply copy it to /etc/X11/XF86Config-4.
If you used Xorg, get xorg.conf instead.

You also need DRM support in the kernel, which is provided by agpgart, uninorth-agp and radeon modules.
h) Useful modules
I edited /etc/modules.autoload to load automatically some modules which are useful to me:
		ohci_hcd		#usb 1
		ehci_hcd		#usb 2
		ohci1394		#firewire
		usb-storage 		#mp3 mplayer and Sony digital camera
		snd-powermac		#for sound
		snd-pcm-oss		#for sound
		cdc-acm  		#for GPRS using my motorola phone
		usb-serial		#for GPRS using my sony ericsson phone
		ftdi_sio		#for GPRS using my sony ericsson phone
		usblp			#USB HP deskjet
		apm_emu  		#emulate APM (power management)
		therm_adt7467		#fan control (I use fan_speed=128)
		uinput			#for mouseemu
		uninorth-agp		#for DRI (agpgart will come with it)
	
i) Pbbuttonsd
I use Pbbuttonsd to control sound, brightness etc. On gentoo you can
		emerge pbbuttonsd
	
else you can get it from their website.
Edit /etc/pbbuttonsd.conf to use the iBook's correct keycodes:
		volumeupkey             = 115
		volumedownkey           = 114
		mutekey                 = 113
		ejectcdkey              = 88
	
Here's my pbbuttonsd.conf, in case you're lazy ;-).
j) To burn CDs I use gnome-toaster.
Everything works fine. I just put "/dev/hdc" in the "SCSI Id" ;-)
k) To watch DVDs, I use mplayer.
I emerged it with some USE flags to have the GUI and the encoder:
		USE="encode gtk" emerge mplayer
	
Everything works fine here too.
l) You may now reboot
In order to use your new kernel etc...
m) Problems
As of now, some stuff doesn't work:
n) Other useful details

[back]
Colin Leroy - this article is under the Free documentation licence.