java.net: Wiki

The Source for Java Technology Collaboration


 <<O>>  Difference Topic PhoneMEAdvancedBSGHost (13 - 19 Nov 2008 - Main.dbsears)
Line: 1 to 1
 
META TOPICPARENT name="PhoneMEAdvanced"

Build Recipe: Linux/x86 Host Environment

Line: 385 to 385
 
J2ME_CLASSLIB=basis
Deleted:
<
<
AWT_IMPLEMENTATION Platform-level GUI toolkit used by AWT. AWT_IMPLEMENTATION=qt
 
QT_TARGET_DIR Location of the Qt3 development libraries. QT_TARGET_DIR=/usr/share/qt3
Added:
>
>
QTEMBEDDED Use Qt Embedded. By default this includes version 2.x of Qt Embedded. QTEMBEDDED=true
USE_QT_FB Enable use of the qvfb virtual framebuffer. USE_QT_FB=true
 
Line: 494 to 499
 For example, here's a working build script with most of the build options defined explicitly.
Changed:
<
<
Note the different values for QT_TARGET_DIR, QT_VERSION and QTEMBEDDED.
>
>
Note the different values for QT_TARGET_DIR and QTEMBEDDED.
 
#!/bin/sh
Line: 508 to 512
  CVM_PRELOAD_LIB=true CVM_BUILD_SUBDIR_NAME=cdc-midp J2ME_CLASSLIB=basis
Deleted:
<
<
AWT_IMPLEMENTATION=qt
  QT_TARGET_DIR=/home/developer/qt-embedded/target
Deleted:
<
<
QT_VERSION=2
  QTEMBEDDED=true
Deleted:
<
<
QTOPIA=false USE_QVFB=true
  USE_QT_FB=false USE_JPEG=true USE_MIDP=true

 <<O>>  Difference Topic PhoneMEAdvancedBSGHost (12 - 19 Nov 2008 - Main.dbsears)
Line: 1 to 1
 
META TOPICPARENT name="PhoneMEAdvanced"

Build Recipe: Linux/x86 Host Environment

Line: 177 to 177
 
Example
Added:
>
>
JDK_HOME Location of the Java build tools. JDK_HOME=/usr/java/j2sdk/bin/
 
CVM_HOST_TOOLS_PREFIX Location of the host build tools. Requires a trailing slash (/). CVM_HOST_TOOLS_PREFIX=/usr/bin/
Changed:
<
<
CVM_JAVA_TOOLS_PREFIX Location of the Java build tools. Requires a trailing slash (/). CVM_JAVA_TOOLS_PREFIX=/usr/java/j2sdk/bin/
JDK_HOME Location of the Java build tools. Needed by some parts of the build system. JDK_HOME=/usr/java/j2sdk/bin/
>
>
CVM_TARGET_TOOLS_PREFIX Location of the target build tools. See Build Recipe: Windows Mobile and Build Recipe: OpenWRT for examples. This option is not used in the current example because for the Linux/PC platform the host tools are equivalent to the target tools and the CDC build system handles this automatically.
 
Line: 506 to 509
  CVM_BUILD_SUBDIR_NAME=cdc-midp J2ME_CLASSLIB=basis AWT_IMPLEMENTATION=qt
Changed:
<
<
QT_TARGET_DIR=/home/ds986/qt-embedded/target
>
>
QT_TARGET_DIR=/home/developer/qt-embedded/target
  QT_VERSION=2 QTEMBEDDED=true QTOPIA=false

 <<O>>  Difference Topic PhoneMEAdvancedBSGHost (11 - 11 Nov 2008 - Main.dbsears)
Line: 1 to 1
 
META TOPICPARENT name="PhoneMEAdvanced"
Changed:
<
<

CDC Build System: Linux/x86 Host Environment

>
>

Build Recipe: Linux/x86 Host Environment

 

 <<O>>  Difference Topic PhoneMEAdvancedBSGHost (10 - 27 Aug 2008 - Main.dbsears)
Line: 1 to 1
 
META TOPICPARENT name="PhoneMEAdvanced"

CDC Build System: Linux/x86 Host Environment

Line: 576 to 576
 
% cd phoneme-advanced
Added:
>
>
% svn checkout https://phoneme.dev.java.net/svn/phoneme/components/abstractions/trunk abstractions
 % svn checkout https://phoneme.dev.java.net/svn/phoneme/components/jsr172/trunk jsr172

 <<O>>  Difference Topic PhoneMEAdvancedBSGHost (9 - 08 Aug 2008 - Main.dbsears)
Line: 1 to 1
 
META TOPICPARENT name="PhoneMEAdvanced"

CDC Build System: Linux/x86 Host Environment

Line: 500 to 500
 make CVM_HOST_TOOLS_PREFIX=/usr/bin/ CVM_TARGET_TOOLS_PREFIX=/usr/bin/
Deleted:
<
<
CVM_JAVA_TOOLS_PREFIX=/usr/java/j2sdk1.4.2_15/bin/
  JDK_HOME=/usr/java/j2sdk1.4.2_15 CVM_JIT=true CVM_PRELOAD_LIB=true CVM_BUILD_SUBDIR_NAME=cdc-midp J2ME_CLASSLIB=basis AWT_IMPLEMENTATION=qt
Changed:
<
<
QT_TARGET_DIR=/home/developer/qt-embedded/target
>
>
QT_TARGET_DIR=/home/ds986/qt-embedded/target
  QT_VERSION=2 QTEMBEDDED=true QTOPIA=false
Line: 567 to 565
 The effort to integrate these optional packages into the project source code repository so that they can be shared and built in the phoneME Feature and phoneME Advanced projects is under way.
Changed:
<
<
The example optional package here (jsr135)
>
>
The example optional package here (jsr172)
 is really a placeholder to demonstrate build system functionality.

Setup the Build System

Line: 578 to 576
 
% cd phoneme-advanced
Changed:
<
<
% svn checkout https://phoneme.dev.java.net/svn/phoneme/components/jsr135/trunk jsr135
>
>
% svn checkout https://phoneme.dev.java.net/svn/phoneme/components/jsr172/trunk jsr172
 

Build the Executable

Line: 596 to 594
 
Description
Changed:
<
<
USE_JSR135
>
>
USE_JSR172
 
Setting this build option to true
Changed:
<
<
tells the build system to include the jsr135 implementation.
>
>
tells the build system to include the jsr172 implementation.
 

 <<O>>  Difference Topic PhoneMEAdvancedBSGHost (8 - 04 Aug 2008 - Main.dbsears)
Line: 1 to 1
 
META TOPICPARENT name="PhoneMEAdvanced"

CDC Build System: Linux/x86 Host Environment

Line: 292 to 291
 
Changed:
<
<

Building Personal Basis Profile

>
>

Building Personal Basis Profile for Linux/x86

 The CDC build system has many build options for building versions of the CDC Java runtime environment
Line: 352 to 351
 Note: The version of Qt described above and available through the Ubuntu package management system is for desktop application development.
Changed:
<
<
Later, in the section on Building MIDP
>
>
Later, in the section on Building MIDP for Qt Embedded
 we'll use Qt Embedded which is built and used in a different way. PBP can be built using both Qt and Qt Embedded while currently, MIDP can only be built using Qt Embedded.
Line: 409 to 408
 % bin/cvm -cp democlasses.jar basis.DemoFrame
Changed:
<
<

Building MIDP

>
>

Building MIDP for Qt Embedded

 phoneME Advanced includes the first release of MIDP on CDC technology and a lot of work has been done to make the build systems and implementations
Line: 419 to 418
 
Changed:
<
<
Checkout the pcsl and midp components
>
>
Checkout the pcsl, midp and jpeg components
 from the project source code repository.

% cd phoneme-advanced
% svn checkout https://phoneme.dev.java.net/svn/phoneme/components/pcsl/trunk pcsl
% svn checkout https://phoneme.dev.java.net/svn/phoneme/components/midp/trunk midp
Added:
>
>
% svn checkout https://phoneme.dev.java.net/svn/phoneme/components/jpeg/trunk jpeg
 

  • Line: 474 to 474
     
    Description
    Deleted:
    <
    <
    PCSL_DIR Location of the PCSL component, e.g. /home/developer/phoneme/pcsl.
    MIDP_DIR Location of the MIDP component, e.g. /home/developer/phoneme/midp.
     
    USE_MIDP Tells the build system to include the MIDP implementation.
    Added:
    >
    >
    USE_JPEG Tells the build system to include the JPEG implementation.
     
    Line: 501 to 497
     
    #!/bin/sh
    
    Deleted:
    <
    <
    export TOP_DIR=/home/developer/phoneme
     make CVM_HOST_TOOLS_PREFIX=/usr/bin/ CVM_TARGET_TOOLS_PREFIX=/usr/bin/ CVM_JAVA_TOOLS_PREFIX=/usr/java/j2sdk1.4.2_15/bin/ JDK_HOME=/usr/java/j2sdk1.4.2_15
    Changed:
    <
    <
    CVM_BUILD_SUBDIR=true CVM_BUILD_SUBDIR_NAME=phoneme-advanced
    >
    >
    CVM_JIT=true CVM_PRELOAD_LIB=true CVM_BUILD_SUBDIR_NAME=cdc-midp
      J2ME_CLASSLIB=basis AWT_IMPLEMENTATION=qt
    Changed:
    <
    <
    QT_TARGET_DIR=/home/developer/qt-embedded
    >
    >
    QT_TARGET_DIR=/home/developer/qt-embedded/target
      QT_VERSION=2 QTEMBEDDED=true QTOPIA=false USE_QVFB=true USE_QT_FB=false
    Changed:
    <
    <
    PCSL_DIR=$TOP_DIR/pcsl TOOLS_DIR=$TOP_DIR/tools USE_MIDP=true MIDP_DIR=$TOP_DIR/midp
    >
    >
    USE_JPEG=true USE_MIDP=true
     

    Test the Executable

    Line: 553 to 546
     
    #!/bin/sh
    
    Changed:
    <
    <
    CDC_TOP=/home/developer/phoneme/cdc/build/linux-x86-generic CDC_TARGET=$CDC_TOP/phoneme-advanced CDC_HELLO=$CDC_TOP/hello
    >
    >
    export LD_LIBRARY_PATH=$HOME/qt-embedded/target/lib CDC_RUNTIME=$HOME/phoneme/cdc/build/linux-x86-generic/cdc-midp CDC_HELLO=$HOME/midlets/hello
     
    Changed:
    <
    <
    $CDC_TARGET/bin/cvm -Dmicroedition.profiles=MIDP-2.0
    >
    >
    $CDC_RUNTIME/bin/cvm -Dmicroedition.profiles=MIDP-2.1
      -Dsun.midp.library.name=midp
    Changed:
    <
    <
    -Dsun.midp.home.path=$CDC_TARGET/midp/midp_linux_fb_gcc
    >
    >
    -Dsun.midp.home.path=$CDC_RUNTIME/midp/midp_linux_fb_gcc
      -Dcom.sun.midp.mainClass.name=com.sun.midp.main.CdcMIDletSuiteLoader sun.misc.MIDPLauncher
    Changed:
    <
    <
    -midppath $CDC_TARGET/midp/midp_linux_fb_gcc/classes
    >
    >
    -midppath $CDC_RUNTIME/midp/midp_linux_fb_gcc/classes
      -suitepath $CDC_HELLO/HelloWorld.jar -1 HelloWorld?
    Line: 607 to 600
     
    Setting this build option to true tells the build system to include the jsr135 implementation.
    Deleted:
    <
    <
    JSR_DIR_135 Location of the jsr135 component.
     

     <<O>>  Difference Topic PhoneMEAdvancedBSGHost (7 - 29 Jul 2008 - Main.dbsears)
    Line: 1 to 1
     
    META TOPICPARENT name="PhoneMEAdvanced"
    Changed:
    <
    <

    CDC Build System: Host Environment

    >
    >

    CDC Build System: Linux/x86 Host Environment

     
    Changed:
    <
    <
    Once you have downloaded the source code for phoneME Advanced MR2,
    >
    >
    Once you have downloaded the source code for phoneME Advanced,
     you can use the build system included with it to build different executable versions of a CDC Java runtime environment. These different versions can include different peformance features,
    Line: 34 to 33
     

    Install the Linux Build Tool Packages

    Added:
    >
    >
     Note: Currently, most of the active testing for CDC build system
    Changed:
    <
    <
    for phoneME Advanced MR2 technology
    >
    >
    for phoneME Advanced technology
     has been based on Ubuntu 6.0.6.
    Added:
    >
    >
     The CDC build system included with the source code
    Changed:
    <
    <
    for the phoneME Advanced MR2
    >
    >
    for the phoneME Advanced
     can run on many different Linux distributions. To run the CDC build system, you will need certain Linux developer tools like a C/C++ compiler
    Line: 153 to 157
     
    ...
    Changed:
    <
    <
    make[1]: Entering directory `/home/user/phoneme-advanced-mr2/build/linux-x86-generic'
    >
    >
    make[1]: Entering directory `/home/developer/phoneme-advanced/build/linux-x86-generic'
     make[1]: Nothing to be done for `tools'.
    Changed:
    <
    <
    make[1]: Leaving directory `/home/user/phoneme-advanced-mr2/build/linux-x86-generic'
    >
    >
    make[1]: Leaving directory `/home/developer/phoneme-advanced/build/linux-x86-generic'
     

    If the build fails at some point,

    Line: 278 to 282
     % bin/cvm -cp testclasses.zip Test
    Added:
    >
    >
     Note: The CDC build system caches some generated build files. So after changing build flags, it's important to perform a "make clean" operation.
    Added:
    >
    >
     

    Building Personal Basis Profile

    Line: 337 to 346
     
    Added:
    >
    >
     Note: The version of Qt described above and available through the Ubuntu package management system is for desktop application development.
    Line: 344 to 356
     we'll use Qt Embedded which is built and used in a different way. PBP can be built using both Qt and Qt Embedded while currently, MIDP can only be built using Qt Embedded.
    Added:
    >
    >
     

    Build the Executable

    Line: 397 to 411
     

    Building MIDP

    Changed:
    <
    <
    phoneME Advanced MR2 includes the first release of MIDP on CDC technology
    >
    >
    phoneME Advanced includes the first release of MIDP on CDC technology
     and a lot of work has been done to make the build systems and implementations compatible and sharable.
    Line: 409 to 423
     from the project source code repository.
    Changed:
    <
    <
    % mkdir -p phoneme-advanced-mr2/pcsl % svn checkout https://phoneme.dev.java.net/svn/phoneme/components/pcsl/trunk phoneme-advanced-mr2/pcsl

    % mkdir -p phoneme-advanced-mr2/midp % svn checkout https://phoneme.dev.java.net/svn/phoneme/components/midp/trunk phoneme-advanced-mr2/midp

    >
    >
    % cd phoneme-advanced % svn checkout https://phoneme.dev.java.net/svn/phoneme/components/pcsl/trunk pcsl % svn checkout https://phoneme.dev.java.net/svn/phoneme/components/midp/trunk midp
     

  • Line: 463 to 475
     
    PCSL_DIR
    Changed:
    <
    <
    Location of the PCSL component, e.g. /home/test/phoneme/components/pcsl.
    >
    >
    Location of the PCSL component, e.g. /home/developer/phoneme/pcsl.
     
    MIDP_DIR
    Changed:
    <
    <
    Location of the MIDP component, e.g. /home/test/phoneme/components/midp.
    >
    >
    Location of the MIDP component, e.g. /home/developer/phoneme/midp.
     
    USE_MIDP
    Line: 489 to 501
     
    #!/bin/sh
    
    Changed:
    <
    <
    export TOP_DIR=/home/developer/phoneme/components
    >
    >
    export TOP_DIR=/home/developer/phoneme
     make CVM_HOST_TOOLS_PREFIX=/usr/bin/
    Line: 514 to 526
     

    Test the Executable

    Added:
    >
    >
     Note: This test procedure is based on using the qvfb virtual framebuffer. The qt3-dev-tools-embedded package contains a prebuilt binary executable version of this developer tool.
    Added:
    >
    >
     Running a test midlet is a two-stage process:
    Line: 536 to 553
     
    #!/bin/sh
    
    Changed:
    <
    <
    CDC_TOP=/home/developer/phoneme/components/cdc/build/linux-x86-generic
    >
    >
    CDC_TOP=/home/developer/phoneme/cdc/build/linux-x86-generic
     CDC_TARGET=$CDC_TOP/phoneme-advanced CDC_HELLO=$CDC_TOP/hello
    Line: 553 to 570
     

    Building an Optional Package

    Changed:
    <
    <
    phoneME Advanced MR2 includes support for several optional packages.
    >
    >
    phoneME Advanced includes support for several optional packages.
     The effort to integrate these optional packages into the project source code repository so that they can be shared and built in the phoneME Feature and phoneME Advanced projects is under way.
    Line: 567 to 584
     from the project source code repository.
    Changed:
    <
    <
    % mkdir -p phoneme-advanced-mr2/jsr135 % svn checkout https://phoneme.dev.java.net/svn/phoneme/components/jsr135/trunk phoneme-advanced-mr2/jsr135
    >
    >
    % cd phoneme-advanced % svn checkout https://phoneme.dev.java.net/svn/phoneme/components/jsr135/trunk jsr135
     

    Build the Executable


     <<O>>  Difference Topic PhoneMEAdvancedBSGHost (6 - 12 Sep 2007 - Main.dbsears)
    Line: 1 to 1
     
    META TOPICPARENT name="PhoneMEAdvanced"

    CDC Build System: Host Environment

    Line: 380 to 380
      development libraries.
    QT_TARGET_DIR=/usr/share/qt3
    Deleted:
    <
    <
    X11_LIB_DIR Location of the X11 libraries. X11_LIB_DIR=/usr/X11R6/lib
     
    Line: 494 to 489
     
    #!/bin/sh
    
    Changed:
    <
    <
    export TOP_DIR=/home/developer/phoneme
    >
    >
    export TOP_DIR=/home/developer/phoneme/components
     make CVM_HOST_TOOLS_PREFIX=/usr/bin/ CVM_TARGET_TOOLS_PREFIX=/usr/bin/ CVM_JAVA_TOOLS_PREFIX=/usr/java/j2sdk1.4.2_15/bin/ JDK_HOME=/usr/java/j2sdk1.4.2_15
    Added:
    >
    >
    CVM_BUILD_SUBDIR=true CVM_BUILD_SUBDIR_NAME=phoneme-advanced
      J2ME_CLASSLIB=basis AWT_IMPLEMENTATION=qt QT_TARGET_DIR=/home/developer/qt-embedded
    Line: 509 to 506
      QTOPIA=false USE_QVFB=true USE_QT_FB=false
    Deleted:
    <
    <
    CVM_BUILD_SUBDIR=true CVM_BUILD_SUBDIR_NAME=phoneme-advanced
      PCSL_DIR=$TOP_DIR/pcsl TOOLS_DIR=$TOP_DIR/tools USE_MIDP=true

     <<O>>  Difference Topic PhoneMEAdvancedBSGHost (5 - 16 Aug 2007 - Main.dbsears)
    Line: 1 to 1
     
    META TOPICPARENT name="PhoneMEAdvanced"

    CDC Build System: Host Environment

    Line: 494 to 494
     
    #!/bin/sh
    
    Changed:
    <
    <
    export TOP_DIR=TOP_DIR=/home/developer/phoneme
    >
    >
    export TOP_DIR=/home/developer/phoneme
     make CVM_HOST_TOOLS_PREFIX=/usr/bin/

     <<O>>  Difference Topic PhoneMEAdvancedBSGHost (4 - 01 Aug 2007 - Main.dbsears)
    Line: 1 to 1
     
    META TOPICPARENT name="PhoneMEAdvanced"

    CDC Build System: Host Environment

    Line: 26 to 26
     CDC Build System Guide for more information about build options, build system organization and tool setup issues.
    Changed:
    <
    <
    See CDC Build System: Target Devices
    >
    >
    See CDC Build System: Target Devices
     for information on how to build executable versions of the CDC Java runtime environment for various embedded target devices.
    Line: 303 to 303
     

    Setup the Build System

    Changed:
    <
    <
    The build system requirements for PBP are the same as the base requirements
    >
    >
    The build system requirements for PBP are the same as the base requirements
     described earlier with the addition of the Qt3 development libraries.
    Line: 341 to 340
     Note: The version of Qt described above and available through the Ubuntu package management system is for desktop application development.
    Changed:
    <
    <
    Later, in the section on Building MIDP
    >
    >
    Later, in the section on Building MIDP
     we'll use Qt Embedded which is built and used in a different way. PBP can be built using both Qt and Qt Embedded while currently, MIDP can only be built using Qt Embedded.

     <<O>>  Difference Topic PhoneMEAdvancedBSGHost (3 - 01 Aug 2007 - Main.dbsears)
    Line: 1 to 1
     
    META TOPICPARENT name="PhoneMEAdvanced"

    CDC Build System: Host Environment

    Line: 615 to 615
     It can be built, but not tested at runtime.
    Added:
    >
    >
    META TOPICMOVED by="dbsears" date="1185942239" from="Mobileandembedded.PhoneMEAdvancedGSGHost" to="Mobileandembedded.PhoneMEAdvancedBSGHost"

     <<O>>  Difference Topic PhoneMEAdvancedBSGHost (2 - 01 Aug 2007 - Main.dbsears)
    Line: 1 to 1
     
    META TOPICPARENT name="PhoneMEAdvanced"

    CDC Build System: Host Environment

    Line: 495 to 495
     
    #!/bin/sh
    
    Changed:
    <
    <
    export TOP_DIR=/home/developer/phoneme
    >
    >
    export TOP_DIR=TOP_DIR=/home/developer/phoneme
     make
    Deleted:
    <
    <
    JDK_HOME=/usr/java/j2sdk CVM_JAVA_TOOLS_PREFIX=/usr/java/j2sdk/bin/
      CVM_HOST_TOOLS_PREFIX=/usr/bin/ CVM_TARGET_TOOLS_PREFIX=/usr/bin/
    Added:
    >
    >
    CVM_JAVA_TOOLS_PREFIX=/usr/java/j2sdk1.4.2_15/bin/ JDK_HOME=/usr/java/j2sdk1.4.2_15
      J2ME_CLASSLIB=basis AWT_IMPLEMENTATION=qt
    Changed:
    <
    <
    QT_TARGET_DIR=/home/dsears/qt/target
    >
    >
    QT_TARGET_DIR=/home/developer/qt-embedded
      QT_VERSION=2 QTEMBEDDED=true QTOPIA=false USE_QVFB=true USE_QT_FB=false
    Deleted:
    <
    <
    CVM_OPTIMIZED=true CVM_DEBUG=true CVM_VERBOSE=true
      CVM_BUILD_SUBDIR=true CVM_BUILD_SUBDIR_NAME=phoneme-advanced
    Deleted:
    <
    <
    CVM_JVMDI=false CVM_PRELOAD_LIB=false CVM_MTASK=false TOOLS_DIR=$TOP_DIR/tools
      PCSL_DIR=$TOP_DIR/pcsl
    Changed:
    <
    <
    MIDP_DIR=$TOP_DIR/midp USE_MIDP=true
    >
    >
    TOOLS_DIR=$TOP_DIR/tools USE_MIDP=true MIDP_DIR=$TOP_DIR/midp
     

    Test the Executable

    Line: 548 to 542
     
    #!/bin/sh
    
    Changed:
    <
    <
    CDC_TOP=/home/test/phoneme/components/cdc/build/linux-x86-generic
    >
    >
    CDC_TOP=/home/developer/phoneme/components/cdc/build/linux-x86-generic
     CDC_TARGET=$CDC_TOP/phoneme-advanced CDC_HELLO=$CDC_TOP/hello

     <<O>>  Difference Topic PhoneMEAdvancedBSGHost (1 - 01 Aug 2007 - Main.dbsears)
    Line: 1 to 1
    Added:
    >
    >
    META TOPICPARENT name="PhoneMEAdvanced"

    CDC Build System: Host Environment

    Once you have downloaded the source code for phoneME Advanced MR2, you can use the build system included with it to build different executable versions of a CDC Java runtime environment. These different versions can include different peformance features, API options or target platforms.

    The following sections show how to setup the CDC build system on a Linux/x86 host platform, and then build different versions of the CDC Java runtime environment that will also run on a Linux/x86 platform. We call this running the CDC Java runtime environment on a host platform. A later section describes how to build different versions of the CDC Java runtime environment that run on alternate devices like advanced phones.

    This guide only covers the basic build procedures and build options. See the CDC Build System Guide for more information about build options, build system organization and tool setup issues. See CDC Build System: Target Devices for information on how to build executable versions of the CDC Java runtime environment for various embedded target devices.

    Build System Setup

    Install the Linux Build Tool Packages

    Note: Currently, most of the active testing for CDC build system for phoneME Advanced MR2 technology has been based on Ubuntu 6.0.6.

    The CDC build system included with the source code for the phoneME Advanced MR2 can run on many different Linux distributions. To run the CDC build system, you will need certain Linux developer tools like a C/C++ compiler as well as the Java developer tools included in the Java SE SDK.

    A reasonable guideline is that a recent, common Linux distribution should include the tools needed by the CDC build system. However, some user-oriented Linux distributions like Ubuntu may not include the necessary tools by default. So this guide includes tables that provide guidelines for acquiring the necessary tools based on the Debian Package Management System used by Ubuntu and Debian.

    Debian Package Version
    binutils-static 2.16
    bison 2.1
    flex 2.5.31
    g++-4.0 4.0.3
    make 3.8
    subversion 1.3.1

    Note that the source code and build system for this release have been tested with earlier versions of gcc as well, in particular 3.3.x and 3.4.x. In particular, gcc 4.x is more restrictive than earlier versions. So it may in some cases be necessary to use the -fpermissive flag or downgrade to an earlier compiler version.

    Install the Java Build Tools

    Download and install the Java SE SDK, version 1.4.2. The examples below are based on installing the Java developer tools in /usr/java/j2sdk.

    Note that many Linux distributions include alternate implementations of these Java developer tools. We have only tested and run the CDC build system with the Java developer tools provided by Sun.

    A Simple Example Build: CDC

    Once you've set up the CDC build system by installing the necessary build tools in the default locations, then you can perform a simple build process to validate the build system. The build process is launched by a top-level GNUmakefile in the target build directory. The name of the target build directory is based on the combination of the operating system, CPU and product name. For example, the target build directory for Ubuntu is cdc/build/linux-x86-generic.

    The simplest build target is CDC without any profile. This is a "headless" implementation that we'll use to run a basic HelloWorld application.

    Build the Executable

    The CDC build system is launched with a single make command.

    % make
    

    The build system will display a log of the build process. If the build is successful, it will display something like:

    ...
    make[1]: Entering directory `/home/user/phoneme-advanced-mr2/build/linux-x86-generic'
    make[1]: Nothing to be done for `tools'.
    make[1]: Leaving directory `/home/user/phoneme-advanced-mr2/build/linux-x86-generic'
    

    If the build fails at some point, your build tools are probably misconfigured or not compatible. The first step is to look at the definitions of

    Variable Description Example
    CVM_HOST_TOOLS_PREFIX Location of the host build tools. Requires a trailing slash (/). CVM_HOST_TOOLS_PREFIX=/usr/bin/
    CVM_JAVA_TOOLS_PREFIX Location of the Java build tools. Requires a trailing slash (/). CVM_JAVA_TOOLS_PREFIX=/usr/java/j2sdk/bin/
    JDK_HOME Location of the Java build tools. Needed by some parts of the build system. JDK_HOME=/usr/java/j2sdk/bin/

    Test the Executable

    When the build process completes successfully it generates an executable CDC Java runtime environment. The component files of the CDC Java runtime environment are located in the target build directory. The runtime files are in the bin and lib directories with some additional demo programs in testclasses.zip.

    Here is the command-line for running a simple test application.

    % bin/cvm -cp testclasses.zip HelloWorld
    

    More Build Options

    The CDC build system includes many build options and targets:

    • API choices. The Java ME platform has a configurable API architecture which allows designers to select standardized APIs that are appropriate for a given target device. The CDC white paper describes these API choices in more detail. For now, it's important to understand that these choices are made available through the build system as build options. For example, the choice between which Java ME profile to use is controlled by the J2ME_CLASSLIB build option.

    • Testing features. Some build options are intended only for development and testing purposes. These include CVM_TRACE for tracing VM events and CVM_JVMDI for enabling Java debugging.

    • Performance features. And finally, some build options are intended for performance. For example, CVM_PRELOAD_LIB uses JavaCodeCompact to preload the Java class library so that it can execute out of ROM. And CVM_JIT builds an executable with a JIT.

    • Convenience features. By default, the generated files are built in the target build directory. CVM_BUILD_SUBDIR=true and CVM_BUILD_SUBDIR_NAME=name tell the build system to deposit the generated files in another directory.

    The CDC Build System Guide provides tables that describe each build option.

    Building Foundation Profile

    Foundation Profile (FP) is a more complete API specification for headless devices. The steps described above can be easily modified to build an executable for FP. All you have to do is add J2ME_CLASSLIB=foundation build option to the build options in the GNUmakefile.

    Here is the command-line for running a test application.

    % bin/cvm -cp testclasses.zip Test
    

    Note: The CDC build system caches some generated build files. So after changing build flags, it's important to perform a "make clean" operation.

    Building Personal Basis Profile

    The CDC build system has many build options for building versions of the CDC Java runtime environment with additional API capabilities. For example, Personal Basis Profile (PBP) is an API specification for providing GUI capabilities. While PBP is not itself a GUI framework, it provides an infrastructure for implementing lightweight GUI widget toolkits like Swing and support for the xlet application model.

    This build example will show how to build the CDC Java runtime environment with a PBP implementation based on the Qt GUI framework.

    Setup the Build System

    The build system requirements for PBP are the same as the base requirements described earlier with the addition of the Qt3 development libraries.

    Debian Package Version
    libqt3-mt-dev 3.3.6
    libqt3-compat-headers 3.3.6
    qt3-dev-tools-embedded 3.3.6

    Note: The version of Qt described above and available through the Ubuntu package management system is for desktop application development. Later, in the section on Building MIDP we'll use Qt Embedded which is built and used in a different way. PBP can be built using both Qt and Qt Embedded while currently, MIDP can only be built using Qt Embedded.

    Build the Executable

    Building PBP requires a few additional build options. You can put these make variables on the make command-line or add them to the GNUmakefile.

    Build Option Description Example
    J2ME_CLASSLIB Profile build target. J2ME_CLASSLIB=basis
    AWT_IMPLEMENTATION Platform-level GUI toolkit used by AWT. AWT_IMPLEMENTATION=qt
    QT_TARGET_DIR Location of the Qt3 development libraries. QT_TARGET_DIR=/usr/share/qt3
    X11_LIB_DIR Location of the X11 libraries. X11_LIB_DIR=/usr/X11R6/lib

    Test the Executable

    Here is the command-line for running a PBP test application.

    % bin/cvm -cp democlasses.jar basis.DemoFrame
    

    Building MIDP

    phoneME Advanced MR2 includes the first release of MIDP on CDC technology and a lot of work has been done to make the build systems and implementations compatible and sharable.

    Setup the Build System

    1. Checkout the pcsl and midp components from the project source code repository.

      % mkdir -p phoneme-advanced-mr2/pcsl
      % svn checkout https://phoneme.dev.java.net/svn/phoneme/components/pcsl/trunk phoneme-advanced-mr2/pcsl
      
      % mkdir -p phoneme-advanced-mr2/midp
      % svn checkout https://phoneme.dev.java.net/svn/phoneme/components/midp/trunk phoneme-advanced-mr2/midp
      

    2. Install the Debian package for the gawk tool.

      Debian Package Version
      gawk 1.3.1

    3. Build and install the Qt Embedded Library. See the Qt Build Notes in the phoneME Advanced Twiki.

    Build the Executable

    Use the following build options:

    Build Option Description
    PCSL_DIR Location of the PCSL component, e.g. /home/test/phoneme/components/pcsl.
    MIDP_DIR Location of the MIDP component, e.g. /home/test/phoneme/components/midp.
    USE_MIDP Tells the build system to include the MIDP implementation.

    For example, here's a working build script with most of the build options defined explicitly. Note the different values for QT_TARGET_DIR, QT_VERSION and QTEMBEDDED.

    #!/bin/sh
    
    export TOP_DIR=/home/developer/phoneme
    
    make \
      JDK_HOME=/usr/java/j2sdk \
      CVM_JAVA_TOOLS_PREFIX=/usr/java/j2sdk/bin/ \
      CVM_HOST_TOOLS_PREFIX=/usr/bin/ \
      CVM_TARGET_TOOLS_PREFIX=/usr/bin/ \
      J2ME_CLASSLIB=basis \
      AWT_IMPLEMENTATION=qt \
      QT_TARGET_DIR=/home/dsears/qt/target \
      QT_VERSION=2 \
      QTEMBEDDED=true \
      QTOPIA=false \
      USE_QVFB=true \
      USE_QT_FB=false \
      CVM_OPTIMIZED=true \
      CVM_DEBUG=true \
      CVM_VERBOSE=true \
      CVM_BUILD_SUBDIR=true \
      CVM_BUILD_SUBDIR_NAME=phoneme-advanced \
      CVM_JVMDI=false \
      CVM_PRELOAD_LIB=false \
      CVM_MTASK=false \
      TOOLS_DIR=$TOP_DIR/tools \
      PCSL_DIR=$TOP_DIR/pcsl \
      MIDP_DIR=$TOP_DIR/midp \
      USE_MIDP=true
    

    Test the Executable

    Note: This test procedure is based on using the qvfb virtual framebuffer. The qt3-dev-tools-embedded package contains a prebuilt binary executable version of this developer tool.

    Running a test midlet is a two-stage process:

    1. Launch the qvfb virtual framebuffer.

      % qvfb -width 640 -height 442 -depth 16 -qwsdisplay :0
      

    2. Run the test midlet. Here's an example test script based on a HelloWorld midlet:

      #!/bin/sh
      
      CDC_TOP=/home/test/phoneme/components/cdc/build/linux-x86-generic
      CDC_TARGET=$CDC_TOP/phoneme-advanced
      CDC_HELLO=$CDC_TOP/hello
      
      $CDC_TARGET/bin/cvm \
        -Dmicroedition.profiles=MIDP-2.0 \
        -Dsun.midp.library.name=midp \
        -Dsun.midp.home.path=$CDC_TARGET/midp/midp_linux_fb_gcc \
        -Dcom.sun.midp.mainClass.name=com.sun.midp.main.CdcMIDletSuiteLoader \
        sun.misc.MIDPLauncher \
          -midppath $CDC_TARGET/midp/midp_linux_fb_gcc/classes \
          -suitepath $CDC_HELLO/HelloWorld.jar -1 HelloWorld
      

    Building an Optional Package

    phoneME Advanced MR2 includes support for several optional packages. The effort to integrate these optional packages into the project source code repository so that they can be shared and built in the phoneME Feature and phoneME Advanced projects is under way. The example optional package here (jsr135) is really a placeholder to demonstrate build system functionality.

    Setup the Build System

    Checkout the abstractions component and any optional package component from the project source code repository.

    % mkdir -p phoneme-advanced-mr2/jsr135
    % svn checkout https://phoneme.dev.java.net/svn/phoneme/components/jsr135/trunk phoneme-advanced-mr2/jsr135
    

    Build the Executable

    Use the following build options:

    Build Option Description
    USE_JSR135 Setting this build option to true tells the build system to include the jsr135 implementation.
    JSR_DIR_135 Location of the jsr135 component.

    Test the Executable

    Currently, optional package support is only available to demonstrate a level of completeness for the framework. It can be built, but not tested at runtime.


    Topic PhoneMEAdvancedBSGHost . { View | Diffs r13 < r12 < r11 < r10 | More }
     XML java.net RSS