移植Java虚拟机到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  

八、出错
    ../../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
    ../../src/linux-arm/javavm/runtime/segvhandler_arch.c:285: error: dereferencing pointer to incomplete type
    ../../src/linux-arm/javavm/runtime/segvhandler_arch.c:285: error: dereferencing pointer to incomplete type
    ../../src/linux-arm/javavm/runtime/segvhandler_arch.c:286: error: dereferencing pointer to incomplete type
    ../../src/linux-arm/javavm/runtime/segvhandler_arch.c:294: error: dereferencing pointer to incomplete type
    修改 segvhandler_arch.c 文件
    gedit ../../src/linux-arm/javavm/runtime/segvhandler_arch.c
    修改
    #define ucontext asm_ucontext
    #include
    为
    //#define ucontext asm_ucontext     //注释掉这句
    #include             //去掉arm/

九、编译
    make  
    编译成功!
    ls
    可以看到在当前目录有
    bin   lib   testclasses.zip