macppc
From NetBSD Wiki
| NetBSD/macppc | |
|---|---|
| Status: | active |
| First: | 1.4 |
| Last: | 5.0 |
| Maintainer: | |
NetBSD/macppc is a relatively new NetBSD port. The first binary release for macppc was NetBSD 1.4. It supports most Apple Power Macintosh computers with PowerPC processors and Open Firmware. (The NuBus machines do not work.) Almost all PPC Macs introduced after August 7, 1995 are supported. There is a complete list with details.
- For older (680x0-based) Macintosh computers, see NetBSD/mac68k.
- For newer (Intel-based) Macintosh computers, see an Apple Macbook w/core2duo that runs NetBSD/amd64.
- There is also an experimental NetBSD/bebox port for Be, Inc's PowerPC-based BeBox.
Contents |
Getting X to work
NetBSD 5.0 includes Xorg. NetBSD 4.0.1 and earlier include XFree86. If your Mac uses radeon(4) or nv(4), then you might be able to run X.
Xorg will not run without a config file, because Xorg will fail to find the keyboard. To get Xorg working, run Xorg -configure to generate a config file, and move it to /etc/X11/xorg.conf. Then edit the keyboard section to look like:
Section "InputDevice" Identifier "Keyboard0" Driver "kbd" Option "Protocol" "wskbd" Option "Device" "/dev/wskbd0" EndSection
To get XFree86 working, you can use this config for a Powerbook G4 6,8 12-inch or this config for an iBook G4 12-inch.
Be sure to use the 'kbd' driver for X, as the 'Keyboard' driver messes up a lot of keys. You won't need an xmodmap file with that driver.
iBooks with Radeon cards (at least G4)
To get X working, be sure to enable option "iBookHacks" in the videocard's Device section (use the radeon driver). Otherwise you'll get nothing but a blank screen. Not sure if it's documented...
In Xorg, this option was renamed to the more general option "MacModel" "ibook". For other mac models, see the radeon(4) manpage.
Keyboard
The Apple keyboard is a little strange. You can configure in OS X whether the Fn key needs to be pressed for the F1 through F12 keys to be interpreted as function keys or as media keys (for brightness and volume control, num lock and CD eject key). This is a option that is stored in OFW and will also be honored in NetBSD.
In case you don't run OS X, you can also recompile the kernel with the FORCE_FUNCTION_KEYS option, but the clean way is to set the OFW option.
Trackpad
NetBSD 5.0 may attach the adbms(4) driver to your laptop trackpad. (The driver was ams(4) in NetBSD 4.0.1.). The driver supports tapping. If you tap the trackpad, then NetBSD will click like you pressed the trackpad button. You can disable the tapping feature:
$ sysctl -w machdep.adbms0.tapping=0
You can put machdep.adbms0.tapping=0 in /etc/sysctl.conf to disable tapping at boot.
Power management
NetBSD can check the AC/battery status in most macppc laptops, but NetBSD does not support sleep/suspend and cannot adjust the CPU speed in most machines.
NetBSD 4.0.1 attaches the apm(4) "emulation" driver so that you can use apm(8) to check the AC/battery. You can also run apmd(8). This does not work with NetBSD 5.0.
NetBSD 5.0 attaches the pmu(4) driver which uses the envsys(4) framework. You can use envstat(8) to check the AC/battery. You can also run powerd(8) and edit /etc/powerd/scripts/acadapter to react to AC connection and disconnection.
Example on a PowerBook G4:
$ envstat -d smartbat0
Current CritMax CritMin CritCap Unit
AC present: ON
Battery present: ON
Battery voltage: 12.765 V
Battery current: 0.221 A
Battery design cap: 3.479 Ah
Battery charge: 3.479 Ah
Battery charging: ON
Battery full: OFF
Additional Information
- How to install NetBSD on a Power Macintosh 7300
- How to install NetBSD on a Power Macintosh G4 (Grey)
- PowerBook G4 5,4
- This is actually a report letter I wrote about my first installation of NetBSD/macppc on an iMac some long time ago. Might be useful for the impatient: http://skosi.org/~lkundrak/misc/macppc/
- Johan Wallen's new apple trackpad driver http://mail-index.netbsd.org/port-macppc/2005/10/28/0000.html (integrated in NetBSD 4.0, see pbms(4.macppc))
