Skip to main content

Share my experience of porting PP to ARM-linux platform (pMEA MR1)

3 replies [Last post]
neozhc
Offline
Joined: 2010-06-09
Points: 0

I succeed in porting phoneme_advanced-mr1-rel-src-b06-10_nov_2006.zip to my ARM platform and I want to share my trouble-shootings. Hope it helps.

(1) Development environment
JDK: j2sdk-1_4_2_19-linux-i586.bin
arm-linux-gcc: 4.4.0
GCC: 4.2.1
Platform: ARMv5TE core, 256MB RAM and a touch screen

(2) Porting Qtopia
Some patches should be applied because arm-linux-gcc-4.4.0 is much too new for Qtopia-2.2.0. I won't paste the patches here, they're too long and all the Qtopia-2.2.0 bugs can be found by Google and they can easily be fixed.
My qconfig-a360.h file
--------------------------------------------------------------------------------------------------------------------->
/* Data structures */
#ifndef QT_NO_DOM
# define QT_NO_DOM
#endif

/* Dialogs */
#ifndef QT_NO_PRINTDIALOG
# define QT_NO_PRINTDIALOG
#endif
#ifndef QT_NO_PROGRESSDIALOG
# define QT_NO_PROGRESSDIALOG
#endif

/* Fonts */
#ifndef QT_NO_BDF
# define QT_NO_BDF
#endif

/* Kernel */
/*
#ifndef QT_NO_CURSOR
# define QT_NO_CURSOR
#endif
*/
#ifndef QT_NO_DRAGANDDROP
# define QT_NO_DRAGANDDROP
#endif
#ifndef QT_NO_EFFECTS
# define QT_NO_EFFECTS
#endif
#ifndef QT_NO_PROPERTIES
# define QT_NO_PROPERTIES
#endif

/* Painting */
#ifndef QT_NO_PRINTER
# define QT_NO_PRINTER
#endif

/* Qt/Embedded-specific */
#ifndef QT_NO_QWS_ALPHA_CURSOR
# define QT_NO_QWS_ALPHA_CURSOR
#endif
#ifndef QT_NO_QWS_CURSOR
# define QT_NO_QWS_CURSOR
#endif
#ifndef QT_NO_QWS_GFX_SPEED
# define QT_NO_QWS_GFX_SPEED
#endif
#ifndef QT_NO_QWS_MACH64
# define QT_NO_QWS_MACH64
#endif
#ifndef QT_NO_QWS_BEOS_WM_STYLE
# define QT_NO_QWS_BEOS_WM_STYLE
#endif
#ifndef QT_NO_QWS_KDE2_WM_STYLE
# define QT_NO_QWS_KDE2_WM_STYLE
#endif
#ifndef QT_NO_QWS_KDE_WM_STYLE
# define QT_NO_QWS_KDE_WM_STYLE
#endif
#ifndef QT_NO_QWS_WINDOWS_WM_STYLE
# define QT_NO_QWS_WINDOWS_WM_STYLE
#endif
#ifndef QT_NO_QWS_MATROX
# define QT_NO_QWS_MATROX
#endif
#ifndef QT_NO_QWS_MOUSE_AUTO
# define QT_NO_QWS_MOUSE_AUTO
#endif
#ifndef QT_NO_QWS_MOUSE_PC
# define QT_NO_QWS_MOUSE_PC
#endif
#ifndef QT_NO_QWS_SAVEFONTS
# define QT_NO_QWS_SAVEFONTS
#endif
#ifndef QT_NO_QWS_SVGALIB
# define QT_NO_QWS_SVGALIB
#endif
#ifndef QT_NO_QWS_VFB
# define QT_NO_QWS_VFB
#endif
#ifndef QT_NO_QWS_VGA_16
# define QT_NO_QWS_VGA_16
#endif
#ifndef QT_NO_QWS_VNC
# define QT_NO_QWS_VNC
#endif
#ifndef QT_NO_QWS_VOODOO3
# define QT_NO_QWS_VOODOO3
#endif

/* Styles */
#ifndef QT_NO_STYLE_PLATINUM
# define QT_NO_STYLE_PLATINUM
#endif
#ifndef QT_NO_STYLE_MOTIF
# define QT_NO_STYLE_MOTIF
#endif

/* Widgets */
#ifndef QT_NO_WORKSPACE
# define QT_NO_WORKSPACE
#endif
#ifndef QT_NO_DIAL
# define QT_NO_DIAL
#endif
#ifndef QT_NO_SIZEGRIP
# define QT_NO_SIZEGRIP
#endif
---------------------------------------------------------------------------------------------------------------------<
My configuration:
--------------------------------------------------------------------------------------------------------------------->
echo yes | \
./configure \
-prefix $qtopia_image_dir \
-libpath $thirdparty_image_dir/lib \
-qte "-embedded -platform linux-g++ -xplatform linux-arm-g++
-release -qconfig a360 -depths 16,32
-no-xft -no-sm -no-thread -no-g++-exceptions -no-opengl -no-qvfb
$thirdparty_opt" \
-qpe "-edition pda -platform linux-g++ -xplatform linux-arm-g++ -arch arm
-displaysize 800x480 fontfamilies helvetica
-defaultbuttons a360 -qconfig a360
-without-libmad -without-libffmpeg -without-libamr" \
-dqt '-no-xft -thread' \
-qt2 '-no-opengl -no-xft'
---------------------------------------------------------------------------------------------------------------------<

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
neozhc
Offline
Joined: 2010-06-09
Points: 0

I forgot my password so I had to register a new one.

neozhc
Offline
Joined: 2010-06-09
Points: 0

where thirdparty_opt=\
"-tslib -system-zlib -system-libpng -system-jpeg -gif
-ljpeg -lgif -lz -lpng -luuid -lstdc++
-I$thirdparty_image_dir/include
-L$thirdparty_image_dir/lib"
Remember to copy the include files required by pMEA from building directory to install directory.

[b](3) Porting PP[/b]
Several patches should be applied:
--------------------------------------------------------------------------------------------------------------------->
It can fix arm-linux-gcc-4.4.0 building error "segvhandler_arch.c:45:26: error: asm/ucontext.h: No such file or directory"
--- phoneme-advanced-mr1/src/linux-arm/javavm/runtime/segvhandler_arch.c 2010-05-06 11:10:28.000000000 +0800
+++ phoneme-advanced-mr1-a360/src/linux-arm/javavm/runtime/segvhandler_arch.c 2010-05-06 11:10:57.000000000 +0800
@@ -36,8 +36,9 @@
#include
#include
/* avoid conflicting ucontext definitions */
-#define ucontext asm_ucontext
-#include
+/*#define ucontext asm_ucontext*/
+/*#include */
+#include
#include

#define MAXSIGNUM 32

It can fix an syntax error but I'm not sure whether it will invole other new errors
--- phoneme-advanced-mr1/src/share/javavm/runtime/jit/jitirdump.c 2010-05-06 11:08:00.000000000 +0800
+++ phoneme-advanced-mr1-a360/src/share/javavm/runtime/jit/jitirdump.c.fix 2010-04-29 18:25:57.000000000 +0800
@@ -37,7 +37,7 @@

#include "javavm/include/clib.h"

-static const char *const opcodeTagMap[] = {
+const char *const opcodeTagMap[] = {
"CVMJITOP_INVALID",

"ROOT", /* CVMJITRoot */
@@ -162,7 +162,7 @@
"OUTOFLINE_INVOKE"
};

-static const char *const typeTagMap[] = {
+const char *const typeTagMap[] = {
"(NONE)",
"(NODE)",
"(v)",
@@ -180,7 +180,7 @@
"(address field)",
};

-static const char *const subnodeTagMap[] = {
+const char *const subnodeTagMap[] = {
"ROOT_NODE",
"CONSTANT_NODE",
"NULL_NODE",

It can fix "QpFrame.cc:276: error: invalid use of incomplete type 'struct QWSDecoration'"
--- phoneme-advanced-mr1/src/share/personal/native/awt/qt/wproxy/QpFrame.cc 2010-05-14 18:14:56.000000000 +0800
+++ phoneme-advanced-mr1-a360/src/share/personal/native/awt/qt/wproxy/QpFrame.cc 2010-05-14 18:15:41.000000000 +0800
@@ -269,6 +269,7 @@

#ifdef QWS
#include
+#include
QPoint
QpFrame::execGetOriginWithDecoration() {
QFrame *frame = (QFrame *)this->getQWidget();

It can get rid of the runtime "-qws" issue, but I'm not sure whether it will invole other new errors
--- phoneme-advanced-mr1/src/share/personal/native/awt/qt/QtApplication.cc 2010-05-14 19:03:45.000000000 +0800
+++ phoneme-advanced-mr1-a360/src/share/personal/native/awt/qt/QtApplication.cc 2010-05-17 10:12:25.000000000 +0800
@@ -35,7 +35,7 @@

static void *qtEventThreadID ;
QtApplication::QtApplication(int &argc,
- char **argv) :QAPPLICATION_CLASS(argc,argv) {
+ char **argv) :QAPPLICATION_CLASS(argc,argv,QAPPLICATION_CLASS::GuiServer) {
#ifndef QT_THREAD_SUPPORT
m_shutdown = FALSE; // 6176847: Indicates the call to shutdown()
#endif /* QT_THREAD_SUPPORT */

---------------------------------------------------------------------------------------------------------------------<
My GNUmakefile
--------------------------------------------------------------------------------------------------------------------->
ASM_ARCH_FLAGS =
CC_ARCH_FLAGS =
CC_ARCH_FLAGS_FDLIB =
CC_ARCH_FLAGS_LOOP =
LINK_ARCH_FLAGS = -L$QTDIR/lib -L$T_ROOT/lib
LINK_ARCH_LIBS = -lts

# assume the JIT is enabled for this device unless told otherwise
CVM_JIT ?= true

# Only enable USE_GCC2 if GCC 3.x or later is *not* being used
USE_GCC2 ?= false

include ../share/top.mk
---------------------------------------------------------------------------------------------------------------------<

Make:
--------------------------------------------------------------------------------------------------------------------->
make \
JDK_HOME=$jdk_dir \
J2ME_CLASSLIB=personal \
CVM_DEBUG=false \
CVM_TERSEOUTPUT=true \
CVM_TOOLS_DIR=$ARM_GCC_DIR \
CVM_HOST=arm-a360-linux \
CVM_TARGET_TOOLS_PREFIX=$ARM_GCC_PREFIX \
CVM_BUILD_SUBDIR=true \
$QT_OPT
---------------------------------------------------------------------------------------------------------------------<
where QT_OPT="QTEMBEDDED=true QTOPIA=true QT_TARGET_DIR=$QPEDIR"

I tried to port PP AMS but failed.

That's all, good luck!

Thanks to Hinkmond.

Message was edited by: neozhc

Hinkmond Wong

Thanks, neozhc!

This is all great information to share with the phoneME Advanced developers.

Hinkmond

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