Apple Debian PPC build procedure

From FGWiki
Jump to: navigation, search

At Free Geek Vancouver, recent Apple Macs with the PowerPC processor, such as recent computers in the iBook and the PowerBook series, are tested with the Debian PowerPC Linux operating system. Some steps must be taken before build to ensure that the tools for the build works properly.

If the Mac has an Intel processor, these instructions does not apply as Ubuntu Linux, the standard operating system at Free Geek, can be installed.

Automatic setup process

There is an experimental automatic setup script for PowerPC Macs with Debian installed. To use it:

Open a Terminal window by Clicking Applications at the top, then in the menu, select Accessories then Terminal.

Make sure that you have a wired network connection to the Free Geek network.

Type in the Terminal window (or select the line below, click Edit on the menu bar, then Copy, switch to the Terminal, then Edit/Paste)

wget  --no-check-certificate https://raw.github.com/gist/3805523/macfix

then press Enter. Then, type:

bash macfix

then press Enter again. Enter oem when it prompts for a password. Follow the onscreen instructions.

When the script completes, restart the computer, then follow the standard FGQC process.

The source for this script can be found here.

Enable sudo

Click System at the top, then in the menu, click "Administration" then "Users and Groups".

If a password prompt pops up, type oem.

In the Users Settings window that pops up, click Manage Groups.

Select sudo in the Groups Settings window, then click Properties.

Check the box next to oem in the "Group sudo Properties" box, then click OK.

If a password prompt pops up, type

oem

as the password.

Then, log out by clicking System then "Log Out oem", then "Log out".

After that, log back in.

Now, check if sudo works:

Click Applications, then in the menu, click Accessories then Terminal.

in the Terminal window that pops up, type:

sudo bash

In the password prompt, type oem.

If sudo works, the terminal should read:

root@debian:/home/oem#

And if it says:

oem is not in the sudoers file. This incident will be reported.

Check to see if you have logged out and back in.


Install fgqc

First, install lshw, the program fgqc uses to find out hardware specifications.

Make sure that you have a network connection, through Wi-Fi or Wired, to the Free Geek network.

Open a Terminal window by Clicking Applications at the top, then in the menu, select Accessories then Terminal.

Type in the Terminal window:

sudo aptitude install lshw

then press Enter. Wait for the installation to complete.

Next, download the FGQC application.

In the Terminal window, type:

wget preseed.shop.lan/scripts/fgqc

then press Enter. It should say something like this:

Resolving preseed.shop.lan... 10.0.5.61
Connecting to preseed.shop.lan|10.0.5.61|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 805
Saving to: “fgqc”
100%[======================================>] 805         --.-K/s   in 0s      
1970-03-09 13:20:14 (31.1 MB/s) - “fgqc” saved [805/805]

then, make FGQC executable: type

chmod +x fgqc

then press Enter.

Finally, move the FGQC file into the program files directories. type

sudo mv fgqc /usr/local/bin/

and then Enter.

Test fgqc by typing

fgqc

and then Enter, just like on a PC.

Set the clock automatically

Open a Terminal window by Clicking Applications at the top, then in the menu, select Accessories then Terminal.

type:

sudo aptitude install ntp

then Enter. Wait for it to complete.

Click System, then in the menu, click Administration then Time and Date.

In the window that pops up, click the little shield that is captioned "Click to make changes".

Type the password (oem).

Set the time zone to Vancouver, and then change configuration from Manual to Keep Synchronized with Internet Servers. Click Close.

Get Broadcom Wifi cards working

Most Macs come with Broadcom wireless cards (rebranded as Airport cards). Debian, like Ubuntu, contains a utility that can extract Broadcom Wi-Fi firmware, but by default, it cannot be installed.

First, enable the installation of contributed software.

Click System at the top, then in the menu, select Administration then Software Sources.

If a password prompt pops up, type oem as the password.

In the Software Sources window, check the box next to "DFSG-compatible Software with Non-Free dependencies (contrib) and the box next to "Non-DFSG-compatible Software (non-free)", then click Close.

A dialog should pop up, asking you to reload. Click Reload.

Next, run the standard Broadcom firmware installation command, like on PCs. Open a terminal and type:

sudo apt-get install b43-fwcutter firmware-b43-installer

then hit Enter. Once it installs, reboot and Wi-Fi should work.

Get the battery status to display

Some Mac laptops refuses to display the charge status of their batteries. This can be fixed.

Follow the instructions at http://blog.davidron.com/2011/01/ibook-battery-indication-in-ubuntu-1004.html .

Basically, open a Terminal, then type:

sudo gedit /etc/modules

and hit Enter.

If it prompts for a password, as always, type oem.

In the text editor that pops up, add to the bottom this line:

pmu_battery

then save by clicking Save. Close the window and restart the machine. It should display the battery status now on the top-right corner.

Get a video to play for testing

Debian PPC does not come with a demonstration video, so FGQC cannot run the Video test. However, we can install Ubuntu's video.

First, download the video package from Ubuntu's website. Open a Terminal and type:

wget http://ubuntu.wikimedia.org/ubuntu/pool/main/e/example-content/example-content_46_all.deb 

then hit Enter. and then, when that's complete, install it by typing:

sudo dpkg -i example-content_46_all.deb

Fix the colour depth problem on PowerBooks

Some PowerBooks refuses to display full 24-bit colour after installation, causing little coloured dots to appear in title bars and the background.

To make the machines display full colour: Open a Terminal and type:

sudo gedit /etc/X11/xorg.conf

Enter the password (should be oem) if it asks you.

Then, a blank text editor window should display. Type the following into the window:

Section "Screen"
    Identifier    "Default Screen"
    DefaultDepth    24
EndSection

And click the Save button. Reboot and the coloured dots should be gone and the machine should be able to display full colour.

Follow the standard FGQC build/QC process

Now the computer is ready for the standard build process. Some parts of the build process cannot run on a Mac.

  • Memtests cannot be done. A workaround is to remove any removable RAM and test them in a PC.
  • Battery capacity cannot be viewed. A workaround is to discharge the battery until the machine shuts down to measure the duration that the battery lasts.

If you know of a way to do these parts of build, please edit this page with this info.

Random tips for Macs and Debian

  • The default web browser is Epiphany, which is a fast and lightweight browser.
  • Firefox in Debian is renamed Iceweasel and is available at Applications/Internet/Iceweasel Web Browser.
  • Some Macs' keyboards activate the shortcut key when you push a button on the top, and the function key when you push Fn and the key. Some have the opposite behaviour. If, for example, the brightness buttons (F1 and F2 on an iBook) aren't working, try holding down Fn then press the key.