WebOS Internals PDK
Palm's binary sdk the "Plugin Developer Kit" will not be available until March 2010.
In the mean time, WebOS Internals has released a full "PDK" for you using Scratchbox2.
We strongly urge the community to standardize on this PDK until Palm releases theirs. We believe that it uses the same underlying technologies, and that it will give you both a means to port games now, and a head-start to development against the official Palm PDK in the future.
Scratchbox 2 is a cross-compilation engine, it can be used to create a highly flexible SDK.
As installed below, the install process uses a script which extracts the required Palm provided files from a copy of webos doctor, and downloads from other sources, and builds a complete compilation environment automatically which can compile SDL and openGLES apps for webOS.
SB2 itself is totally distribution neutral but the webOS cross-compile environment is designed and tested on Ubuntu 9.10 32 bit. (At least one user in #webos-internals reports complete success running the cross compile environment in Ubuntu 9.10 64 bit after installing curl via apt-get.)
The webOS Internals team strongly suggest apt-get install into that environment only for this purpose. The same installation of Sun Virtualbox which hosts the Palm SDK emulator can host an Ubuntu 9.10 server with very little effort.
SB2 Homepage
http://www.freedesktop.org/wiki/Software/sbox2pdk
License
Scratchbox 2 is distributed under LGPL version 2.1, portions are under GPL version 2. Some minor stuff is under MIT style license.
Installation on Ubuntu for WebOS PDK cross compiling
Prequisites
Your Ubuntu installation will need the following installed. If you do not have them, run the command after the package name. You can test if they are found by just typing the command name. If it says command not found, you need to install it.
- git apt-get install git-core
- gcc apt-get install build-essential
- curl apt-get install curl
- unzip apt-get install unzip
Note: The make toolchain command and later steps will download approximately a half-gig of tools and sources from various locations. Do not start this if you do not have time for a large download. Additionally, if you already have downloaded a copy of the WebOS 1.3.5 doctor, you can reduce the download time by copying the doctor file into cross-compile/doctors/webostoctorp100ewwsprint-1.3.5.jar . This will cause the appropriate command to skip that download. Note that codesourcery rate limts downloads and at a minimum this process will take 10 to 15 minutes irrespective of your connection speed.
Start setup
Create a preware folder, copy the cross-compile tools into it (if you have not installed git, apt-get install git-core), and use a make script to begin the set up of the compilation toolchain.
sudo mkdir -p /srv/preware cd /srv/preware sudo chmod 777 . git clone git://git.webos-internals.org/preware/cross-compile.git cd cross-compile make toolchain
Fix mmap errors
The following commands appear redundant. They are not. The install this fixes your mmap config to fix an mmap: permission denied error, but we don't need the package itself.
sudo apt-get install qemu-arm-static sudo apt-get remove qemu-arm-static
As a workaround, if this package is not available, the following commands can be executed in a root shell (sudo -s) to fix the mmap configuration to enable qemu-arm to work.
echo "vm.mmap_min_addr = 4096" > /etc/sysctl.d/mmap_min_addr.conf /etc/init.d/procps restart
(note that the value should not be "0". 4096 is chosen to avoid null pointer attacks.)
Setup Scratchbox
Now, use apt-get to setup scratchbox...
sudo apt-get install scratchbox2 qemu-kvm-extras
...and set it up for compiling for webOS.
cd /srv/preware/cross-compile/toolchain/arm-2007q3/arm-none-linux-gnueabi/libc PATH=/srv/preware/cross-compile/toolchain/arm-2007q3/bin:${PATH} sb2-init -c /usr/bin/qemu-arm armv7 arm-none-linux-gnueabi-gcc cd /srv/preware/cross-compile make stage
Once this setup is complete, compiling sdl apps for webOS is very simple.
Sample build of Application:Doom
Now, go to Building DOOM with scratchbox2 and follow the simple directions.