Skip to main content

Fail to launch pMEA AMS on ARM (PBP/PP with AWT Qt-peer is OK)

8 replies [Last post]
neoliu
Offline
Joined: 2010-04-29

Dear all,

I have been working on porting phoneME Advanced MR1 to ARM-linux platform for a month.
I succeed in porting PBP with Qte-2.3.10/Qtopia-2.2.0 and PP with Qtopia-2.2.0,
all demo applications run OK, but I was stopped at porting PP with AMS.

In fact, the building of AMS is successful, the icon of AMS is also present
on Qtopia desktop. The issue is that when I click the AMS icon, Qtopia GUI
disappears and AMS seems not able to start up after a long time.

I'm longing for someone to give me a hand.

My phoneME Advanced source code is phoneme_advanced-mr1-rel-src-b06-10_nov_2006.zip
My JDK binary is j2sdk-1_4_2_19-linux-i586.bin
My gcc version is 4.2.1 and arm-linux-gcc version is 4.4.0
I download the zIamge to my platform through ICE and my platform is a dev-board
with ARM9 core, 256MB RAM and a touch screen.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
neoliu
Offline
Joined: 2010-04-29

Just now, I added a Java Applet application to Qtopia GUI by adding a .desktop file to $QPEDIR/apps/Java a launch script to $QPEDIR/bin and an icon to $QPEDIR/pics. It works, so the AMS seems to be unnecessary, but I still want to make it work, so if anyone could, please help me.

Hinkmond Wong

phonemeadvanced@mobileandembedded.org wrote:
> Just now, I added a Java Applet application to Qtopia GUI by adding a .desktop file to $QPEDIR/apps/Java a launch script to $QPEDIR/bin and an icon to $QPEDIR/pics. It works, so the AMS seems to be unnecessary, but I still want to make it work, so if anyone could, please help me

Hi neoliu,

I'd suggest that you keep using the method you discovered works by using
the $QPEDIR/apps/Java subdir, adding a launch script and icon to
$QPEDIR/bin and $QPEDIR/pics. This is the correct way to integrate
phoneME Java apps into the QPE AMS/launcher. The PP AMS in phoneME was
experimental and cannot do even a fraction of what the QPE AMS can fully
do, plus the PP AMS was meant to run without the QPE AMS running since
only one launcher can logically exist at one time on a device. This
means you have to kill the existing QPE AMS to properly run the limited
functioning PP AMS, in order so you don't get contention for the screen
(each thinks its AMS owns the home screen, which is a problem when both
run at once).

Because of all those reasons (especially the fact that the limited PP
AMS is only experimental and cannot run as a full AMS for a device, only
as a proof-of-concept of a subset of AMS functionality), you should
continue to use the QPE AMS/launcher as you are currently doing.

Hope this helps!

Thanks,
Hinkmond

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

neoliu
Offline
Joined: 2010-04-29

It does help, thank you very much!
I'll put the troubleshooting of my porting procedure here ASAP.

abhijitjagadeesh2
Offline
Joined: 2010-07-20

hello,
I am in desperate need of your help. I want to port java on to my mini 2440 arm. Could you please guide me in how to start with it. or could you please let me know where i can get to know the information regarding how to approach it.Please please help me out.

Darryl Mocek

Hi Abhitjit,

if you want to port CDC to the mini 2440 arm, I suggest this:

- Go to http://wiki.java.net/bin/view/Mobileandembedded/PhoneMEAdvanced
You will find information on how to get CDC and how to build for
various platforms. You should look at the linux-arm and win32-arm
platforms.
- Read https://phoneme.dev.java.net/files/documents/5835/123364/porting.pdf
This guide will give you information on how to port to your platform.

Darryl

On 7/20/2010 15:22, phonemeadvanced@mobileandembedded.org wrote:
> hello,
> I am in desperate need of your help. I want to port java on to my mini 2440 arm. Could you please guide me in how to start with it. or could you please let me know where i can get to know the information regarding how to approach it.Please please help me out.
> [Message sent by forum member 'abhijitjagadeesh2']
>
> http://forums.java.net/jive/thread.jspa?messageID=478143
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
> For additional commands, e-mail: advanced-help@phoneme.dev.java.net
>
>
[att1.html]

neoliu
Offline
Joined: 2010-04-29

Here is my building script.
----------------------------------------------------------------------------->>
make \
JDK_HOME=$JDK_DIR \
J2ME_CLASSLIB=personal \
CVM_DEBUG=true \
CVM_TERSEOUTPUT=true \
CVM_TOOLS_DIR=$ARM_GCC_DIR \
CVM_HOST=arm-ftc-linux \
CVM_TARGET_TOOLS_PREFIX=arm-linux- \
CVM_BUILD_SUBDIR=true \
QTEMBEDDED=true \
QTOPIA=true \
QT_TARGET_DIR=$QTDIR \
J2ME_PLATFORM=appmanager \
PRESENTATION_MODES=AwtPDA
-----------------------------------------------------------------------------<<

Here is my script to launch AMS.
----------------------------------------------------------------------------->>
/opt/qtopia-2.2.0/bin $ cat launchams
#!/bin/sh
#
# use cvmc to launch the Personal Profile version
# of the CDC AMS appmanager in a client JVM instance
#
CDCAMS=/opt/phoneME
SERVERLOG=/tmp/ams_server.log
MANAGERLOG=/tmp/ams_manager.log
AMSCLIENTJAR=$CDCAMS/lib/appmanager-client.jar
AMSMANAGERJAR=$CDCAMS/lib/appmanager.jar
AMSCLASS=com.sun.appmanager.impl.CDCAmsAppManager
PMODEJAR=$CDCAMS/lib/AwtPDA_PresentationMode.jar
PMODECLASS=com.sun.appmanager.impl.presentation.AwtPDA.AwtPDAPresentationMode
XMLJAR=$CDCAMS/lib/j2me_xml_cdc.jar
CLASSLIST=$CDCAMS/repository/profiles/classesList.txt
METHODLIST=$CDCAMS/repository/profiles/methodsList.txt
#
# launch the mtask server
#
$CDCAMS/bin/cvm \
-Xbootclasspath/a:$AMSCLIENTJAR \
-Xserver:port=7788,initClasses=$CLASSLIST,precompileMethods=$METHODLIST \
> $SERVERLOG 2>&1 &
#
# wait for the mtask server to finish launching before cloning it
#
sleep 5
#
# use the cvmc driver utility
# to launch the CDC AMS implementation
# in a client JVM instance
#
$CDCAMS/bin/cvmc \
-host 127.0.0.1 \
-port 7788 \
-command JDETACH \
-XappName=$0 \
-Xbootclasspath/a:$AMSMANAGERJAR:$PMODEJAR:$XMLJAR \
-Dcdcams.presentation=$PMODECLASS \
$AMSCLASS \
-port 7788 \
-server 127.0.0.1 \
> $MANAGERLOG 2>&1
-----------------------------------------------------------------------------<<

Here are the generated log files. I turn on the DEBUG option and it seems to be
alright and sometimes I can see the AMS welcome window, but it just stopped there
and I can not see the Java GUI environment described as FIGURE 5-4 in
"CDC Runtime Guide".
----------------------------------------------------------------------------->>
/ # cat /tmp/ams_server.log
CVM Configuration:
Java stack chunk size (stackChunkSize): 2048
Java stack minimum size (stackMinSize): 3072
Java stack maximum size (stackMaxSize): 131072
GC[SS]: Initialized semi-space gen for generational GC
Size of *each* semispace in bytes=1048576
Limits of generation = [0x401a2200,0x403a2200)
First semispace = [0x401a2200,0x402a2200)
Second semispace = [0x402a2200,0x403a2200)
GC[MC]: Initialized mark-compact gen for generational GC
Size of the space in bytes=4194304
Limits of generation = [0x403a2200,0x407a2200)
GC[generational]: Auxiliary data structures
heapBaseMemoryArea=[0x401a2008,0x407a2208)
cardTable=[0x47e2b0,0x4812b0)
objectHeaderTable=[0x4812b8,0x4842b8)
summaryTable=[0x4842c0,0x4902c0)
JIT Configuration:
Interpreter transition cost (icost): 20
Mixed transition cost (mcost): 50
Backwards branch cost (bcost): 4
Compilation threshold (climit): 20000
When to compile (compile): policy
What to inline (inline): virtual+nonvirtual+vhints+ihints
Max Inlining Depth (maxInliningDepth): 12
Max Inlining Code Length (maxInliningCodeLength): 68
Min Inlining Code Length (minInliningCodeLength): 16
Policy Triggered Decompilations (policyTriggeredDecompilations): true
Max Working Memory Size (maxWorkingMemorySize): 563200
Max Compiled Method Size (maxCompiledMethodSize): 65535
Code Cache Size (codeCacheSize): 524288
Upper Code Cache Threshold (upperCodeCacheThreshold): 95%
Lower Code Cache Threshold (lowerCodeCacheThreshold): 90%
Pass Phi values in registers (XregisterPhis): true
Pass locals in registers between blocks (XregisterLocals): true
Compiling Causes Class Loading (XcompilingCausesClassLoading): false
Trace (trace): none
Starting mTASK server to listen on port 7788 .... MARKED THIS JITBUFFER SPOT, 485016 BYTES IN USE
done!
Executing new command: "JDETACH -XappName=/opt/qtopia-2.2.0/bin/launchams -Xbootclasspath/a:/opt/phoneME/lib/appmanager.jar:/opt/phoneME/lib/AwtPDA_PresentationMode.jar:/opt/phoneME/lib/j2me_xml_cdc.jar -Dcdcams.presentation=com.sun.appmanager.impl.presentation.AwtPDA.AwtPDAPresentationMode com.sun.appmanager.impl.CDCAmsAppManager -port 7788 -server 127.0.0.1 "
SPAWNED OFF PID=84
Received SIGCHLD in PID=68
/ # cat /tmp/ams_manager.log
CHILD PID=84
-----------------------------------------------------------------------------<<

By the way, I did not create a swap file as the "CDC Runtime Guide" says because
I think it's not necessary for my case.
I'm rather confused and need some help, thanks.

Hinkmond Wong

Hi neoliu,

It's nice to see how far you got already with porting PBP on QTE
2.3.10/Qtopia 2.2.0. That part is great and we'd like to hear about any
problems you ran into and how you got around them on this forum.

When you talk about porting PP with AMS however, that's a more
complicated matter. We have not supported that build in quite some time
and it was only an experimental version of PP that had a minimally
functioning AMS that did not work fully.

Can you tell us how you want to use PP with AMS?

Instead, what may be better is to use just PP (no AMS). So, do NOT set
these build variables:

Delete:
J2ME_PLATFORM=appmanager \
PRESENTATION_MODES=AwtPDA

and see if that allows you to build an non-AMS version of personal profile instead. That might be your best option.

Best regards,
Hinkmond

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

neoliu
Offline
Joined: 2010-04-29

Hi Hinkmond,

Thanks for your reply.

I want to use PP with AMS to launch and manage Java Xlet/Applet from Qtopia GUI by clicking the icons other than type commands from console.

I've succeessfully ported an non-AMS version of PP a couple of weeks ago and it's OK. I've put my porting procedure here later, in fact, some patches should be applied to QTE/Qtopia and pMEA.

I'll still debug AMS or find another way to get rid of the console, any ideas will be helpful to me.

By the way, I've successfully run several benchmarks on my platform to test CDC/FP/PBP/PP, like Dhrystone, SciMark, Linpack, Sieve and so on, but I failed to run Plasma, it just stopped there without any errors and warnings, do you have any ideas?

What's more, I'm not familiar with Java so I can't make clear the relationship between AMS and network, would you please give me some short directions, thanks a lot.

Best regards,
Neoliu