Showing 3 posts
A few months ago I bought an old PowerMac G5 off of Craigslist and since then I have been experimenting with various operating systems and configurations. Before I tell you more about these, let me briefly explain why I got such a machine.
I had always wanted one of these beasts. They look gorgeous (to me) and, to convince myself to get it, I thought that I would play with the PPC64 architecture. How? By getting NetBSD to run properly on these machines while learning enough to iron out the few rough edges that I thought were left. Unfortunately, that story didn’t go well (more below), so I ended up experimenting with various other operating systems.
July 15, 2013
·
Tags:
featured, mac, powerpc, review
Continue reading (about
6 minutes)
Suppose you have a nice PowerMac G5 big beast around and want to install a modern operating system on it. Suppose that you want FreeBSD to run on it. Suppose that you would like to use ZFS as much as possible, say to use the machine as a NAS.
If all of the above apply to you, you have come to the right place! Read on for how I got FreeBSD 10.0-CURRENT with a ZFS root to work on a PowerMac G5. I am pretty sure the instructions here apply to other PowerPC-based machines as well, although the specific details on how to set up the boot loader most likely differ.
July 11, 2013
·
Tags:
freebsd, mac, powerpc, zfs
Continue reading (about
4 minutes)
I'm decided to improve my knowledge on the Cell platform, and the best way to get started seems to be to learn 64-bit PowerPC assembly given that the PPU uses this instruction set. Learning this will open the door to do some more interesting tricks with the architecture's low-level details.
There are some excellent articles at IBM developerWorks dealing with this subject, and thanks to the first one in an introductory series to PPC64 I've been able to write the typical hello world program :-)
Without further ado, here is the code!
#You can build it with the following commands:
# The program's static data
#
.data
msg: .string "Hello, world!n"
length = . - msg
#
# Special section needed by the linker due to the C calling
# conventions in this platform.
#
.section ".opd", "aw" # aw = allocatable/writable
.global _start
_start:
.quad ._start, .TOC.@tocbase, 0
#
# The program's code
#
.text
._start:
li 0, 4 # write(2)
li 3, 1 # stdout file descriptor
lis 4, msg@highest # load 64-bit buffer address
ori 4, 4, msg@higher
rldicr 4, 4, 32, 31
oris 4, 4, msg@h
ori 4, 4, msg@l
li 5, length # buffer length
sc
li 0, 1 # _exit(2)
li 3, 0 # return success
sc
$ as -a64 -o hello.o hello.sI'm curious about as(1)'s -a option; its purpose is pretty obvious, but it is not documented anywhere in the manual page nor in the info files.
$ ld -melf64ppc -o hello hello.o
November 25, 2007
·
Tags:
cell, linux, powerpc
Continue reading (about
2 minutes)