PowerPCFAQ

Differences between revisions 39 and 40
Revision 39 as of 2007-05-14 18:14:42
Size: 15088
Editor: moobilenet-58-188
Comment: sharing printer with OS X
Revision 40 as of 2007-05-17 05:34:28
Size: 18958
Editor: 68-189-81-57
Comment: how to configure kernel
Deletions are marked like this. Additions are marked like this.
Line 447: Line 447:
== How can I configure and compile my own kernel under PowerPC Linux? ==

How to compile your own kernel. Useful to enable a low-latency kernel for audio work, or to have a recent kernel from kernel.org.

1. Fetch a kernel from http://www.kernel.org (The "F" link at the top right is the stable kernel) and save to your home directory.

2. Open a terminal, and type

$ sudo -s

to get a root shell. Install the dev tools needed, if you haven't already:

$ apt-get install build-essential ncurses-base ncurses-dev

3. Then change to the linux source directory

$ cd /usr/src

4. Move the kernel you downloaded from your home directory to /usr/src

$ mv /home/[your username]/linux-2.6.21.1.tar.bz2 /usr/src/

5. Unpack the kernel sources:

$ tar -xvjf linux-2.6.21.1.tar.bz2

6. Make a link to the new kernel like this:

$ ln -sfn linux-2.6.21.1 linux

7. Change to the new directory

$ cd linux/

8. Now time to make a default kernel configuration.

For G5 machines, type:

$ make g5_defconfig

For all other macs, including G4 machines, type:

$ make pmac32_defconfig

9. When that is done, type

$ make menuconfig

And now navigate around to enable other options that you may need. (Ex: wireless drivers, tvcards, low-latency kernel, etc.) If you don't enable what you need, you won't have it! Press space bar to enable support as a module. This is generally desired over built-in modules in most cases. If you forget something, you can always go back to this step later and recompile your kernel.

Suggestions for a low-latency audio kernel:
Kernel Options>Timer Frequency>1000 HZ
Kernel Options>Preemption Model>(X) Preemptible Kernel (Low-Latency Desktop)

Wireless support:
Networking>enable all IEEE 802.11 options as <M> module

Airport and Airport Extreme support:

Device Drivers>Network device support>Wireless LAN (non-hamradio)><M>Broadcom BCM43xx wireless support
Device Drivers>Network device support>Wireless LAN (non-hamradio)><M>Apple Airport support (built-in)

as well as enabling other wireless drivers as needed. If unsure of your wifi chipset, just enable all wireless drivers in this section.

Then when you are finished, keep hitting ESC to exit and say 'Yes' you want to save.

10. Now type

$ make && make modules_install

to compile everything. If you have a dual processor, type

$ make -j4 && make modules_install

to use both CPUs to compile this in less time.

11. Ok you have a compiled kernel. Now you must add it to the bootloader in order to boot from it.

In the terminal, first back up your working bootable kernel:

$ cd /boot

$ mv vmlinux vmlinux.old

Now copy the new kernel there.

$ cp /usr/src/linux/vmlinux /boot/vmlinux

$ cp /usr/src/linux/System.map /boot/System.map

12. Now edit yaboot. Change the line initrd to the new image, /boot/vmlinux

$ nano /etc/yaboot.conf

{{{
## yaboot.conf generated by the Ubuntu installer
##
## run: "man yaboot.conf" for details. Do not make changes until you have!!
## see also: /usr/share/doc/yaboot/examples for example configurations.
##
## For a dual-boot menu, add one or more of:
## bsd=/dev/hdaX, macos=/dev/hdaY, macosx=/dev/hdaZ

boot=/dev/sda2
device=/ht@0,f2000000/pci@5/k2-sata-root@c/k2-sata@0/disk@0:
partition=3
root=/dev/sda3
timeout=100
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot
enablecdboot
enableofboot
enablenetboot
macosx=/dev/sda5
#defaultos=macosx

image=/boot/vmlinux
 label=Linux
 read-only
 initrd=/boot/vmlinux
# initrd=/boot/initrd.img
 append="quiet splash"

image=/boot/vmlinux.old
 label=old
 read-only
 initrd=/boot/initrd.img.old
 append="quiet splash"

}}}


13. Cntl-X and save. Now write the changes to the boot partition.

$ ybin -v

14. Reboot, and you will boot into your new kernel.

This is work in progress see http://www.ubuntuforums.org/showthread.php?t=377978

Many more general questions have answers at ["CommonQuestions"]

General Questions

Which Macs are compatible with Ubuntu?

All newworld Macs should work. This means iMacs, iBooks, blue & white G3s, Lombard G3 PowerBooks and newer. The minimum system requirements are 256 MB of RAM and 3 GB of hard disk space.

Currently as of Feisty for iBooks/Powerbooks sleep, wireless, and external display are all supported with models having ATI graphics. Owners of the 12" Powerbook G4 models with the Nvidia graphics chip: sleep is not possible, because of insufficient hardware information from Nvidia.

Is Ubuntu supported on PowerPC?

Ubuntu 6.10 was the last official supported PowerPC version of Ubuntu. Future version will be community supported. This was [https://lists.ubuntu.com/archives/ubuntu-announce/2007-February/000098.html announced] on the mailing list.

Is Ubuntu still available on PowerPC?

Yes, although it is not official supported. Future versions may not be on all mirrors. Feisty disk images can be found at http://cdimage.ubuntu.com/ports/releases/feisty/release/ .

Mirrors

Most ubuntu mirrors no longer have powerpc disks. Please add any that you find that do.

ftp://ftp.gnome-db.org/mirror/cdimage.ubuntu.com/ports/releases/7.04/release/

Buying disks

The Linux store sell disks containing the whole ubuntu repositories. http://www.thelinuxstore.ca/index.php?main_page=product_info&products_id=1302

Where can I find Kubuntu, Xubuntu, Edubuntu ... for PowerPC?

Kubuntu disks are at http://cdimage.ubuntu.com/kubuntu/ports/releases/7.04/release/

Edubuntu disks are at http://cdimage.ubuntu.com/edubuntu/ports/releases/feisty/release/

There do not appear to be xubuntu disks for feisty final, but there are feisty beta disks. It would be possible to install with this and then upgrade to the final release. http://cdimage.ubuntu.com/xubuntu/ports/releases/7.04/beta/

Installing a derivative from an ubuntu install disk

You will need to install using the Ubuntu cds (see above). Then [wiki:InstallingSoftware install] the required *-desktop package. For example kubuntu-desktop.

To remove gnome, and the gnome apps run

sudo apt-get remove ubuntu-desktop
sudo apt-get autoremove

If you are confident with the command line, you can do a minimal or server install from the alternate cd, and then add the required *-desktop package. This removes the need to uninstall Gnome.

What about OldWorld Macs?

All Macs prior to the original iMac are known as [https://help.ubuntu.com/community/OldWorld OldWorld] Macs. You will need a Mac OS 9 install CD to correctly set up Ubuntu on an [https://help.ubuntu.com/community/OldWorld OldWorld] Mac. Read this wiki for more help on installing:

https://help.ubuntu.com/community/Installation/OldWorldMacs

Installation

How do I get a Mac to boot from CD?

The simplest method is to hold down the 'C' key (for x86 Macs use the 'D' key) as you turn the power on. Once you hear the CD drive reading the disk you can release the key.

Yaboot Configuration

The file /etc/yaboot.conf can be edited to change the booting behavior of your PowerPC Linux machine.

Edit the file with root privileges:

sudo nano /etc/yaboot.conf

After editing and saving the file, you must run this to write changes to the boot partition:

sudo ybin -v

To have more boot menu options include these lines in your yaboot.conf:

enablecdboot
enableofboot
enablenetboot

To have yaboot default to booting to OS X include this line in your yaboot.conf:

defaultos=macosx

To change the colors of the yaboot screen include these lines below. Alter as desired. These settings below create a color screen similar to the OS X open firmware colors.

fgcolor=black
bgcolor=white

To boot into single user mode type this at the yaboot prompt:

Linux single

Multimedia

Java, video codecs, and DVD playback

Add the http://medibuntu.sos-sts.com/index.php Medibuntu repo to your /etc/apt/sources.list

wget -q http://medibuntu.sos-sts.com/repo/medibuntu-key.gpg -O- | sudo apt-key add -

sudo wget http://medibuntu.sos-sts.com/sources.list.d/feisty.list -O /etc/apt/sources.list.d/medibuntu.list

sudo apt-get update

sudo apt-get install ibm-j2re1.5 ppc-codecs libdvdcss2


Flash and flash video

sudo apt-get install gnash vlc

Gnash has support for most basic flash webpages.

To view Youtube (and probably similar websites too), you can't watch the movie in the browser with Gnash, however you can download it to your hard disk and then watch it. Firefox users can simply use the VideoDownloader extension https://addons.mozilla.org/en-US/firefox/addon/2390 (you will need to add the extension to the file - .flv for youtube). More generally, you can see this page http://1024k.de/bookmarklets/video-bookmarklets.html to download the video file.

Then simply open that .flv file in VLC. Enjoy your youtube video. Note: You must have gnash installed, otherwise youtube will redirect you, claiming there is no flash installed.


Windows Media 9 codecs, Quicktime H.264 and others

VLC will play almost every codec on the planet, including the most recent windows media audio and video codecs.


Multimedia browser plugin

Some have had great success with the mplayer mozilla plugin with such video as trailers from apple.com

sudo apt-get install mozilla-mplayer

You might have to remove the totem plugin, as it will confict with the mplayer-plugin.

sudo apt-get remove totem-mozilla

Realplayer

Download Realplayer 10.0.4 for PowerPC Linux here: https://player.helixcommunity.org/2005/downloads/

Look for the "RealPlayer 10.0.4 Gold 04/22/2005" Installer link for Linux-ppc, about halfway down the page on the right.

Download the file, the type

chmod + x realplay[press tab to autocomplete]

and press enter to make the installer executable.

Then,

sudo ./realplay[press tab to autocomplete]

and hit Enter.

For the install directory, type /opt/RealPlayer

Configure system wide links: hit Enter. Default is fine.

Type realplay in a terminal and RealPlayer will start.

Drivers and Hardware

Will my wireless work?

The original airport wireless cards work fine straight out of the box on ubuntu.

Airport extreme wireless cards require some setting up. See ["WifiDocs/Driver/bcm43xx"] for pre-Feisty information.

In Feisty the Airport Extreme support is built in, but you must fetch the firmware. Simply type

sudo apt-get install bcm43xx-fwcutter

and reboot. Your airport extreme will now work.

Enable sound with my Powerbook

The Feisty install fails to add the proper sound module to /etc/modules. To fix this,

sudo nano /etc/modules

and the at the bottom add snd-powermac to the list. Ctrl-X and 'Y' to save. Reboot, and sound will work.

Note: for TiBooks, there is currently a bug with sound. Read here for more info: https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/87652/

Current work around is to install a pre-2.6.20 kernel in Feisty.

Enable DVI out on my Powerbook

Note: this is for a 15" TiBook. You may have to alter the MetaModes and CloneMode values according to your notebook. This should work with any ATI based *book.

This configuration creates mirroring. A dual-extended display is perhaps possible.

Edit your /etc/X11/xorg.conf file as specified below. Connect your second display.

Then press Ctrl+Alt+Backspace [Delete key] to restart X.

Your second display will then turn on.

You'll have to unplug the second display, and restart X again to revert back.

Section "Device"
        Identifier      "ATI Technologies Inc Radeon R250 [Mobility FireGL 9000]"
        Driver          "ati"
        BusID           "PCI:0:16:0"
        #Option         "UseFBDev"              "true"
        Option          "AGPMode"       "4"
        Option          "AGPFastWrite"  "true"
        Option          "EnablePageFlip" "true"
        Option          "RenderAccel"   "true"
        Option          "AccelMethod"   "exa"
        Option          "backingstore"
        Option          "UseFWPLL"      "true"
        Option          "MergedFB"      "true"
        Option          "CRT2Position"  "Clone"
        Option          "MetaModes"     "1280x854 1024x768 800x600"
        Option          "CloneMode"     "1280x854"
EndSection

How do I control trackpad behaviour?

Install the package

powerpc-utils

To enable tap, run:

trackpad tap

to disable tap, run:

trackpad notap

see

man trackpad

for more details.

3D drivers, Beryl, Compiz

There are no official ATI nor Nvidia 3D drivers for PPC Linux. Neither company has developed any, nor released hardware specs to create a good open source driver. However, the current open source developed ati driver works well for most ATI chips, and has somewhat stable 3D support.

You do not need to download drivers from nvidia or ati's website. (There aren't any there for PPC Linux.) Currently, PPC Linux uses drivers which are built into the Linux kernel.

For Ati chips, make sure that your /etc/X11/xorg.conf has the driver specified as 'ati' or 'radeon' specifically for Radeon cards.

For Nvidia chips, make sure your /etc/X11/xorg.conf has the driver specified as 'nv'.

There is no DRM under PPC Linux for Nvidia chips, unfortunately.

The Nouveou project http://nouveau.freedesktop.org/wiki/ hopes to have 3D drivers for Nvidia very soon.

Beryl/Compiz should work under PPC Linux, assuming you have stable ATI drivers and good 3D going. Some ATI cards do not work well with 3D in PPC Linux, and others (particularly the recent iBooks/Powerbooks) seem to have very good results.

To test if your 3D is working (required for beryl or compiz), type:

glxinfo

in a terminal and look for "direct rendering: Yes" in the output, as well as a listing of glx extensions. You should be able to run glxgears to test that 3D is working:

glxgears

Beryl/Compiz tips:

Right click on the Beryl Manager, and pick Advanced Beryl Options>Rendering Path>Copy

And for Select Window Manager> Pick Compiz. Selecting Beryl makes the Beryl Manager crash and resort to the fall back window manager for some.

You may have to possibly add the following to the drivers section of your /etc/X11/xorg.conf:

Option "DRI" "true"
Option "GARTSize" "64"
Option "AddARGBGLXVisuals" "true"

This page has tips for ATI Radeon users:

http://www.howtoforge.com/ubuntu_feisty_beryl_ati_radeon

And here is the Feisty Beryl Wiki with PPC Linux info:

https://wiki.ubuntu.com/BerylOnFeisty

Sharing a printer with OS X

OS X can print directly to a Linux cups printer. There is no need to mess with samba or create users. To share your Linux cups printer with other OS X machines, simply replace your /etc/cups/cupsd.conf with the cupsd.conf file below, then restart cups (sudo /etc/init.d/cupsys restart).

Note: This is not PowerPC Linux specific and will work for any Ubuntu computer.

# /etc/cups/cupsd.conf
# Simple CUPS configuration file for a print server
# which serves printers within a private local area network.
# - There is no need for additional security within the print server, ie only authorized 
# people can access the machine.

# This setup also allows access to the CUPS "Administrative tasks" system
# via your web browser to http://localhost:631
# File based on Ubuntu 5.10 (Breezy Badger) (Linux version 2.6.12-10-386)
# Server Directives are explained in http://localhost:631/sam.html

# 25/04/2006
# DavidTangye@netscape.net

ConfigFilePerm 0600
LogLevel info
Printcap /var/run/cups/printcap
RunAsUser Yes
Port 631
Include cupsd-browsing.conf
BrowseAddress @LOCAL
BrowseAddress 10.0.0.0/8
BrowseAddress 172.16.0.0/12
BrowseAddress 192.168.0.0/16

<Location />
AuthType None
Order Deny,Allow
Deny From All
Allow From @LOCAL
Allow From 10.0.0.0/8
Allow From 172.16.0.0/12
Allow From 192.168.0.0/16
</Location>

<Location /jobs>
AuthType None
Order Deny,Allow
Deny From All
Allow From @LOCAL
Allow From 10.0.0.0/8
Allow From 172.16.0.0/12
Allow From 192.168.0.0/16
</Location>

<Location /printers>
AuthType None
Order Deny,Allow
Deny From All
Allow From @LOCAL
Allow From 10.0.0.0/8
Allow From 172.16.0.0/12
Allow From 192.168.0.0/16
</Location>

<Location /admin>
AuthType None
Order Deny,Allow
Deny From All
Allow From @LOCAL
Allow From 10.0.0.0/8
Allow From 172.16.0.0/12
Allow From 192.168.0.0/16
</Location>

Troubleshooting

After logging in I get a blank brown screen?

This could be caused by a number of problems.

  • Clock set before 1970. See ["UbuntuDateBug"]

  • Sound problems
    • Press CTRL+ALT+F1. Log in at the text terminal, if needed. Type
      • killall esd

      and press enter. Press CTRL+ALT+F7 to return to the desktop. Go to Gnome's Sound Prefs and uncheck the 'ESD' box.

How do I get Ubuntu working on an iMac G3?

Do you get a blank screen after booting? The problem is that xorg.conf is not set up properly for the iMac G3.

Follow these steps to fix xorg.conf:

After booting is complete:

  1. Type: ctrl-option-F1 (should give you a command prompt, may take a couple of tries)

  2. Type: sudo nano /etc/X11/xorg.conf (return)

  3. In the Monitors section, change "HorizSync" to 58-62 and "VertRefresh" to 75-117.

  4. Disable DRI. In the the Modules section, put a hash mark (#) at the beginning of the line containing "load dri".
  5. Type: ctrl-O (return) to write edited file

  6. Type: ctrl-X to exit nano back to command line

  7. Type: sudo /etc/init.d/gdm restart (return) to restart Gnome. (In Dapper and Edgy, the restart command is broken. Use sudo killall -HUP gdm instead.)

What about WINE, ndiswrapper, Adobe Flash 9?

Wine and ndiswrapper require x86 hardware, and therefore will not work on PowerPC hardware. Adobe does not make flash for PPC Linux, but there are open source alternatives for PPC Linux users.

What is Mac-On-Linux?

http://mac-on-linux.sourceforge.net/

Mac on Linux (sudo apt-get install mol) will let you boot up the OS X partition of a dual boot system, inside Linux. It is not software-emulated, so the actual speed is very fast. MOL currently only works on pre-G5 processors. It has not been ported to work on G5 processors yet, but a proper ppc64 port may be in the works.

How can I configure and compile my own kernel under PowerPC Linux?

How to compile your own kernel. Useful to enable a low-latency kernel for audio work, or to have a recent kernel from kernel.org.

1. Fetch a kernel from http://www.kernel.org (The "F" link at the top right is the stable kernel) and save to your home directory.

2. Open a terminal, and type

$ sudo -s

to get a root shell. Install the dev tools needed, if you haven't already:

$ apt-get install build-essential ncurses-base ncurses-dev

3. Then change to the linux source directory

$ cd /usr/src

4. Move the kernel you downloaded from your home directory to /usr/src

$ mv /home/[your username]/linux-2.6.21.1.tar.bz2 /usr/src/

5. Unpack the kernel sources:

$ tar -xvjf linux-2.6.21.1.tar.bz2

6. Make a link to the new kernel like this:

$ ln -sfn linux-2.6.21.1 linux

7. Change to the new directory

$ cd linux/

8. Now time to make a default kernel configuration.

For G5 machines, type:

$ make g5_defconfig

For all other macs, including G4 machines, type:

$ make pmac32_defconfig

9. When that is done, type

$ make menuconfig

And now navigate around to enable other options that you may need. (Ex: wireless drivers, tvcards, low-latency kernel, etc.) If you don't enable what you need, you won't have it! Press space bar to enable support as a module. This is generally desired over built-in modules in most cases. If you forget something, you can always go back to this step later and recompile your kernel.

Suggestions for a low-latency audio kernel: Kernel Options>Timer Frequency>1000 HZ Kernel Options>Preemption Model>(X) Preemptible Kernel (Low-Latency Desktop)

Wireless support: Networking>enable all IEEE 802.11 options as <M> module

Airport and Airport Extreme support:

Device Drivers>Network device support>Wireless LAN (non-hamradio)><M>Broadcom BCM43xx wireless support Device Drivers>Network device support>Wireless LAN (non-hamradio)><M>Apple Airport support (built-in)

as well as enabling other wireless drivers as needed. If unsure of your wifi chipset, just enable all wireless drivers in this section.

Then when you are finished, keep hitting ESC to exit and say 'Yes' you want to save.

10. Now type

$ make && make modules_install

to compile everything. If you have a dual processor, type

$ make -j4 && make modules_install

to use both CPUs to compile this in less time.

11. Ok you have a compiled kernel. Now you must add it to the bootloader in order to boot from it.

In the terminal, first back up your working bootable kernel:

$ cd /boot

$ mv vmlinux vmlinux.old

Now copy the new kernel there.

$ cp /usr/src/linux/vmlinux /boot/vmlinux

$ cp /usr/src/linux/System.map /boot/System.map

12. Now edit yaboot. Change the line initrd to the new image, /boot/vmlinux

$ nano /etc/yaboot.conf

## yaboot.conf generated by the Ubuntu installer
##
## run: "man yaboot.conf" for details. Do not make changes until you have!!
## see also: /usr/share/doc/yaboot/examples for example configurations.
##
## For a dual-boot menu, add one or more of:
## bsd=/dev/hdaX, macos=/dev/hdaY, macosx=/dev/hdaZ

boot=/dev/sda2
device=/ht@0,f2000000/pci@5/k2-sata-root@c/k2-sata@0/disk@0:
partition=3
root=/dev/sda3
timeout=100
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot
enablecdboot
enableofboot
enablenetboot
macosx=/dev/sda5
#defaultos=macosx

image=/boot/vmlinux
        label=Linux
        read-only
        initrd=/boot/vmlinux
#       initrd=/boot/initrd.img
        append="quiet splash"

image=/boot/vmlinux.old
        label=old
        read-only
        initrd=/boot/initrd.img.old
        append="quiet splash"

13. Cntl-X and save. Now write the changes to the boot partition.

$ ybin -v

14. Reboot, and you will boot into your new kernel.

Where can I get more help?

One of the best places for Ubuntu PowerPC help is in the [http://ubuntuforums.org/forumdisplay.php?f=133 forum]

PowerPCFAQ (last edited 2021-06-10 03:07:53 by guiverc)