This project has been orphonaged, new maintainer can contact me.

Powerbook G4
Linux kernel configuration

Disclaimer

The authors cannot be held resonsible for any damage which has been caused directly or indirectly by the contents of this page and of the files offered by this page. Always be sure to have a backup of important data before altering anything on you system. When booting from a newly build kernel, make sure that it is always possible to boot from the old kernel in case of emergencies.
The use of the information provided here is at your own risk!

Introduction

Linux kernels can be build on a lot of different hardware platforms, with many different hardware configurations. A Linux kernel and its modules enable a GNU/Linux operating system to use this combination of hardware to its full extend in a very flexible way. Most GNU/Linux distributions install a kernel and its modules which has been build for a specific hardware platform with a very general configuration. It has modules for almost every network card, modem, etc. This make it very easy to install and get a running GNU/Linux distribution.

The PowerBook G4 is a PowerPC platform with a very limited hardware configuration because all hardware is integrated inside and it doesn't offer interface to connect other hardware appart from FireWire, USB and SVGA. There are some GNU/Linux distributions that can be installed on this PowerPC platform with a kernel and its modules build with a, for this platform, very general configuration.

This site would like to offer GNU/Linux configuration files for building a Linux kernel and modules which are optimal for the PowerBook G4.

Files

The aim is to provide a configuration which is optimised for speed and the ability to connect to commen external devices. In order to choose optimal configuration settings the following guide lines were used when making choices on what should go into the kernel, what should be build as a module and what should not be build at all.

Below are configuration files that can be downloaded to build optimal Linux kernel and modules for a PowerBook G4. Because not all GNU/Linux systems on these machine have the same configuration on where the hard disk is, hda or hdc, one has to double check the value of the ATA100FIRST setting.

version.configbuild on 867 MHz
2.4.22-ben2config-2.4.22-ben2-pbg4-20031002.bz216 minutes
2.6.5config-2.6.5-pbg4-20040512.bz232 minutes
2.6.6config-2.6.6-pbg4-20040517.bz236 minutes
2.6.7config-2.6.7-pbg4-20040711.bz236 minutes
2.6.8.1config-2.6.8.1-pbg4-20041011.bz237 minutes
2.6.9config-2.6.9-pbg4-20041020.bz238 minutes
2.6.10config-2.6.10-pbg4-20050109.bz236 minutes

Note that these config files are tuned for NVIDIA GeForce4 420 Go with the following resoltion:

CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768

Please send me any improvements for the files provided here.

Downloading, building and installing kernel and modules

For building the kernel one can use something like the following commands.

2.6.5 and later

su
cd /usr/src
download from kernel.org mirror linux-2.6.5.tar.bz2 to /usr/src
bunzip2 linux-2.6.5.tar.bz2
tar xf linux-2.6.5.tar
rm -f linux-2.6.5.tar
apply patch from http://bluez.sf.net/
ln -sf linux-2.6.5 linux
cd linux
mv -f some-path/config-2.6.5-bla-bla .config
make-kpkg clean
make-kpkg --append_to_version=-pbg4 kernel_image
rm -rf /lib/modules/2.6.5.old
mv /lib/modules/2.6.5 /lib/modules/2.6.5.old
rm -rf /boot.old
cp -r /boot /boot.old
dpkg -i ../kernel-image-2.6.5-pbg4_10.00.Custom_powerpc.deb
reboot

2.4.22-ben2 *

su
cd /usr/src
mkdir benh_kernel
rsync -avz rsync.penguinppc.org::linux-2.4-benh benh_kernel
cd benh_kernel
mv -f some-path/config-2.4.22-ben2-bla-bla .config
make-kpkg clean
make-kpkg --append_to_version=-pbg4 kernel_image
rm -rf /lib/modules/2.4.22-ben2.old
mv /lib/modules/2.4.22-ben2 /lib/modules/2.4.22-ben2.old
rm -rf /boot.old
cp -r /boot /boot.old
dpkg -i ../kernel-image-2.4.22-ben2-pbg4_10.00.Custom_powerpc.deb
reboot

Troubleshooting

If booting stops after these lines:

usbcore: registered new driver hiddev
usbcore: registered new driver hid
drivers/usb/input/hid-core.c: v2.0:USB HID core driver
mice: PS/2 mice device common for all mice

Rebooting might provide the answer or running fsck on at least your boot partition might do the trick. for that you can use the gentoo live CD from which you can boot off.

Links

Apple PowerBook G4
http://www.apple.com/powerbook/
Install Debian GNU/Linux on an Powerbook
http://www.mathematik.uni-marburg.de/~schmidtm/apple/powerbook.en.php
http://www.debian.org/devel/debian-installer/
Debian PowerPC list archive
http://lists.debian.org/debian-powerpc/
Penguin PPC
http://penguinppc.org/dev/kernel.shtml
PowerBook G4 Hardware
http://www.pbfixit.com/Guide/
http://developer.apple.com/documentation/Hardware/Developer_Notes/Macintosh_CPUs-G4/12inchPowerBookG4/
http://developer.apple.com/documentation/Hardware/Developer_Notes/Macintosh_CPUs-G4/15inchPowerBookG4/
http://developer.apple.com/documentation/Hardware/Developer_Notes/Macintosh_CPUs-G4/17inchPowerBookG4/
http://www.medicalmac.com/mac.html
http://www.kodawarisan.com/ug/PowerBook/index.html

Contact

For questions, please RTFM or become an active member of debian-powerpc@lists.debian.org. For contributions, send an email to pander_at.users-dot=sourceforge~dot,net .



* Notes for 2.4.22-ben2

Downloading, building and installing ALSA

Install ALSA using the following commands.

wget ftp://ftp.alsa-project.org/pub/lib/alsa-lib-0.9.6.tar.bz2
tar jxfv alsa-lib-0.9.6
./configure
make
su
make install
exit
wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-0.9.6.tar.bz2
tar jxfv alsa-driver-0.9.6.tar.bz2
cd alsa-driver-0.9.6
./configure
make
su
make install
exit

Do not forget to reinstall the drivers again after removing /lib/modules/2.4.22-ben2

Loading of modules

The modules are loaded via the following files.

/etc/modules

# /etc/modules: kernel modules to load at boot time.
#
# This file should contain the names of kernel modules that are
# to be loaded at boot time, one per line. Comments begin with
# a "#", and everything on the line after them are ignored.

agpgart
sungem
sg
ide-scsi
snd-powermac
snd-pcm-oss
snd-mixer-oss 

/etc/modules

# Alsa 0.9.X kernel modules' configuration file.

# ALSA portion
alias char-major-116 snd
# OSS/Free portion
alias char-major-14 soundcore

##
## IMPORTANT:
## You need to customise this section for your specific sound card(s)
## and then run `update-modules' command.
## Read alsa-driver's INSTALL file in /usr/share/doc for more info.
##
##  ALSA portion
alias snd-card-0 snd-powermac

# OSS/Free portion - card #1
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss

alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss

# Set this to the correct number of cards.
options snd cards_limit=1

/etc/sound

alias char-major-14     soundcore
alias sound-slot-0      dmasound_pmac
alias char-major-14-3   dmasound_pmac
alias /dev/dsp          dmasound_pmac
alias sound-service-0-0 i2c-keywest
alias char-major-14-0   i2c-keywest
alias /dev/mixer        i2c-keywest