background image

移植 java 虚拟机到 FriendlyArm Mini2440

一、选用 sun 的 phoneme
    

https://phoneme.dev.java.net/

§

二、下载
    

http://download.java.net/mobileembedded/phoneme/advanced/phoneme_advanced-mr2-dev-

src-b97-20_nov_2008.zip

§

三、解压
    unzip phoneme_advanced-mr2-dev-src-b97-20_nov_2008.zip

四、修改 makefile
    cd phoneme_advanced_mr2/cdc/build/linux-arm-generic
    gedit GNUmakefile

    

 

修改 CVM_TARGET_TOOLS_PREFIX=/usr/local/arm/4.3.2/bin/arm-linux- 为自己的交叉

编译器的地址  

    

 

修改 USE_AAPCS ?= false   

为 true

五、输出 PATH
    export PATH=/usr/local/arm/4.3.2/bin/:$PATH                     为自己的交叉编译器的地址

六、编译
    make  (可能会报错)

七、如果有出错提示可能是 JDK、bison、flex 没有安装

    Java 的安装配置参考

    

http://www.oracle.com/index.html

§

    或者在 Ubuntu 的新立德软件包中搜索 Open Jdk

    另外的一两个工具可以通过在终端中通过一下命令安装

        apt-get install bison

        apt-get install flex

八、还是出错
    ../../src/linux-arm/javavm/runtime/segvhandler_arch.c:45:26: error: asm/ucontext.h: No such 
file or directory
    ../../src/linux-arm/javavm/runtime/segvhandler_arch.c: In function 'handleSegv':
    ../../src/linux-arm/javavm/runtime/segvhandler_arch.c:224: error: dereferencing pointer to 
incomplete type