使用的phoneme版本是phoneme_feature-mr3-rel-src-b01-17_jul_2008.zip
phoneme feature已经提供了对directfb的支持,所以所谓移植其实仅仅做很小的修改就好了,下面将给出我的修改部分以及一个编译phoneme的很简单的makefile
cldc\build\share\jvm.make
CPP_FLAGS += -Werror 改为 CPP_FLAGS +=# -Werror即可以产生警告
cldc\src\vm\cpu\arm\TemplateTable_arm.cpp
const jlong l = *(jlong *)&arg; 改为 const jlong l = double_bits(arg);//*(jlong *)&arg;
midp\build\linux_fb_gcc\Options.gmk
USE_DIRECTFB = false 改为 USE_DIRECTFB = true
midp\src\highlevelui\directfb_application\reference\native\directfbapp_export.c
改变set_win_position定义,因为浮点操作造成链接过程错误,正在找原因
#define set_win_position(w_id, width, height, x, y) do {x=0;y=0;}while (0)
MakefileFB:
export ME_ROOT=/home/lee/MB3
export COMPONENTS_DIR=$(ME_ROOT)
export Scripts=`pwd`
export Output=$(ME_ROOT)/outputfb
export Log=$(ME_ROOT)/log.txt
export JDK_DIR=/usr/local/j2sdk1.4.2_18
export GNU_TOOLS_DIR=/usr/local/arm/3.3.2/arm-linux
export DIRECTFB_INSTALL_DIR=/usr/local/directfb
export USE_DEBUG_ROMGEN=true
export USE_DEBUG_ROMGEN_SYMBOLS=true
all : dump pcsl1s pcsl2s cldc midp
dump :
@echo "---------start build phoneME feature--------------------"
pcsl1s ::
@echo "---------build pcsl1s-----------------------------------"
make -C $(ME_ROOT)/pcsl \
PCSL_PLATFORM=linux_i386_gcc \
PCSL_OUTPUT_DIR=$(Output)/pcsl \
NETWORK_MODULE=bsd/generic \
TOOLS_DIR=$(ME_ROOT)/tools \
TOOLS_OUTPUT_DIR=$(Output)/tools
pcsl2s ::
@echo "---------build pcsl2s-----------------------------------"
make -C $(ME_ROOT)/pcsl \
PCSL_PLATFORM=linux_arm_gcc \
PCSL_OUTPUT_DIR=$(Output)/pcsl \
NETWORK_MODULE=bsd/generic \
TOOLS_DIR=$(ME_ROOT)/tools \
TOOLS_OUTPUT_DIR=$(Output)/tools
cldc ::
@echo "---------build cldc-----------------------------------"
make -C $(ME_ROOT)/cldc/build/linux_arm \
JDK_DIR=$(JDK_DIR) \
ENABLE_PCSL=true \
PCSL_OUTPUT_DIR=$(Output)/pcsl \
JVMWorkSpace=$(ME_ROOT)/cldc \
JVMBuildSpace=$(Output)/cldc \
TOOLS_DIR=$(ME_ROOT)/tools \
TOOLS_OUTPUT_DIR=$(Output)/tools
midp ::
@echo "---------midp----------------------------------------"
make -C $(ME_ROOT)/midp/build/linux_fb_gcc \
GNU_TOOLS_DIR=$(GNU_TOOLS_DIR) \
JDK_DIR=$(JDK_DIR) \
PCSL_OUTPUT_DIR=$(Output)/pcsl \
CLDC_DIST_DIR=$(Output)/cldc/linux_arm/dist \
TOOLS_DIR=$(ME_ROOT)/tools \
TOOLS_OUTPUT_DIR=$(Output)/tools \
MIDP_OUTPUT_DIR=$(Output)/midp \
USE_DEBUG=true \
CPU=arm
clean: jclean pclean cclean mclean
jclean :
rm -rdf $(Output)/javacall
pclean :
rm -rdf $(Output)/pcsl1s
rm -rdf $(Output)/pcsl2s
cclean :
rm -rdf $(Output)/cldc
mclean :
rm -rdf $(Output)/midp
进入phoneme所在目录,$make -f MakefileFB 即可
拷贝生成的outputfb/midp到开发板上就OK了
在开发板上运行midp/bin/arm/usertest_g
可以看到phoneme正常启动了,不过因为我的开发板没有键盘,所以还没法进一步去测试
阅读(1431) | 评论(0) | 转发(0) |