Nuno's Photo Blog
by Nuno
포토로그
카테고리
IXP425 CVM Porting
1. requirements
    - must be ksh on linux environment
    - makes working directory(e.g, WORKINGDIR = /home/dist)
    - makes j2me directory (e.g, /home/dist/j2me)
    

2. installing freetype fonts
    - download freetype library from  http://freetype.sourceforge.net
    - cp freetype-2.1.10.tar.gz $WORKINGDIR/j2me
    - cd j2me
    - tar xvzf freetype-2.1.10.tar.gz
    - cd freetype-2.1.10
    - mkdir mybuild
    - cd mybuild
    - CC="arm-linux-gcc -mbig-endian" ../configure --host=arm-linux --prefix=INSTALLDIR
        (e.g CC="arm-linux-gcc -mbig-endian" ../configure --host=arm-linux --prefix=$WORKINGDIR)
    - make
    - make install
    - edit ~/.bashrc
    - PATH=$WORKINGDIR/lib:$WORKINGDIR/bin:/usr/local/bin:$PATH
    - source ~/.bashrc
3. intalling jdk
    - download j2sdk-1_3_1_16-linux-i586.bin from
        https://sdlcweb4a.sun.com/ECom/EComActionServlet;jsessionid=3AED28CE9016AF3CA0D66D0F81798BD0
    - chmod u+X j2sdk-1_3_1_16-linux-i586.bin
    - execute j2sdk-1_3_1_16-linux-i586.bin in your working directory

4. installing microwindows library
    - download microwin-sun-11_jun_2002.tar.gz from http://www.experimentalstuff.com/Technologies/mwpbp/download.html
    - exract the file in $WORKING/j2me directory(e.g /home/dist/j2me), tar zxvf microwin-sun-11_jun_2002.tar.gz
    - cd microwin
    - delete X11Driver.c and X11Driver.h in src/engine
    - edit GNUMakefile
        .cflags = -Wall -g -DHAVEFLOAT  ==>  cflags = -Wall -g -DHAVEFLOAT -I$WORKING/j2me/freetype-2.1.10/include
        .gcc ==> arm-linux-gcc -mbig-endian
    - add mwdriver.c, dm642_mmap.h, dm642_ioctl.h, libnstblx2000_api.[ch], nstb_app.[ch] in src/engine/
        .modified FB32Driver.c ( augment flush_video_data() call)
    - make
5. installing PBP
    - download cdcfoundation-1_0_1-fcs-src.zip and pbp-1_0_01-src-linux-i686.zip from java.sun.com
    - extract the files in $WORKINGDIR/j2me
    - cd basis/build
    - cp -a ../../cdcfoundation/build/linux-sarm .
    - cp ../linux-i686/GNUMakefile .
    - edit GNUMakefile
        . CPU = sarm
    - edit defs.mk
        . CC = arm-linux-gcc -mbig-endian
        . AR = arm-linux-ar
        . RANLIB = arm-linux-ranlib
        . CVM_TARGETOBJS_OTHER += invokeNative_sarm.o (delete useless file name like _fixunsdfsi.o and atomic_sarm.o)
        . delete CC_ARCH_FLAGS      = -msoft-float
        . delete SO_CC_ARCH_FLAGS   = -msoft-float -fpic
        . LINK_ARCH_FLAGS    = -msoft-float ==> LINK_ARCH_LIBS     = -lm
        . delete SO_LINK_ARCH_FLAGS = -msoft-float -fpic
        . SO_LINK_ARCH_LIBS  = -lfloat
    - cd ../../
    - cp -a ../cdcfoundation/src/linux-sarm src/linux-sarm
    - cp ../cdcfoundation/src/linux-sarm-familiar/javavm/runtime/syncdevice.c src/linux-sarm/javavm/runtime/.
    - edit src/linux-sarm/javavm/runtime/syncdevice.c
        .<asm/ucontext.h> ==> <ucontext.h>

    - edit build/linux/defs_basis_microwindows.mk
        . CPPFLAGS += -I$WORKINGDIR/j2me/microwin/src/engine
        . AWT_LIB_LIBS = -L$WORKINGDIR/j2me/microwin/src/engine -lmwengine -L$WORKINGDIR/lib `freetype-config --libs` -lpthread
    - vi src/share/javavm/runtime/globals.c
        . #define CVM_SYSMUTEX_ENTRY(mutex, name) {&CVMglobals.##mutex, name}
            =>  #define CVM_SYSMUTEX_ENTRY(mutex, name) {&CVMglobals.mutex, name}
    - vi src/share/basis/native/awt/microwindows/MWGraphicsEnv.c
        . #include "X11Driver.h" => #include "HardwareInterface.h"
        . delete eventDriver = (Driver *) psd and eventWindow = (*env)->NewGlobalRef (env, window)
            in the Java_java_awt_MWGraphicsEnvironment_pSetWindow function
        . delete
            from mwawt_hardwareInterface->GetNextEvent(&event);
            to line 285
        . delete static Driver * eventDriver = NULL;
        . delete static jobject eventWindow = NULL;
        . add extern HardwareInterface x11HardwareInterface;
            under #include <sys/select.h>
    - edit src/portlibs/realpath/canonicalize_md.c
        . #include <limits.h> ==> #include <linux/limits.h>
    - edit src/linux-sarm/javavm/include/endianness_arch.h
        . #define CVM_ENDIANNESS CVM_LITTLE_ENDIAN ==>
            #define CVM_ENDIANNESS CVM_BIG_ENDIAN
    - cd build/linux-sarm
    - vi mymake
        make J2ME_CLASSLIB=basis                                        
        AWT_IMPLEMENTATION=microwindows                            
        JDK_HOME=$WORKINGDIR/jdk1.3.1_16                          
        CVM_GNU_TOOLS_PATH=/usr/local/bin  
        CVM_JVMDI=false                                            
        CVM_DEBUG=false                                            
        CVM_SYMBOLS=false      
        ROMIZE_LIBCLASSES=true
        SHELL=ksh -e
    - chmod u+x mymake
    - for fedora core, export LANG=en_US            
    - mymake

6. migrating cvm to target
    - copy $WORKINGDIR/lib/[libfreetype.so, libfreetype.so.6, libfreetype.so.6.3.8] to target ramdisk [/lib]
by Nuno | 2005/12/20 16:16 | BRAIN | 트랙백 | 덧글(3)
트랙백 주소 : http://nunorock.egloos.com/tb/1086752
☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]
Commented by Robert at 2007/04/06 01:27
nice
Commented by Naomi at 2007/04/06 01:47
hello
Commented by yanghui at 2007/05/24 18:45
good

:         :

:

비공개 덧글



<< 이전 페이지 다음 페이지 >>


이글루 파인더
메모장
이글루 링크
최근 등록된 덧글
<a href=http://www.you..
by Buy Generi at 07/20
<a href=http://pipes.y..
by Porn Clip at 07/16
<a href=http://pipes.y..
by Gay porn v at 07/15
<a href=http://www.goo..
by Order cial at 06/04
good
by yanghui at 05/24
hello
by Naomi at 04/06
hello
by Naomi at 04/06
hello
by Naomi at 04/06
hello
by Naomi at 04/06
hello
by Naomi at 04/06
메뉴릿


rss

skin by 이글루스