Mid 2000s PowerPC Macs are like a strange alternate reality these days. Looking at eBay, this hardware is still affordable-ish, so not entirely restricted to vintage hardware collectors with too much disposable income. NetBSD, of course, still has excellent support for them.

I never had one at the time (although I remember the struggles of a friend attempting to play an online game with only one mouse button), but I do enjoy the weirdness of OpenFirmware.

notes on video output

The G4 Mac Mini has a DVI port. Do not use it to connect to modern monitors with DVI! Anything around 1080p exceeds its maximum clock speed and you won’t get video output.

I’ve had the best luck using a passive DVI to VGA adapter and connecting to 1080p monitors with VGA. It’s amazing how versatile analog is…

I’m writing this here because it took me forever to figure out why I wasn’t getting any display output.

A freshly booted system in a messy room.

Mess aside, with VGA, the radeonfb driver easily detects the monitor and automatically switches to 1080p.

installing

I recommend following Sevan Janiyan’s installation guide for NetBSD/macppc. He recommends dual booting. It’s important to keep Tiger around for emergencies, upgrading, in case you want to run any classic PowerPC Mac OS children’s games, and so on.

Here it is reproduced, with some extra notes:

  • Boot from the OS X Tiger install disk

  • Run Disk Utility

  • Partition the disk into 3 partitions:

    • For OS X, 5GB is more than enough if you install the bare minimum

    • For NetBSD root

    • For NetBSD swap (you will need swap)

  • Install OS X Tiger

  • Copy ofwboot.xcf to / on the OS X partition as well as netbsd-GENERIC.gz (but rename it to netbsd.gz)

  • Boot from the NetBSD install CD

  • Drop to the shell

  • Run pdisk /dev/wd0

  • Change the types for partitions B & C from step 3 above to Apple_UNIX_SVR2, using one for root, and swap for the other.

  • install netbsd & when asked, use existing partitions

  • reboot & enter OpenFirmware by holding command + option + o + f when the chime plays.

    • For those of us with normal keyboards, that’s win + alt + o + f (this also took me a while to figure out).

Example 1: OpenFirmware commands to boot NetBSD
setenv boot-device hd:,\ofwboot.xcf
setenv boot-file netbsd.gz
setenv boot-command ." hello" cr " screen" output boot
reset-all

upgrading

Currently, I upgrade using sysupgrade. Since the NetBSD kernel (netbsd.gz) lives on an Apple HFS partition, and NetBSD’s HFS support is read-only, you do however have to boot into macOS to update the NetBSD kernel. For ABI/API safety reasons, you should always update the kernel before updating the userspace…

By the time it came to upgrade this machine, I’d forgotten how to boot into Mac OS X Tiger. This is the secret OpenFirmware incantation:

Example 2: OpenFirmware command to boot Tiger
boot hd:,\\:tbxi

Getting it to stop booting into Tiger is then the hard part. Refer to the OpenFirmware settings above…

so, is this actually useful?

I actually do use NetBSD/macppc! The machine was a gift from a former NetBSD developer, so occasionally it gets used for development.

Currently, it mainly serves as a remotely controllable CD burning machine (using cdrecord). As a hobbyist DJ, I have some older equipment (some CDJ-800Mk2s), which can only take CDs. They can be used with a timecode CD and a computer, but I prefer to not rely on the computer. None of my modern hardware has a CD drive, and this hardware is nice and small.

CDJ-800Mk2, not my image, but you get the idea.

I also use it as a remotely controllable music player. Sometimes friends are given SSH access to the machine when they want to test their software on 32-bit PowerPC.

As far as I am aware, the 32-bit pkgsrc packages are built on G4 Mac Minis. Thanks to the work of he@, even bulky stuff like Rust works. There is also a package repository for Mac OS X Tiger that is built on a modified Mac Mini. Since the stock IDE drive is tiny and slow, upgrading to an IDE SSD (if you can find one…) might be advisable.

It can be used as a desktop if all you care about is music, viewing images, and having a few xterms open. For aesthetic reasons, I recommend running mlvwm. The stock RAM is tiny, only 256 MB DDR SDRAM! Otherwise, it’s just like any other NetBSD box.

Much love to the NetBSD massive.

obligatory dmesg

Yes, I am using a Microsoft mouse. Sacrilege, I know.

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
    2018, 2019, 2020 The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 9.2 (GENERIC) #0: Wed May 12 13:15:55 UTC 2021
        mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/macppc/compile/GENERIC
total memory = 256 MB
avail memory = 233 MB
timecounter: Timecounters tick every 10.000 msec
Kernelized RAIDframe activated
found openpic PIC at 80040000
OpenPIC Version 1.2: Supports 4 CPUs and 64 interrupt sources.
bootpath: /pci@f4000000/ata-6@d/disk@0:0/netbsd.gz
mainbus0 (root)
cpu0 at mainbus0: 7447A (Revision 1.2), ID 0 (primary)
cpu0: HID0 0x84d0c1bc<EMCP,TBEN,HIGH_BAT_EN,NAP,DPM,ICE,DCE,XBSEN,SGE,BTIC,LRSTK,FOLD,BHT>, powersave: 1
cpu0: 1416.67 MHz, 512KB L2 cache no parity
memory0 at mainbus0: len=128
spdmem0 at memory0
spdmem0: DDR SDRAM, no parity or ECC, 256MB, 400MHz (PC-3200)
spdmem0: 13 rows, 10 cols, 1 ranks, 4 banks/chip, 5.0ns cycle time
spdmem0: tAA-tRCD-tRP-tRAS: 2-3-3-8
spdmem0: voltage SSTL 2.5V, refresh time 7.8us (self-refreshing)
uni_n0 at mainbus0 address 0xf8000000
hw-clock at uni_n0 not configured
ki2c0 at uni_n0 address 0xf8001000
iic0 at ki2c0: I2C bus
cereal at iic0 addr 0xe0 not configured
uninorth0 at mainbus0
pci0 at uninorth0 bus 0
pci0: i/o space, memory space enabled
pchb0 at pci0 dev 11 function 0
pchb0: Apple Computer UniNorth AGP Bridge (rev. 0x00)
radeonfb0 at pci0 dev 16 function 0: ATI Technologies Radeon 9200 5962 (rev. 0x01)
trying to read disabled BIOS...
radeonfb0: No video BIOS, using default clocks
radeonfb0: refclk = 27.000 MHz, refdiv = 12 minpll = 125000, maxpll = 400000
radeonfb0: 64 MB aperture at 0x98000000, 64 KB registers at 0x90000000
radeonfb0: display 0: initial virtual resolution 1920x1080 at 8 bpp
radeonfb0: using 32 MB per display
radeonfb0: port 0: physical 1920x1080 60Hz
radeonfb0: port 1: physical 1920x1080 60Hz
wsdisplay0 at radeonfb0 kbdmux 1: console (fb, vt100 emulation)
wsmux1: connecting to wsdisplay0
drm at radeonfb0 not configured
uninorth1 at mainbus0
pci1 at uninorth1 bus 0
pci1: i/o space, memory space enabled
pchb1 at pci1 dev 11 function 0
pchb1: Apple Computer UniNorth Host-PCI Bridge (rev. 0x00)
obio0 at pci1 dev 23 function 0: addr 0x80000000
zsc0 at obio0 irq 22,23
zstty0 at zsc0 channel 0
zstty1 at zsc0 channel 1
snapper0 at obio0 offset 0x10000: irq 30,1,2
pmu0 at obio0 offset 0x16000 irq 47:  rev. 85
pmu0: initializing IIC bus
iic1 at pmu0: I2C bus
admtemp0 at iic1 addr 0x48: MAX6642 temperature sensor: id. 0x4d, rev. 0x4d
pmu0: initializing RTC
pmu0: power-mgt not configured
pmu0: pmu-pwm-fans not configured
ki2c1 at obio0
iic2 at ki2c1: I2C bus
cereal at iic2 addr 0xe0 not configured
wdc0 at obio0 offset 0x20000 irq 24, level triggered: DMA transfer
atabus0 at wdc0 channel 0
snapper0: software codec
audio0 at snapper0: playback, capture, full duplex
audio0: slinear_be:16 -> slinear_be:16 2ch 48000Hz, blk 4096 bytes (21.3ms) for playback
audio0: slinear_be:16 <- slinear_be:16 2ch 48000Hz, blk 4096 bytes (21.3ms) for recording
spkr0 at audio0: PC Speaker (synthesized)
wsbell at spkr0 not configured
ohci0 at pci1 dev 24 function 0: Apple Computer Intrepid USB Controller (rev. 0x00)
ohci0: autoconfiguration error: memory access is disabled
ohci1 at pci1 dev 25 function 0: Apple Computer Intrepid USB Controller (rev. 0x00)
ohci1: autoconfiguration error: memory access is disabled
ohci2 at pci1 dev 26 function 0: Apple Computer Intrepid USB Controller (rev. 0x00)
ohci2: interrupting at irq 29
ohci2: OHCI version 1.0, legacy support
usb0 at ohci2: USB revision 1.0
ohci3 at pci1 dev 27 function 0: NEC USB Host Controller (rev. 0x43)
ohci3: interrupting at irq 63
ohci3: OHCI version 1.0
usb1 at ohci3: USB revision 1.0
ohci4 at pci1 dev 27 function 1: NEC USB Host Controller (rev. 0x43)
ohci4: interrupting at irq 63
ohci4: OHCI version 1.0
usb2 at ohci4: USB revision 1.0
ehci0 at pci1 dev 27 function 2: NEC USB2 Host Controller (rev. 0x04)
ehci0: interrupting at irq 63
ehci0: EHCI version 1.0
ehci0: 2 companion controllers, 3 ports each: ohci3 ohci4
usb3 at ehci0: USB revision 2.0
uninorth2 at mainbus0
pci2 at uninorth2 bus 0
pci2: i/o space, memory space enabled
pchb2 at pci2 dev 11 function 0
pchb2: Apple Computer UniNorth Host-PCI Bridge (rev. 0x00)
wdc1 at pci2 dev 13 function 0: interrupting at irq 39
atabus1 at wdc1 channel 0
fwohci0 at pci2 dev 14 function 0: Apple Computer UniNorth Firewire (rev. 0x81)
fwohci0: interrupting at irq 40
fwohci0: OHCI version 1.10 (ROM=0)
fwohci0: No. of Isochronous channels is 8.
fwohci0: EUI64 00:11:24:ff:fe:77:aa:66
fwohci0: Phy 1394a available S400, 2 ports.
fwohci0: Link S400, max_rec 2048 bytes.
ieee1394if0 at fwohci0: IEEE1394 bus
fwip0 at ieee1394if0: IP over IEEE1394
fwohci0: Initiate bus reset
fwohci0: Clear PME# now
gem0 at pci2 dev 15 function 0: Apple Computer GMAC Ethernet (rev. 0x80)
gem0: interrupting at irq 41
bmtphy0 at gem0 phy 0: BCM5221 10/100 media interface, rev. 4
bmtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
gem0: Ethernet address 00:11:xx:xx:xx:xx, 10KB RX fifo, 4KB TX fifo
vmmask 66f80000 schedmask 7ff80000 highmask 7ff80000
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
timecounter: Timecounter "mftb" frequency 41620997 Hz quality 100
fwohci0: BUS reset
fwohci0: node_id=0xc800ffc0, gen=2, CYCLEMASTER mode
ieee1394if0: 1 nodes, maxhop <= 0 cable IRM irm(0) (me)
ieee1394if0: bus manager 0
uhub0 at usb0: NetBSD (0000) OHCI root hub (0000), class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhub1 at usb1: NetBSD (0000) OHCI root hub (0000), class 9/0, rev 1.00/1.00, addr 1
uhub1: 3 ports with 3 removable, self powered
uhub2 at usb2: NetBSD (0000) OHCI root hub (0000), class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
uhub3 at usb3: NetBSD (0000) EHCI root hub (0000), class 9/0, rev 2.00/1.00, addr 1
uhub3: 5 ports with 5 removable, self powered
IPsec: Initialized Security Association Processing.
atapibus0 at atabus1: 2 targets
cd0 at atapibus0 drive 1: <MATSHITACD-RW  CW-8123, , CAD4> cdrom removable
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
wd0 at atabus1 drive 0
wd0: <ST9808210A>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 76319 MB, 155061 cyl, 16 head, 63 sec, 512 bytes/sect x 156301488 sectors
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd0(wdc1:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100) (using DMA)
cd0(wdc1:0:1): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33) (using DMA)
swwdog0: software watchdog initialized
WARNING: 2 errors while detecting hardware; check system log.
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
kern.module.path=/stand/macppc/9.2/modules
uhidev0 at uhub1 port 1 configuration 1 interface 0
uhidev0: Holtek Semiconductor (0x4d9) USB-HID Keyboard (0x112), rev 1.10/1.12, addr 2, iclass 3/1
ukbd0 at uhidev0
wskbd0 at ukbd0: console keyboard, using wsdisplay0
uhidev1 at uhub1 port 1 configuration 1 interface 1
uhidev1: Holtek Semiconductor (0x4d9) USB-HID Keyboard (0x112), rev 1.10/1.12, addr 2, iclass 3/0
uhidev1: 2 report ids
uhid0 at uhidev1 reportid 1: input=1, output=0, feature=0
uhid1 at uhidev1 reportid 2: input=4, output=0, feature=0
uhidev2 at uhub1 port 1 configuration 1 interface 2
uhidev2: Holtek Semiconductor (0x4d9) USB-HID Keyboard (0x112), rev 1.10/1.12, addr 2, iclass 3/0
uhid2 at uhidev2: input=64, output=64, feature=0
uhidev3 at uhub2 port 1 configuration 1 interface 0
uhidev3: Microsoft (0x45e) MicrosoftM-BM-. Classic IntelliMouseM-BM-. (0x823), rev 2.00/0.40, addr 2, iclass 3/1
uhidev3: 26 report ids
ums0 at uhidev3 reportid 26: 5 buttons and Z dir
wsmouse0 at ums0 mux 0
uhidev4 at uhub2 port 1 configuration 1 interface 1
uhidev4: Microsoft (0x45e) MicrosoftM-BM-. Classic IntelliMouseM-BM-. (0x823), rev 2.00/0.40, addr 2, iclass 3/0
uhidev4: 42 report ids
uhid3 at uhidev4 reportid 28: input=4, output=0, feature=0
uhid4 at uhidev4 reportid 36: input=0, output=0, feature=31
uhid5 at uhidev4 reportid 39: input=31, output=0, feature=0
uhid6 at uhidev4 reportid 42: input=8, output=0, feature=0