How to build 64-bit, EFI-enabled grub on Mac OS X

# in your dev directory..
mkdir grub; cd grub

mkdir objconv; cd objconv
# "objconv" is required by the grub build. Its home page is
g++ -o objconv -O2 *.cpp
sudo cp objconv /usr/local/bin

# rehash if you are running csh
cd ..

# you may want to pick a more recent release; release_1_97 was the latest as of this writing
svn co svn://
cd release_1_97
./configure --with-platform=efi --target=x86_64

# edit kern/misc.c and add after line 53:
# void *memcpy (void *dest, const void *src, grub_size_t n);
# void *memmove (void *dest, const void *src, grub_size_t n);

# edit symlist.c and add after line 19:
# #include <string .h>
make -j `hwprefs cpu_count`
sudo make install

# This all results in:
# /usr/local/bin/x86_64-grub-editenv
# /usr/local/bin/x86_64-grub-fstest
# /usr/local/bin/x86_64-grub-mkelfimage
# /usr/local/bin/x86_64-grub-mkfont
# /usr/local/bin/x86_64-grub-mkimage

Git – it’s just that simple

sudo port install git-core +doc +gitweb +svn +bash_completion

The above is my command-line command of the day.
I’ve been doing some research over the weekend, reading up on all the current source control systems
(for which, by the way, there is no consistent acronym. The closest I can find now is DVCS – Distributed Version Control System)
and have come to the conclusion that:

  1. The developer behind Shoes is one intensively creative fucker
  2. Git is as good as it gets

The kicker came when I found the script git-p4, which allows me to use Perforce at work in conjunction with all of git’s way-cool features!

What are these features you ask? Well, if you’ve ever heard of SVK, you will love git. Because git does what SVK does natively. And SVK is known to be like a castle on shifting sand in terms of stability. Git is rock-solid.

For the uninitiated (which would be most of you), SVK lets you check out code from a Subversion (svn) repository, and then do local-only checkins and checkouts. Then once you are happy with your changes (perhaps after 20 revisions, all tracked locally by SVK), you can “push” your changes to the main svn repo.

In the same way, git lets you “pull” changes from a central repo, do many modifcations, checking them in to git each time, and do a final “push” back to the central repo. Indeed, the concepts of “central” and “non-central” repos is not embedded into git. The central repo is only central by convention. All repos are equally “central”.

ActiveCollab becomes ProjectPier

The ActiveCollab project has gone closed source,
so the community took the last open source version and started a new project to take it forward:
This is pretty common in the open source world.
The creators of a project decide they want to close the source and go the proprietary route, and the community takes up the open code and continues on.

This is separate from projects like cddb, which was always closed-source, but took it’s community-provided data and closed it and sold it out.
it’s called GraceNote now,
and like open source projects going closed, a free replacement sprang up:

DirectX Revisionism

Iain dugg
an article about the upcoming DirectX 10 specification.

Let me rephrase the opening of the article more accurately. The original reads:

Microsoft’s DirectX application programming interface (API) was first introduced in 1995. DirectX was designed to make life easier for software developers by providing a standard platform developers could use to easily make multimedia software and game programming for the Windows Platform.

Before the arrival of DirectX, developers had to program their software titles to take advantage of features found in each individual hardware component. With the wealth of devices on the market, spanning from input devices to graphics and sound cards, supporting every hardware device on the market was a tedious, time-consuming process.

The only fatual part of that is the first sentence about DicrectX coming out in 1995.
Here is my rephrasing.

Microsoft’s DirectX application programming interface (API) was first introduced in 1995. DirectX was designed to lure software developers into using a proprietary, Microsoft-owned API, providing vendor lock-in and reduced availability of games on other platforms.

Before the arrival of DirectX, developers were using OpenGL, a cross-platform, standardized 3D graphics library that allowed developers to take advantage of 3D graphics without requiring deep knowledge of that hardware.

Open Source panorama software

Tony’s Cottage

I am asked every now and again what I use to make the panoarmas I occasionally post to Flickr.
Well, until recently I used some OEM software – Canon PhotoStitch.
Then my brother-in-law Tony told me that Photoshop could do it.
I was flabbergasted because he was right!
So I used Photoshop to do this picture, which is Tony’s new cottage, appropriately enough.

Tonight I discovered some open source software that may also do the job.
I haven’t used them yet, but thought I would post about them in case anyone else was interested.
They are

I (or maybe Iain if he beats me to it) will post more when I’ve tried them out.
Or maybe Jeff will give it a shot.
Who knows?

Upstart – replaces Sys V init and even Apple’s new launchd

For ages, Unix systems have booted by simply running an app called “init”, which in turn read shell scripts from /etc/init.d.
This is why on almost all Unix systems, every process would have as its ancestor process id 1, “init”.

Apple decided to update their startup system and created a new, open-source system called
it first showed up in last year’s release of Mac OS X 10.4 Tiger.
It replaces not only init, but also cron and inet)

So, now Ubuntu has released something called Upstart
[post 1]
[post 2],
which is an even more advanced startup mechanism.
Cribbing some text from the upstart page, here are some of the differences between upstart and launchd:

Much of the goal of both systems appears initially to be the same; they both start jobs based on system events, however the launchd system severly limits the events to only the following:

  • system startup,
  • file modified or placed in queue directory,
  • particular time (cron replacement),
  • connection on a particular port (inetd replacement).

Therefore it does not actually allow us to directly solve the problems we currently have; we couldn’t mount filesystems once the “filesystem checked” event has been recived, we couldn’t check filesystems when the block device is added and we certainly couldn’t start daemons once the complete filesystem (as described by /etc/fstab) is available and writable.

The launchd model expects the job to “sit and wait” if it is unable to start, rather than provide a mechanism for the job to only be started when it doesn’t need to wait. Jobs that need /usr to be mounted would need to spin in a loop waiting for /usr to be available before continuing (or use a file in a tmpfs to indicate it’s available, and use that modification as the event).

You can read more in the article about how if Apple had open sourced launchd sooner, Ubuntu would have simply upgraded launchd.

I’m hoping Apple will move to upstart. We shall see.

Ubuntu Software

Just a brain dump of some useful Ubuntu software I ran across while browsing recently.


It’s like Mac OS X’s Spotlight
apt-get install beagle


Programmer text editor
apt-get install bluefish
[Mac version: “fink install bluefish”]


iTunes replacement, integrated with music site
apt-get install amarok


Programming text editor; uses fish://.. to edit via ssh


Web design app like FrontPage or DreamWeaver

sudo apt-get install nvu
sudo cat > /usr/share/applications/nvu.desktop <<EOF
[Desktop Entry]
Comment=Web Development Editor
killall gnome-panel

[requires universe and multiverse repositories]


Another text editor
apt-get install kate


Windows TrueType fonts
How to install your Windows TrueType fonts into Ubuntu
apt-get install msttcorefonts

extract nicefonts.tbz into /etc/fonts as root

Xara LX

Xara LX
Graphics Editor


Web site mirroring command


IEs 4 Linux
Lets you run Windows IE under Wine on Linux

Live OS-switching with 3D transitions


Virtue Desktop



Below is the movie I was showing at gaming Friday night.
It shows a Mac running OS X, Windows XP and Red Hat Linux.

Desktop switching is being done with VirtueDesktops,
an awesome workspace-switching program for the Mac (finally!).
Actually, I just installed it after typing the first 5 words of this paragraph, and I am very impressed.
highly recommended.

The OS stuff, however, is being done with
a $40 app similar in some ways to VMWare.

Note that there are performance drawbacks to this software, in that you wouldn’t be able to run 3D games at full speed.
Everything else is pretty much full speed though – MS Office (Mac or Windows version), databases, Excel, etc.
Anything compute-intensive (as opposed to video-intensive) will fly at full speed.

Note also that this consumes other hardware resources for each OS too, like CPU and RAM.

I’m looking forward to getting a quad-core Mac Pro (or whatever awful name they give the new Power Mac) later this year!

Virtualization – run Mac OS X, Windows and Linux at the same time on the same machine

(provided you have enough CPUs, of course).

Techworld notes
that the Russian-based company
will have details concerning their virtualization support on Macs later this week.

Hmm, running Linux at the same time would have appeal for me.
I would run Windows mainly for games, and would thus want as many hardware resources available as possible.