Debian Linux on a PowerMac G4

hardware

Apple PowerMac G4

build

Debian/GNU Linux for PowerPC

burn first CD image:

insert CD and boot holding C key

alternatively, you can enter the openfirmware by pressing keys command + option + O + F

boot off the CD and at the Linux boot prompt, select install24

boot: install24

the installer will begin

enter your networking info

partitioning

install yaboot to harddisk

reboot and during base-config, edit apt sources by hand from stable to unstable

compile new benh kernel with ATI Radeon framebuffer, SMP, Altivec & DRI

mkdir /usr/src/benh_kernel
ln -s /usr/src/benh_kernel /usr/src/linux
rsync -avz rsync.penguinppc.org::linux-2.4-benh /usr/src/benh_kernel
wtf? tons of defkeymap.c errors

rsync -avz rsync.theorie.physik.uni-muenchen.de::linuxppc-2.4-benh /usr/src/linux

There are also debian packages to build a kernel The Debian Way:

apt-get install kernel-patch-powerpc-2.4.27 kernel-source-2.4.27
cd /usr/src
tar xjvf kernel-source-2.4.27.tar.bz2
ln -s kernel-source-2.4.27 linux
cd linux
PATCH_THE_KERNEL=YES make-kpkg kernel_image
cd ..
dpkg -i kernel-image-2.4.27-blah.deb
ybin

now need XF86Config-4

# desg | less
radeonfb: ref_clk=2700, ref_div=12, xclk=24975 from OF
radeonfb: detected DFP panel size from EDID: 1280x1024
Console: switching to colour frame buffer device 160x64
radeonfb: ATI Radeon 9000 If DDR SGRAM 64 MB
radeonfb: DVI port no monitor connected
radeonfb: CRT port DFP monitor connected
# fbset -x
Mode "1280x1024"
    # D: 108.003 MHz, H: 63.983 kHz, V: 60.021 Hz
    DotClock 108.004
    HTimings 1280 1408 1520 1688
    VTimings 1024 1028 1031 1066
    Flags    "-HSync" "-VSync"    # Warning: XFree86 doesn't support accel
EndMode

need 3D acceleration in XFree86, so add this line to /etc/apt/sources.list:

deb http://people.debian.org/~daenzer/dri-trunk-unstable/ ./
  
apt-get install xserver-xfree86-dri-trunk
apt-get install drm-trunk-module-src
apt-get install xlibmesa-glu
apt-get install xlibmesa-gl1-dri-trunk

cd /usr/src
tar zxvf drm-trunk.tar.gz
cd modules/drm-trunk/
make -f Makefile.linux TREE=/usr/src/linux/includes/
rmmod radeon
rmmod agpgart                                                 
mkdir -p /lib/modules/`uname -r`/kernel/drivers/char/drm/ 
cp /usr/src/modules/drm-trunk/radeon.o /lib/modules/`uname -r`/kernel/drivers/char/drm/ 
depmod
modprobe agpgart
modprobe radeon     

enable three button mouse:

echo "1"  > /proc/sys/dev/mac_hid/mouse_button_emulation
echo "87" > /proc/sys/dev/mac_hid/mouse_button2_keycode # F11
echo "88" > /proc/sys/dev/mac_hid/mouse_button3_keycode # F12

enable sound

modprobe dmasound_pmac
echo "dmasound_pmac" >>/etc/modules

add this line to /etc/apt/sources.list for mplayer video:

deb http://honk.physik.uni-konstanz.de/~agx/linux-ppc/debian/ mplayer/
apt-get install mplayer-g4 mencoder-g4 mplayer-fonts mplayer-doc libdvdcss2

StreamingMedia