Differences between revisions 11 and 12
Revision 11 as of 2006-12-09 09:38:49
Size: 8688
Editor: ?TorranceH
Comment:
Revision 12 as of 2006-12-09 09:59:11
Size: 10295
Editor: ?TorranceH
Comment:
Deletions are marked like this. Additions are marked like this.
Line 136: Line 136:


== Java ==

Sun provides a Java implementation for, you guessed it, x86, but not for ppc. They are in the process of finally open sourcing their code, but in the meantime ppc users must install a java binary provided by IBM. This is mostly important for allowing java applets on the web to work, but also applies to java programs like LimeWire.

'''1. Download the binary package.'''

To get IBM's Java binary, go to http://www-128.ibm.com/developerworks/java/jdk/linux/download.html, and choose the J2SE 5.0 SDK for 32-bit iSeries/pSeries. This will require an annoying registration. When you finally get through the registration, pick the TGZ version of the JRE.

'''2. Install the required packages''' for Java installation using Synaptic or apt-get:

{{{java-package libstdc++5 libgtk1.2 }}}

'''3. Make a debian package out of the IBM Java file.''' In the terminal, move yourself to the directory where the ibm.tgz file is and enter this command:

{{{make-jpkg ibm-java2-jre-50-linux-ppc.tgz}}}

Then install the resulting debian package:

{{{sudo dpkg -i ibm-j2re1.5_1.5.0_powerpc.deb}}}

Now, run this command and make sure IBM Java 1.5 is the default Java, and not any other Java that may be installed on your system:

{{{sudo update-alternatives --config java}}}

Check to see that everything is installed fine:

{{{java -version}}}

Finally, set up the Firefox plugin:

{{{mkdir -p ~/.mozilla/plugins
cd ~/.mozilla/plugins
ln -s /usr/lib/j2sdk1.5-ibm/jre/bin/libjavaplugin_oji.so}}}

That's it! You may need to restart or log out for changes to take effect.

iMac G5 and Debian

This page is under development. --TorranceH, 9 December 2006

Aim

The aim of this page is to help get users of iMac G5s up and running with Debian. It is to provide a clear idea of what can be expected to work and what simply won't work at this stage, and to provide the steps required in clear and concise steps.

I am an ex-newbie who has gained these skills from a lot of google-ing, and would rather others didn't have to do the same. Please email me if you can help me with fixes, would like to write or expand a section, or need help (I will help where I can). Email me at [mailto:torrance123((at))gmail((dot))com torrance123((at))gmail((dot))com].

Contents

1. A few notes about the hardware ?BR 2. A few notes about Debian ?BR 3. What you can expect from Linux on your iMac G5 ?BR 4. Compiling your kernel ?BR X. Recommended applications

A Few Notes About Hardware

There were three generations or "revisions" of iMac G5 produced by Apple. I am using a first generation 17" iMac G5, or iMac revA, and at this point this page will be most suited for this hardware. The revA came with a Nvidia ?GeForce 5200 Ultra graphics card.

The iMac G5 revB is different from the revA in that its backing is curved and it has an ATI Radeon 9600 graphics card. It also had an ambient light sensor to adjust the light at the bottom-right of the front.

The iMac G5 revC is different again as this is the only revision to have the iSight built in to the top. The iMac revC has an ATI Radeon X600 graphics card.

As far as I know, the only significant differences between the three generations in terms of Linux usabilty are that the revC (iSight) do not have any code available to bring the fans under control at this point, and that there is a possibility that revB and revC iMac's may be able to enable 3d graphics with open source ATI drivers.

[http://en.wikipedia.org/wiki/IMac#iMac_G5 More info about iMac G5 revisions.]

A Few Notes About Software

My experience thus far has been based entirely on using Debain Etch (testing, soon to be Debian 4.0). The last time I tried to use Debain 3.1 I was unable to install the system at all.

I performed a network install, but I assume all ppc images available [http://www.us.debian.org/devel/debian-installer/ here] will work. Extensive installation notes for Debian 4.0 are already available [http://www.debian.org/releases/testing/installmanual here.]

As a matter of interest: My system install currently exists on a small 6GB partition alongside MacOS X that is encrypted using dm-crypt with a 256bit AES key (available as an option during install). I have no separate swap partition, but I do have a separate /boot partition (required since my root partition is encrypted). I use Gnome as my desktop environment.

What You Can Expect from Linux on your iMac G5

Generally speaking, you can expect a fully functional desktop machine similar to MacOS X.

However, these things will require fixes and work-arounds to get working (explained on this page): ?BR

  • Fan/thermal control. Fans will rev to full speed (which is perfectly safe) until the right modules are loaded. This is fixed with an appropriately configured kernel.

  • Sound. Sound modules for the iMac G5 are available in the 2.6.18 kernel and later, but at this point must be enabled through compiling a new kernel.

  • Java. While this is slowly being made open source, at this point it must still be installed from a binary (closed source) package available from IBM.

  • DVD encrypted playback. DVD playing works fine, but you'll need to install a special decryption library to play most commercial CDs.

At this point, the following features simply won't work or are bugs that I don't know how to fix: ?BR

  • Nvidia 3d support. At this stage the open-source nv driver only allows 2d functionality. Nvidia provides a binary (closed source) driver but this only works on x86 machines, not ppc. Support for this will be available when (fingers crossed) the [http://nouveau.freedesktop.org/wiki/ Nouveau project] manages to reverse engineer appropriate Nvidia drivers. (I think there are open-source ATI drivers available for rev B and C machines???)

  • Internal dial-up modem. As far as I know, no one has got this to work.

  • Adobe Flash. For example, ?YouTube videos are unplayable. Flash is available on x86 as a closed source binary, but not on any other architecture, like ppc. [http://www.gnu.org/software/gnash/ Gnash] is a project rapidly hacking an open source alternative and will soon make this functionality possible.

  • Hibernate and Standby. Both suspend-to-disk (hibernate) and suspend-to-ram (standby) are not working. While standby is unlikely to be possible at all, a hack for hibernate is likely possible. Help is welcome.

  • Dim Screen. Not noticable to everyone, but the revA screen (possibly on other revisions too?) is dimmer than under MacOS X. This can probably be fixed but I have as yet be unable to work it out. Help is welcome.

Compiling Your Kernel

I should stress this is nowhere near as hard you might expect. If you follow these instructions, you'll be fine.

A new kernel is required to enable sound (on all revisions) and fan control (on rev A and rev B). I don't have either Airport or Bluetooth, so I cannot test how to enable these during kernel configuration, but I welcome others' help. For the mean time I will describe which options should be enabled, but in the future I hope to offer a single configuration file optimised for all iMac G5s. [mailto:torrance123((at))gmail((dot))com Can you help me with this?]

Please follow these steps to install a new kernel:

1. Enable sudo (a command that allows to to execute other commands as root, short for "super user do..."). In the terminal:

{{{cd /etc su (type root password) nano sudoers}}}

Using nano, scroll down to the bottom of the page, and add this line at the very bottom:

yourusername ALL=(ALL) ALL

Press control-x and save on exit.

2. Install the required components to compile a kernel. Using Synaptic (or apt-get in the terminal) install the following packages:

build-essential kernel-package libncurses5-dev

3. Download and unpack the kernel source. Head along to www.kernel.org in your browser, and copy the link to the latest full kernel (the link under the F). In the terminal:

{{{cd /usr/src sudo wget http://www.kernel.org/pub/linux/kernel/v2.6/latestkernel.tar.bz2 sudo tar -xvjf latestkernel.tar.bz2}}}

4. Configure the kernel. In the terminal:

{{{cd /usr/src/latestkernel sudo make g5_defconfig sudo make menuconfig}}}

Now the fun part. You've already configured the kernel with a default G5 kernel, and both sound and fan control are already enabled. But there's a few other configuration options which are recommended.

General Speed: ?BR Block Layer > IO Schedulers > Default IO Scheduler > CFQ ?BR Kernel Options > Timer Frequency > 1000Hz ?BR Kernel Options > Preemption Model > Voluntary Kernel (Desktop) ?BR

To enable a firewall: ?BR Networking > Networking Options > Network Packet Filtering > Netfilter Xtables support (Y) ?BR ...now make every option that appears beneath it a module by press M ?BR Networking > Networking Options > Network Packet Filtering > IP: Netfilter Configuration > IP Tables Support (Y) ?BR ...now make every option that appears beneath it, except "raw table support", a module. ?BR Networking > Networking Options > Network Packet Filtering > ARP Tables Support (Y) ?BR ...now make the two options that appear beneath it modules. ?BR

Airport and Bluetooth: ?BR I don't know. Please help me with this.

Now exit, and save configuration on exit.

5. Make the Kernel into a Debian Package. In the terminal

{{{cd /usr/src/latestkernel sudo make-kpkg clean sudo make-kpkg -initrd --revision=imacg5 kernel_image kernel_headers modules_image}}}

...and play the waiting game. All going well, 30 minutes later, you'll have a compiled kernel package. You can call your kernel whatever you like, so long as it has a number in it (--revision=something1).

6. Install the kernel packages.

{{{cd /usr/src ls (this will show you the image and header package names) sudo dpkg -i kernel-header-latestkernel.deb sudo dpkg -i kernel-image-latestkernel.deb}}}

Now restart and you're all done! You should have fan control and sound on start up.

Java

Sun provides a Java implementation for, you guessed it, x86, but not for ppc. They are in the process of finally open sourcing their code, but in the meantime ppc users must install a java binary provided by IBM. This is mostly important for allowing java applets on the web to work, but also applies to java programs like ?LimeWire.

1. Download the binary package.

To get IBM's Java binary, go to http://www-128.ibm.com/developerworks/java/jdk/linux/download.html, and choose the J2SE 5.0 SDK for 32-bit iSeries/pSeries. This will require an annoying registration. When you finally get through the registration, pick the TGZ version of the JRE.

2. Install the required packages for Java installation using Synaptic or apt-get:

java-package libstdc++5 libgtk1.2 

3. Make a debian package out of the IBM Java file. In the terminal, move yourself to the directory where the ibm.tgz file is and enter this command:

make-jpkg ibm-java2-jre-50-linux-ppc.tgz

Then install the resulting debian package:

sudo dpkg -i ibm-j2re1.5_1.5.0_powerpc.deb

Now, run this command and make sure IBM Java 1.5 is the default Java, and not any other Java that may be installed on your system:

sudo update-alternatives --config java

Check to see that everything is installed fine:

java -version

Finally, set up the Firefox plugin:

{{{mkdir -p ~/.mozilla/plugins cd ~/.mozilla/plugins ln -s /usr/lib/j2sdk1.5-ibm/jre/bin/libjavaplugin_oji.so}}}

That's it! You may need to restart or log out for changes to take effect.