Tag Archives: ppc64

OCaml 4.04, RISC-V, S/390, POWER and more …

I pushed OCaml 4.04.0 to Fedora Rawhide last week. There are loads of new features for OCaml users, but the ones that particularly affect Fedora are:

  • New, upstream POWER (ppc64, ppc64le) backend, replacing the downstream one that we have maintained for a few years. I was quite apprehensive about this change because I had tried the new backend during the OCaml 4.03 release cycle and found it to be quite unstable. However the latest version looks rock solid and has no problem compiling the entire Fedora+OCaml software suite.
  • New, upstream S/390x backend. I actually found and fixed a bug, go me!
  • New, non-upstream RISC-V backend. I found a bug in this backend too, but it proved to be easy to fix. You can now install and run most of the OCaml packages on Fedora/RISC-V.

And talking about Fedora/RISC-V, it took a month, but the mass-rebuild of all Fedora packages completed, and now we’ve got about ⅔rds of all Fedora packages available for RISC-V. That’s quite a lot:

$ du -sh SRPMS/ RPMS/


Filed under Uncategorized

Not very serious quest to run Linux on every architecture

Just looking at the Debian Ports page, how many of these architectures do I own?

Arch Notes
Alpha Good, working Alpha hardware is getting hard to obtain these days.
amd64 (x86-64) Obviously …
ARM (32 bit) I don’t really care about anything less than ARM version 7 these days, although I do have a Sheevaplug which I think is v5 or v6. My “go-to” 32 bit ARM board is the Cubietruck.
ARM (64 bit) I don’t own, but have under my desk at work, the Applied Micro X-gene (picture), and a lovely piece of kit it is too.
HP-PA I would love to get my hands on some HP-PA RISC hardware, but it’s even harder to get hold of than Alpha. Edit: If you really want HP PA then the HP C8000 workstation is available on eBay for $300 or so.
i386 I own a Lenovo X60s laptop, which is one of the few 32 bit Intel processors with (very slow) hardware virtualization
ia64 HP Itanium RX2620
M68K As I started out my professional career writing 68k assembler, I’d love to buy an MVME crate, but incredibly they go for upwards of $1000 on ebay, even 20 years after they stopped being made.
MIPS ✓/✗ I just bought the MIPS Creator CI20. I don’t own any Big Endian MIPS hardware, nor any 64 bit MIPS hardware.
OpenRISC I have this burned into an FPGA, but in storage.
PPC (32 bit) I recently sent a couple of old 32 bit Mac G4s to recycling.
PPC/POWER (64 bit) ✓/✗ I own a Mac G5 running Linux (picture). However I don’t own, and as far as I know cannot get my hands on any of the more interesting POWER7 or POWER8 hardware, although I have remote access to it through Red Hat.
s390/s390x Similar to ppc64, no possible way to own it, but I am able to remote access it through Red Hat.
SPARC (32 bit) Currently sitting in storage, but it’s there and it used to run Linux, albeit with only 128 MB of RAM
SPARC (64 bit) Is it possible to buy 64 bit SPARC hardware for a reasonable price?

Looks like I’m about half way there!


Filed under Uncategorized

virt-builder: Fedora 21 ppc64 and ppc64le images

virt-builder now has Fedora 21 ppc64 and ppc64le images available, and you can run these under emulation on an x86-64 host. Here’s how to do it:

$ virt-builder --arch ppc64 fedora-21 \
    -o fedora-21-ppc64.img


$ virt-builder --arch ppc64le fedora-21 \
    -o fedora-21-ppc64le.img

To boot them:

$ qemu-system-ppc64 -M pseries -cpu POWER8 -m 4096 \
    -drive file=fedora-21-ppc64[le].img \
    -serial stdio

Oddly the boot messages will appear on the GUI, but the login prompt will only appear on the serial console. (Fixed)

Libvirt also has support, so with a sufficiently new version of the toolchain you can also use:

$ virt-install --import --name=guestname \
    --ram=4096 --vcpus=1 \
    --os-type=linux --os-variant=fedora21 \
    --arch=ppc64[le] --machine pseries \
$ virsh start guestname

It’s quite fun to play with Big Iron, even in an emulator that runs at about 1/1000th the speed of the real thing. I know a lot about this, because we have POWER8 machines at Red Hat, and they really are the fastest computers alive, by a significant multiple. Of course, they also cost a fortune and use huge amounts of power.

Some random observations:

  1. The virt-builder --size parameter cannot resize the ppc64 guest filesystem correctly, because Anaconda uses an extended partition. Workaround is to either add a second disk or to create another extended partition in the extra space. (Fixed)
  2. The disks are ibmvscsi model (not virtio or ide). This is the default, but something to think about if you edit or create the libvirt XML manually.
  3. Somehow the same CPU/machine model works for both Big Endian and Little Endian guests. It must somehow auto-detect the guest type, but I couldn’t work out how that works. Anyway, it just works by magic. it’s done by the kernel
  4. libguestfs inspection is broken for ppc64le
  5. Because TCG (qemu software emulation) is single threaded, only use a single vCPU. If you use more, it’ll actually slow the thing down.

Thanks: Maros Zatko for working out the virt-install command line and implementing the virt-builder script to build the images.

Leave a comment

Filed under Uncategorized

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).


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)


Filed under Uncategorized

Booting Fedora 19 ppc64 netinst under qemu on x86-64

My notes on getting the Fedora 19 ppc64 netinst image to boot under qemu on an x86-64 machine.

Note: I’ve no idea if this is a good way, or a recommended way, but it worked for me.

1. Prerequisites:

I’m using Fedora 19 on the host. Note qemu-1.4 in Fedora does not work. I’m not using libvirt to manage the guest, although it’d be nice to get this working one day.

2. Compile qemu-system-ppc64 from upstream git.

3. Create an empty hard disk to store the guest:

# lvcreate -L 16G -n f20ppc64 /dev/fedora

or use truncate or qemu-img create.

4. Boot the netinst ISO using this qemu command line:

$ ./ppc64-softmmu/qemu-system-ppc64 \
    -cpu POWER7 \
    -machine pseries \
    -m 2048 \
    -hda /dev/fedora/f20ppc64 \
    -cdrom Fedora-19-ppc64-netinst.iso \
    -netdev user,id=usernet,net= \
    -device virtio-net-pci,netdev=usernet

5. You should get to the yaboot prompt.

There seems to be a rendering bug with graphics (X) in the qemu console. Anaconda was obviously running, but no drawing was happening in X, making it impossible to start the install. Oddly the exact same thing happened with VNC. Therefore I used a text-mode install:

boot: linux text

6. That should boot into the textual Anaconda installer.

If it gets stuck at returning from prom_init (and you should wait a minute or two to ensure it’s really stuck) then the problem is broken qemu, or you’re using the wrong CPU/machine type, or you’re trying to use a 64 bit kernel on 32 bit qemu.

QEMU tip: Use [Ctrl] [Alt] 2 to switch to the monitor. Use the monitor command sendkey ctrl-alt-f1 to send keycodes to the guest. Use [Ctrl] [Alt] 1 to switch back to the guest console.

tmux tip: Use [Ctrl] b [1-5] to switch between tmux windows.

1 Comment

Filed under Uncategorized