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

From WebOS Internals
Jump to: navigation, search

Requirements

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

Setting up your environment

  • Create your working folder :
cd /home/ubuntu
mkdir java-mobile-project
cd java-mobile-project
  • Get the phoneME Advanced source code :
svn export https://svn.java.net/svn/phoneme~svn/builds/phoneme_advanced-mr2-dev-b167/ phoneme_advanced-mr2-dev-b167
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

  • 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
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

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