2005年7月アーカイブ

台風一過の青空

あおぞら

ええかんじー

J2ME CDC Personal Basis Profile

Java 2 Platform, Micro Edition CDC Personal Basis Profile (PBP)

前回の Personal Profile に続き Personal Basis Profile のメモ。
Fedora Core 2 と J2SE 1.4.2_08 にて。

Download:
  - J2ME Personal Basis Profile Version 1.0
  - Modified Microwindows Source Code

/usr/local に microwin-sun-11_jun_2002.tar.gz を展開しておく。

$ unzip j2me_pb-1_0-fcs-src-b45-linux-i686-15_jul_2002.zip
$ cd basis
$ chmod 644 src/share/javavm/runtime/globals.c
$ vi src/share/javavm/runtime/globals.c

117c117,118
< #define CVM_SYSMUTEX_ENTRY(mutex, name) {&CVMglobals.##mutex, name}
---
> #define HACK_PREPR(mutex)  mutex
> #define CVM_SYSMUTEX_ENTRY(mutex, name) {&CVMglobals.HACK_PREPR(mutex), name}

$ chmod 644 src/linux/native/java/lang/UNIXProcess_md.c
$ vi src/linux/native/java/lang/UNIXProcess_md.c

34c34,53
< extern pid_t __libc_wait(int *status);
---
>
> /* following lines Hacked by Kent Hulick based on
>  * ftp://people.redhat.com/drepper/libcwait.c
>  * fixes a broken calls to a removed glibc function:*/
> #include <errno.h>
> #include <sys/syscall.h>
> pid_t __libc_wait (int *status)
> {
>   int res;
>   asm volatile ("pushl %%ebx\n\t"
>               "movl %2, %%ebx\n\t"
>               "movl %1, %%eax\n\t"
>               "int $0x80\n\t"
>               "popl %%ebx"
>               : "=a" (res)
>               : "i" (__NR_wait4), "0" (WAIT_ANY), "c" (status), "d" (0),
>                 "S" (0));
>   return res;
> }
>

$ cd build/linux-i686
$ make J2ME_CLASSLIB=basis JDK_HOME=/usr/local/java CVM_GNU_TOOLS_PATH=/usr/bin
$ cd bin
$ ./cvm -Djava.class.path=../testclasses.zip HelloWorld
Hello world.

References:
- http://developers.sun.com/techtopics/mobility/configurations/articles/cdc/
- http://forum.java.sun.com/thread.jspa?messageID=3528322&#3528322
- http://www.moriwaki.net/wiki/index.php?%5B%5BJ2ME_CDC%5D%5D

J2ME CDC Personal Profile

Java 2 Platform, Micro Edition CDC Personal Profile

Fedora Core 2 と J2SE 1.4.2_08 にてのメモ。
make で ksh がいるとか言われたのでそれもインストール。

Download: J2ME Personal Profile Version 1.0

$ unzip j2me_pp-1_0-src-linux-i686.zip
$ cd personal
$ chmod 644 src/share/javavm/runtime/globals.c
$ vi src/share/javavm/runtime/globals.c

117c117,118
< #define CVM_SYSMUTEX_ENTRY(mutex, name) {&CVMglobals.##mutex, name}
---
> #define HACK_PREPR(mutex)  mutex
> #define CVM_SYSMUTEX_ENTRY(mutex, name) {&CVMglobals.HACK_PREPR(mutex), name}

$ chmod 644 src/linux/native/java/lang/UNIXProcess_md.c
$ vi src/linux/native/java/lang/UNIXProcess_md.c

34c34,53
< extern pid_t __libc_wait(int *status);
---
>
> /* following lines Hacked by Kent Hulick based on
>  * ftp://people.redhat.com/drepper/libcwait.c
>  * fixes a broken calls to a removed glibc function:*/
> #include <errno.h>
> #include <sys/syscall.h>
> pid_t __libc_wait (int *status)
> {
>   int res;
>   asm volatile ("pushl %%ebx\n\t"
>               "movl %2, %%ebx\n\t"
>               "movl %1, %%eax\n\t"
>               "int $0x80\n\t"
>               "popl %%ebx"
>               : "=a" (res)
>               : "i" (__NR_wait4), "0" (WAIT_ANY), "c" (status), "d" (0),
>                 "S" (0));
>   return res;
> }
>

$ cd build/linux-i686
$ make J2ME_CLASSLIB=personal JDK_HOME=/usr/local/java CVM_GNU_TOOLS_PATH=/usr/bin
$ cd bin
$ ./cvm -Djava.class.path=../testclasses.zip HelloWorld
Hello world.

References:
- http://developers.sun.com/techtopics/mobility/configurations/articles/cdc/
- http://forum.java.sun.com/thread.jspa?messageID=3528322&#3528322
- http://www.moriwaki.net/wiki/index.php?%5B%5BJ2ME_CDC%5D%5D

引っ越し先のそら

あおぞら

フルーチェ作るときに、欲張ってついつい牛乳を入れすぎ、
トロトロになって毎回後悔しながら食べる今日この頃、
引っ越しました。

カーテンまだ買ってないので、うちの中、外から丸見え…

前のアーカイブ2005年6月

次のアーカイブ2005年8月

Flickr

    www.flickr.com
    This is a Flickr badge showing public photos and videos from SORA adachi. Make your own badge here.

    2010/02

    Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4 5 6
    7 8 9 10 11 12 13
    14 15 16 17 18 19 20
    21 22 23 24 25 26 27
    28            
    Powered by Movable Type 4.22-ja