Building phoneME (for Java Mobile - J2ME support in webOS) with scratchbox2

= Requirements =

First, follow the tutorial WebOS Internals PDK to set up the cross compilation environment.

= Setting up your environment =

cd /home/ubuntu mkdir java-mobile-project cd java-mobile-project
 * Create your working folder :

svn export https://svn.java.net/svn/phoneme~svn/builds/phoneme_advanced-mr2-dev-b167/ phoneme_advanced-mr2-dev-b167
 * Get the phoneME Advanced source code :

cd /home/ubuntu/java-mobile-project mv j2sdk-1_4_2_19-linux-i586.bin /home/ubuntu/java-mobile-project chmoad a+x j2sdk-1_4_2_19-linux-i586.bin ./j2sdk-1_4_2_19-linux-i586.bin
 * Download and install Java 2 Platform, SE Development Kit 1.4.2_19 from http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase14-419411.html and copy it in the folder /home/ubuntu/java-mobile-project
 * Detailed instructions can be found at: http://web.archive.org/web/20070621032023/https://phoneme.dev.java.net/content/mr2/buildenv_feature.html

export MEHOME=/home/ubuntu/java-mobile-project/phoneme_advanced-mr2-dev-b167 export JDK_DIR=/home/ubuntu/java-mobile-project/j2sdk1.4.2_19 export SB2=/srv/preware/cross-compile/toolchain/arm-2009q1/arm-none-linux-gnueabi or /srv/preware/cross-compile/staging/mapping-armv7 ???? export PATH=$PATH:$JDK_DIR/bin export BuildDir=$MEHOME/javacall-com/configuration/phoneMEFeature/win32_x86 export JAVACALL_DIR=$MEHOME/javacall export JAVACALL_PROJECT_DIR=$MEHOME/javacall-com export JAVACALL_OUTPUT_DIR=$MEHOME/javacall-com export PCSL_OUTPUT_DIR=$MEHOME/output/pcsl export PCSL_PLATFORM=linux_arm_gcc export NETWORK_MODULE=bsd/generic export ENABLE_PCSL=true export ENABLE_ISOLATES=true export JVMWorkSpace=$MEHOME/cldc export JVMBuildSpace=$MEHOME/output/cldc export MIDP_OUTPUT_DIR=$MEHOME/output/midp export CLDC_DIST_DIR=$MEHOME/output/cldc/linux_arm/dist export TOOLS_DIR=$MEHOME/tools export TARGET_CPU=arm export USE_MULTIPLE_ISOLATES=true
 * Create a file, /home/ubuntu/java-mobile-project/myenv.sh, on your host, then copy and paste the following into it. Then edit your paths appropriately (first 3 lines), followed by: host# source myenv.sh

= Compiling phoneME Advanced for webOS =


 * Start by: host# cd phoneme_advanced-mr2-dev-b167/pcsl
 * To build PCSL: host# make NETWORK_MODULE=$NETWORK_MODULE PCSL_PLATFORM=$PCSL_PLATFORM GNU_TOOLS_DIR=$SB2
 * Then: host# cd phoneme_advanced-mr2-dev-b167/cldc/build/linux_arm
 * To build CLDC: host# make ENABLE_PCSL=$ENABLE_PCSL PCSL_OUTPUT_DIR=$PCSL_OUTPUT_DIR ENABLE_ISOLATES=$ENABLE_ISOLATES GNU_TOOLS_DIR=$SB2
 * Then: host# cd phoneme_advanced-mr2-dev-b167/midp/build/linux_fb_gcc
 * To build MIDP: host# make PCSL_OUTPUT_DIR=$PCSL_OUTPUT_DIR CLDC_DIST_DIR=$CLDC_DIST_DIR TOOLS_DIR=$TOOLS_DIR TARGET_CPU=$TARGET_CPU USE_MULTIPLE_ISOLATES=$USE_MULTIPLE_ISOLATES GNU_TOOLS_DIR=$SB2

= Links used to do the webOS port =
 * phoneME Advanced source code
 * How to Port phoneME™ Advanced Software to Google Android, iPhone, OpenMoko, LiMO, and More (Online)
 * How to Port phoneME™ Advanced Software to Google Android, iPhone, OpenMoko, LiMO, and More (Download)
 * Ti.com - phoneME Feature to run on DM355
 * CLDC HotSpot™ Implementation Porting Guide / CLDC HotSpot Implementation, Version 2.0
 * Java in Embedded Linux Systems
 * arm-linux-gcc version on montavista 4.0.1 release
 * How to cross compile ARM kernel under Ubuntu 10.10
 * Developing Mobile Business Applications With Java
 * How to build JavaCall for phoneme feature
 * Building JDBC for CDC/Foundation
 * build phoneME Advanced-MIDP
 * Wiki phoneME Advanced with infos with several ports