Multilink for Palm
This is a (long) sort-of-technical post about solving some problems with a very useful tool for Palm OS development, Multilink. I had it working great on MacOSX/PPC, but upgraded to an Intel Mac, where prc-tools doesn’t work anymore.
So, since I just spent altogether too long trying to get this thing working on Windows/Cygwin, I figured I should document the steps I took to get it up and running, since the instructions on the site are kind of old and no longer entirely accurate.
Essentially, the problem with this tool is that it depends on libbfd (generated by bintools). This is mentioned by the developer, but the supplied libs for Cygwin don’t actually work (they might have with Cygwin b20, but they don’t anymore). Worse, they permit a compile of the tool, but fail silently during use. So, my Make script was running, but nothing would link.
Anyway, I’m writing this down so that I don’t forget the next time, and so that the information is out there for others. Palm OS development is a dying craft, but you never know when this info will prove useful.
So… to build Multilink, check out the following instructions. If you just want to use my pre-built binaries, I’ve zipped them up and you can get them here. See below for more information.
Building Multilink
Step 1: Install Cygwin
Download Cygwin and run Setup.exe.
In addition to the default packages, you should select at least the following (others may be required, but I don’t think so):
- binutils
- gcc (selects gcc-core and gcc-g++)
- gcc-mingw (selects gcc-mingw-core and gcc-mingw-g++)
- gdb
- gdbm
- make
- patch
- pkg-config
- Let Cygwin do its thing, and you’re good.
Step 2: Install prc-tools
There are two options for this: use the prebuilt Cygwin packages or build it from scratch. I’m only going to deal with the first option (but don’t worry — we’ll be compiling some stuff soon).
- Go to the prc-tools site and download the 2.3 releases called
- prc-tools-2.3-cygwin.tar.bz2
- prc-tools-arm-2.3-cygwin.tar.bz2
Put these into a folder call ‘cyginstall’ or whatever you want to call it at an easy to find location.
Run the Cygwin installer (setup.exe) again. This time, instead of using the default “Install from Internet”, choose “Install from Local Directory”, click through the next screen (keep the defaults), and then at the field called “Local Package Directory”, enter or browse to the folder you used to store the .bz2 files in step 2.
At the next screen, you should see the two packages (prc-tools and prc-tools-arm). Enable them and complete the installer.
Step 3: Get the Palm SDK
You need an account at ACCESS (and potentially at Palm, depending on what OS features you’re using). For now, I’m going to assume a simple install of the ACCESS SDK (adding the Palm headers is easy, if you need to do it later).
Once you’re in the the top secret developer area of ACCESS, follow the link labelled “Garnet OS Development Tools”. Then the link (under ACCESS SDKs) called “Core Garnet OS SDK”
Get these two downloads:
- Garnet OS SDK (68K) R3 PRC tools Generic UNIX
- Garnet OS 68K API SDK (Fall 2004 Update) (for PRC-Tools)
Create a folder at C:\PalmDev
Untar the “Garnet OS SDK (68K) R3 PRC tools Generic UNIX” download into your PalmDev folder. It should have resolved to a folder called “sdk-5r3″.
Rename it to “sdk-5r4″.
Unzip the “Garnet OS 68K API SDK (Fall 2004 Update)” to the PalmDev folder. Overwrite any older files with the newer ones.
Open a Cygwin terminal window and type:
mount c:\\PalmDev /PalmDevto create a Cygwin “mountpoint” for your PalmDev folder.
Now type (still in Cygwin)
palmdev-prepYou should see:
Checking SDKs in /PalmDev
sdk-5r4 headers in ‘include’, libraries in ‘lib’When GCC is given no -palmos options, SDK '5r4' will be used by default
Writing SDK details to configuration files…
…donePresuming that you do, you’re in good shape, and can probably compile Palm code as-is. All that remains is getting Multilink setup.
Step 4: Download and build some source code
In order to successfully build Multilink, we need to build new versions of a couple of libraries and a header file related to the ‘bintools’ package. The trick is, we need to build them for the m68k-palmos target. These files are automatically built when compiling prc-tools yourself, but since we took the easy way out, we don’t have them.
To solve this, we’re going to do a partial build of prc-tools (the bintools part), and get the libraries and header file in question.
- Download these two archives:
Copy them to your Cygwin home folder (C:\cygwin\home\(username))
Perform the following sequence of commands in a Cygwin terminal window
cd(note: all on one line!)
tar xf binutils-2.14.tar.bz2
tar xfz prc-tools-2.3.tar.gz
cat prc-tools-2.3/binutils-2.14.palmos.diff | patch -p0
cd prc-tools-2.3
ln -s ../binutils-2.14 binutils
cd ..
mkdir build
cd build
../prc-tools-2.3/configure –target=m68k-palmos –enable-languages=c,c++
cd binutils
make all infoIf it worked and you don’t have any errors, congratulations! If it didn’t work, you might be missing some system libraries, in which case you should examine the error, determine which package is missing (it should be pretty obvious) and install it via Cygwin’s setup.exe installer.
You need the following files:
- bfd.h
- libbfd.a
libintl.a
cd
cp build/binutils/bfd/bfd.h /PalmDev/sdk-5r4/include/
cp build/binutils/bfd/libbfd.a /PalmDev/sdk-5r4/lib/
cp build/binutils/intl/libintl.a /PalmDev/sdk-5r4/lib/
Step 5: Download, build and install Multilink
Almost done. All we need to do is get Multilink built and installed.
Download Multilink and copy it to your Cygwin home directory.
Open the archive with:
cd
tar xfz multilink.tgz
cd multilinkThere are a few things we have to fix in the Makefile before we build. Use the editor of your choice (I would recommend that you use something which won’t mangle the Unix line endings like metapad or e, but it might not matter):
Change the line:
PILOT_DIR = /usr/local/pilotto read:
PILOT_DIR = /PalmDev/sdk-5r4Change the line:
LIBS = -L${PILOT_DIR}/lib -lbfd -libertyto read:
LIBS = -L${PILOT_DIR}/lib -lbfd -liberty -lintlChange:
CC = gccto:
CC = gcc -Dfalse=0And put a ‘#’ character at the beginning of the line:
@test `whoami` = root || (echo "Must be root to install"; false)to disable it (Cygwin doesn’t support sudo). It now looks like:
# @test `whoami` = root || (echo "Must be root to install"; false)Done. Save it and return to the Cygwin terminal (if you’re not already there).
Build Multilink:
make
make install
DONE!
The pre-compiled binaries
Inside the archive are two folders, “buildstuff” and “dist”.
“buildstuff” contains the header and 2 library files the above instructions generate. Presuming that you’re using the prc-tools 2.3 Cygwin distro, you can use them to build your own Multilink, without needing to build them yourself.
“dist” contains the built Multilink .o, .exe and .man files. Again, presuming that you’re using the 2.3 Cygwin distro, you can probably bypass all of the above, and simply put these at the indicated locations. YMMV.
What have I been doing?
It’s been a long while since my last update, thanks to lots of little distractions and life in general. Lots of ups and downs, mostly downs, to be honest, although I’m still happily living in Germany, healthy and working. So, things can’t be so bad.
I’ve been devoting most of my non-work time to Interactive Fiction, which has been a trip. Interactive Fiction, Text Adventures, or however you want to call them, are my very first computing experience: I used to sign out 2 hour slots at the Howard County Public Library, once a week, in order to sit in front of some natty old PC and try to solve Infocom games. It’s hard to imagine that there was a time when I had no computer at home…
So, I’ve played these things off and on my whole life, I guess, although I hadn’t really looked at them for a long while. Anyway, the announcement of a decent Mac interpreter got me interested again. And then I started looking around for a decent Palm interpreter. Yes, I still have one of those.
One thing led to another, and I started rebuilding my favorite of the available interpreters, CliFrotz, adding a bunch of new features along the way. So, that’s nearly done and called CellarDoor. You can find it here. Check it out sometime…
Here’s the thing I like about IF: more than any other storytelling medium that I know, it most resembles ORAL storytelling. The direction of the story can be influenced by the audience/player, through a questioning of the teller/program. Despite the stasis of the texts (texts aren’t produced, per se, but culled from a large assortment of pre-written source texts). By accumulating knowledge about the story or environment being told or described, I increasingly gain fluency of movement within the environment and increased understanding of the underlying story (if there is one). Unlike a book or DVD, it’s not random-access: the pacing and access to different elements of the storytelling is controlled by the teller.
There are a reasonably large number of people still producing this kind of work, with free programming tools available. Some of the work barely resembles the original Infocom models: literary experiments, “straight” fiction without game-like elements or pedagogy are also possibly using these tools. I’ll post a short list of my current faves in a different entry.
Why do I spend more time trying to GTD than GTD?
So, like many others in the “knowledge worker” biz, I have terrible problems organizing my time. It often feels like I spend 90% of my life in front of a computer, and that 50% of that time is devoted to wondering what to do next. This is all complicated by the fact that I try to divide my computerized existence into a few different modes — job mode, art mode, relax mode, personal-improvement mode, etc.
Enter GTD, which you can google if you’re up to it. Check out 43folders for lots of articles on the subject. No, I never read or even bought or even saw David Allen’s book, figuring that I seem to teach myself everything else, why not this?
More updates
Just a quick note that I’ve been steadily posting photos on my flickr page. Give them a look-see if you care to.
The projects area of the bootsquad website has been slowly filling out, with lots of excerpts of newer work. I’m still missing some documentation of a couple of projects, like some work I did with Paulo Raposo, but I think it’s forgivable. I’m going to begin posting excerpts of the music I’m working on, once I feel like it’s not too embarrassing to do so. I’d like to hook up with a designer and do some animations for a DVD, but it’s a little early to make plans - not until the sounds are a bit more fleshed out.
bootsquad.com site updated
After 3 years of inactivity and probably close to 7 years of no design updates, the bootsquad.com site has finally gotten a little bit of a facelift, and some new content. Some old content is gone, but that’s how it goes. I’ll be uploading more stuff in the coming days, but for anyone who is interested in seeing what’s been going on over the past couple of years, there are finally some excerpts of work there.
My life in pictures
I’ve started taking pictures again. After a lot of soul-searching, I ended up picking up a weird little digital camera from Ricoh. Beautiful wide-angle lens, no zoom. Takes crazy-good pictures and allows a tremendous amount of manual control. It’s gotten nothing but shit reviews from the powers-that-be, because it’s expensive and has a lot of noise in the dark. On the other hand, you can leave the shutter open for 3 minutes if you need to. And the noise looks pretty good - they seem to have shaped it somehow, so that it resembles film grain.
Anyway, the gear hound in me just wanted to mention it. I got a flickr account and have started posting my stuff there. If you want to see what talented photographers can do with this little camera, check this out.
The Futurological Congress
Has anyone read this book? As part of my German language training, I’ve moved up from Krimis through something really challenging to this. And I’m finding it really interesting, even given my inability to understand everything. To be fair, I don’t understand everything I read in English, either. That in 1974 the USA already had such a bad reputation, is somehow amusing. Anyhow, if you like hallucinogenic pseudo-sci-fi think-reading, check it out.
Welcome to memegarden 2.0
Let’s try this out. Welcome to memegarden 2.0.
Over the next days, I will find time to make some modifications to the look and feel of the site, and make it a bit more homey. Until then, please register with the site to get posting permissions. That’s it. This is your space. Please enjoy it.