Difference between revisions of "WebOS Internals PDK"
Rboatright (talk | contribs) (edit) |
Rboatright (talk | contribs) (exit) |
||
Line 1: | Line 1: | ||
Scratchbox 2 is a cross-compilation engine, it can be used to create a highly flexible SDK. | 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 is totally distribution neutral but is currently targeted for Linux. It is developed on Debian/sid. It's known to work at least on Debian, Ubuntu, Gentoo and Fedora. Both x86 and amd64 architectures are supported. | SB2 is totally distribution neutral but is currently targeted for Linux. It is developed on Debian/sid. It's known to work at least on Debian, Ubuntu, Gentoo and Fedora. Both x86 and amd64 architectures are supported. | ||
Line 23: | Line 25: | ||
== Sample installation on Ubuntu for Palm Pre cross compiling == | == Sample installation on Ubuntu for Palm Pre cross compiling == | ||
− | + | Create a preware folder, copy the cros-compile tools into it (if you have not installed git, apt-get install git-core), and use a make script to set up the compilation toolchain. | |
sudo mkdir -p /srv/preware | sudo mkdir -p /srv/preware | ||
Line 31: | Line 33: | ||
make toolchain | make toolchain | ||
− | + | 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 install qemu-arm-static | ||
sudo apt-get remove qemu-arm-static | sudo apt-get remove qemu-arm-static | ||
+ | |||
+ | Now, use apt-get to setup scratchbox... | ||
sudo apt-get install scratchbox2 qemu-kvm-extras | 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 | 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 | PATH=/srv/preware/cross-compile/toolchain/arm-2007q3/bin:${PATH} sb2-init -c /usr/bin/qemu-arm armv7 arm-none-linux-gnueabi-gcc | ||
− | |||
mkdir -p /srv/preware/cross-compile/staging/armv7/usr/include | mkdir -p /srv/preware/cross-compile/staging/armv7/usr/include | ||
− | |||
cd /srv/preware/cross-compile | cd /srv/preware/cross-compile | ||
make stage | make stage |
Revision as of 00:03, 6 January 2010
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 is totally distribution neutral but is currently targeted for Linux. It is developed on Debian/sid. It's known to work at least on Debian, Ubuntu, Gentoo and Fedora. Both x86 and amd64 architectures are supported.
For target systems you can do anything that Qemu or sbrsh supports.
Homepage
http://www.freedesktop.org/wiki/Software/sbox2
License
Scratchbox 2 is distributed under LGPL version 2.1, portions are under GPL version 2. Some minor stuff is under MIT style license.
Source Releases
Version control: [1]
web interface to git repository
Tarballs
2009-04-01 sbox2-2.0.tar.bz2 md5sum: 21d3378868980c38d63dcfcb79e0e36d
Sample installation on Ubuntu for Palm Pre cross compiling
Create a preware folder, copy the cros-compile tools into it (if you have not installed git, apt-get install git-core), and use a make script to set up the compilation toolchain.
sudo mkdir -p /srv/preware cd /srv/preware git clone git://git.webos-internals.org/preware/cross-compile.git cd cross-compile make toolchain
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
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 mkdir -p /srv/preware/cross-compile/staging/armv7/usr/include cd /srv/preware/cross-compile make stage
Once this setup is complete, compiling sdl apps for webOS is very simple. Below is a sample of compiling ScummVM.
Sample build of ScummVM
The following assumes you have copied your scummvm source into /srv/preware/cross-compile/packages
cd /srv/preware/cross-compile/packages/scummvm make build