PDK on Linux

From WebOS Internals
Revision as of 12:47, 9 September 2011 by Epakai (talk | contribs) (Get CodeSourcery Linux cross-compiler)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The official Palm PDK development kit for writing native programs is not supported on Linux.

The instructions on this page should allow you to get the official Palm webOS PDK for OSX working on Linux.


  • Get the command line tool "xar". Some debian based systems have it, try apt-get install xar. If not found, get it from http://code.google.com/p/xar/ (I needed package libxml2-dev to compile it) (I also needed openssl-dev to compile it on Ubuntu 10.10)

To install xar in a recent Debian/Ubuntu system and it isn't found via apt-get, you can download these packages and install them manually: Ubuntu: libxar1, xar Debian: libxar1, xar

  • You will need to have git installed to retrieve files from the WIDK repository.
  • Building the pkg file requires Curl and libbz2-dev
  • Since you're planning to write native software for webOS, this assumes you have things like gcc and make and normal developer stuff like that.

We will be using tools found in the WIDK cross-compile repository is really helpful as it already has functionality to download and extract the OSX PDK, most of which will "just work" on Linux. Tools found in the WIDK repository can also download the CodeSourcery toolchain for Linux to replace the one included in the PDK, built for Darwin.


Get the Palm PDK using the Webos-Internals makefile

This downloads Palm's DMG file, downloads and patches a tool for converting DMG's, and runs it against the Palm DMG, ending up with a Xar format package file. (filename ends in .pkg)

git clone git://git.webos-internals.org/preware/cross-compile.git
cd cross-compile
make doctors/Palm_webOS_SDK-Mac-

You now have a Palm_webOS_SDK-Mac- in doctors/ .

Extract that .pkg file

Now let's extract it into / (this will create /opt/PalmPDK)

xar -xf doctors/Palm_webOS_SDK-Mac- palmpdk.pkg
sudo sh -c 'gzip -cd palmpdk.pkg/Payload | (cd /; cpio -i)'

You now have a Palm PDK in /opt/PalmPDK, but you don't have a working cross-compile toolchain, because the one Palm supplied was for osX / Darwin not Linux. We need to fix that.

Get CodeSourcery Linux cross-compiler

Install the CodeSourcery Linux cross-compiler toolchain where Palm's toolchain built for OSX was.

During 'make toolchain' it currently fails to download two files. You can modify the makefile or manually fetch them and place them in cross-compile/downloads. arm-2007q3-51-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

make toolchain
sudo cp -r toolchain/arm-2007q3 /opt/PalmPDK
cd /opt/PalmPDK
sudo mv arm-gcc arm-gcc-darwin
sudo ln -s arm-2007q3 arm-gcc

Someone who is familiar with the PDK should test this at this point to see if you can actually use it in the proper ways.

Alternative setup

The github project linux-webos-pdk automates the process of creating a webOS PDK for Linux. The only requirements are wget, 7zip, pax and patch. All these requirements are available even in Debian Stable (So I guess all other distributions provide them, too).

To install the PDK just do this:

 $ git clone git://github.com/kayahr/linux-webos-pdk.git
 $ cd linux-webos-pdk
 $ ./linux-webos-pdk.sh
 $ sudo mv opt/PalmPDK /opt

After this the PDK is installed in /opt/PalmPDK and ready to be used. This PDK is successfully used to create the official ScummVM app for WebOS and all of its required libraries.