Tag Archives: ppc

Apple G5 running Fedora 19

I bought this box about a year ago but I don’t think I wrote about it at the time (at least, I can’t find anything in the archives).

g5

It’s an Apple G5 circa 2005 which cost me £165 (from this eBay seller).

These boxes are sweet — dual socket, 64 bit, 4 GB of RAM, 80 GB of hard disk. It’s surprisingly fast for an 8 year old machine, and beautifully built. Anyone hazard a guess what this would have cost when new?

It runs Fedora perfectly, and has Alex’s “fake KVM” [PDF] support so you can run virtual machines pretty fast too.

$ cat /proc/cpuinfo 
processor	: 0
cpu		: PPC970MP, altivec supported
clock		: 1000.000000MHz
revision	: 1.1 (pvr 0044 0101)

processor	: 1
cpu		: PPC970MP, altivec supported
clock		: 1000.000000MHz
revision	: 1.1 (pvr 0044 0101)

timebase	: 33333333
platform	: PowerMac
model		: PowerMac11,2
machine		: PowerMac11,2
motherboard	: PowerMac11,2 MacRISC4 Power Macintosh 
detected as	: 337 (PowerMac G5 Dual Core)
pmac flags	: 00000000
L2 cache	: 1024K unified
pmac-generation	: NewWorld

$ free -m
             total       used       free     shared    buffers     cached
Mem:          3983       3966         16          0        221       3069
-/+ buffers/cache:        675       3308
Swap:         2911          0       2911

$ sudo lspci
0000:00:0b.0 PCI bridge: Apple Computer Inc. CPC945 PCIe Bridge
0000:0a:00.0 VGA compatible controller: nVidia Corporation NV43 [GeForce 6600 LE] (rev a2)
0001:00:00.0 Host bridge: Apple Computer Inc. U4 HT Bridge
0001:00:01.0 PCI bridge: Broadcom BCM5780 [HT2000] PCI-X bridge (rev a3)
0001:00:02.0 PCI bridge: Broadcom BCM5780 [HT2000] PCI-X bridge (rev a3)
0001:00:03.0 PCI bridge: Broadcom BCM5780 [HT2000] PCI-Express Bridge (rev a3)
0001:00:04.0 PCI bridge: Broadcom BCM5780 [HT2000] PCI-Express Bridge (rev a3)
0001:00:05.0 PCI bridge: Broadcom BCM5780 [HT2000] PCI-Express Bridge (rev a3)
0001:00:06.0 PCI bridge: Broadcom BCM5780 [HT2000] PCI-Express Bridge (rev a3)
0001:00:07.0 PCI bridge: Apple Computer Inc. Shasta PCI Bridge
0001:00:08.0 PCI bridge: Apple Computer Inc. Shasta PCI Bridge
0001:00:09.0 PCI bridge: Apple Computer Inc. Shasta PCI Bridge
0001:01:07.0 Unassigned class [ff00]: Apple Computer Inc. Shasta Mac I/O
0001:01:0b.0 USB Controller: NEC Corporation USB (rev 43)
0001:01:0b.1 USB Controller: NEC Corporation USB (rev 43)
0001:01:0b.2 USB Controller: NEC Corporation USB 2.0 (rev 04)
0001:03:0c.0 IDE interface: Broadcom K2 SATA
0001:03:0d.0 Unassigned class [ff00]: Apple Computer Inc. Shasta IDE
0001:03:0e.0 FireWire (IEEE 1394): Apple Computer Inc. Shasta Firewire
0001:05:04.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5780 Gigabit Ethernet (rev 03)
0001:05:04.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5780 Gigabit Ethernet (rev 03)
Advertisements

5 Comments

Filed under Uncategorized

Installing Ubuntu 12.04 PowerPPC on qemu

Fedora gave up building on ppc as a primary architecture a while back [edit: see comments], but Ubuntu has a working ppc build. This is useful for testing software because it’s a big endian architecture, and therefore breaks some assumptions made by software that has only seen an Intel (little endian) architecture.

Fortunately it’s very simple to install Ubuntu/ppc as a qemu guest. Here is how I did it:

  1. Download mini.iso from here.
  2. Compile qemu from git (it’s easy!) so you have a qemu-system-ppc binary with a working bios.
  3. Create a virtual hard disk: truncate -s 10G disk.img
  4. Boot the ISO: ./qemu-system-ppc -m 1024 -hda disk.img -cdrom mini.iso -boot d
  5. At the first prompt, type install and go through the installation.

At the end of the installation, it won’t install a boot loader, so the guest won’t be bootable without an external kernel and initrd. This is easy to arrange:

$ guestfish --ro -a disk.img -m /dev/sda2 \
    download /vmlinux vmlinux : \
    download /initrd.img initrd.img

With the external files vmlinux and initrd.img you can now boot your guest:

$ ./qemu-system-ppc -m 1024 \
    -hda disk.img \
    -kernel vmlinux -initrd initrd.img \
    -append "ro root=/dev/sda3"

10 Comments

Filed under Uncategorized