How to install CACAO on the Nokia 770 Internet Tablet
This Howto is currently work in progress!
By package management
Follow the guidelines at Jalimo. The packages are designed for the IT OS 2007 Hacker Edition for the N770s and the regular IT OS 2007 for the N800s. Please note that Maemo uses glibc-linuxthread (= no light-weight threads but one process per thread) and some kind of backported EABI support.
Binary Packages
Since the ARM Port of CACAO is currently available as closed-source only, you have to use the binary packages available here:
http://www.complang.tuwien.ac.at/cacaojvm/download/testing/cacao_0.96-n770-1_arm.deb
http://www.complang.tuwien.ac.at/cacaojvm/download/testing/classpath_0.91-n770-2_arm.deb
The GNU Classpath is a seperated GNU project and can be found here. The package of the Classpath available above was built to be used with CACAO, but can be used with any other JVM as well.
- This version of the Classpath was built without a GTK-Peer, so AWT or SWING based applications will not run with this package.
- The CACAO Package 0.96-n770-1 was built from: SVN-Tag for version 0.96 of CACAO; SVN-Head (Revision 245) of the ARM codegen.
Installation Instructions
Install the GNU Classpath. This release has been tested with version 0.91 of the GNU Classpath, so the best choice is to install the Package available above. It will not work with earlier versions, but feel free to update to newer ones (>=0.91).
- Install CACAO for the Nokia 770.
Using CACAO on the Nokia 770
The packages above will install CACAO and Classpath into /var/lib/install/usr, so make sure you have set your search path accordingly. Per default CACAO will find all native and bytecode libraries on it's own, so you better do not move them arround afterwards. To execute a program with cacao use one of the following commands:
$ cacao [class-name] or $ cacao -jar [jar-file]
Here are some basic test classes:
http://stud4.tuwien.ac.at/~e0306126/n770/tests/hello.class
http://stud4.tuwien.ac.at/~e0306126/n770/tests/prop2.class
http://stud4.tuwien.ac.at/~e0306126/n770/tests/jctest.class
http://stud4.tuwien.ac.at/~e0306126/n770/tests/fp.class
Binary Sizes
The CACAO binaries needed for execution (including the virtual machine specific bytecode files) only take up 622 kilobytes on the Nokia 770. But since CACAO depends on the GNU Classpath the overall size of both packages takes up about 9 megabytes.
Cacao Bytecode Size: 7.5K /var/lib/install/usr/share/cacao/vm.zip 7.5K total Cacao Native Size: 9.5K /var/lib/install/usr/bin/cacao 604.0K /var/lib/install/usr/lib/libjvm-0.96.so 1.0K /var/lib/install/usr/lib/libjvm.la 0 /var/lib/install/usr/lib/libjvm.so 614.5K total Classpath Bytecode Size: 3.0K /var/lib/install/usr/share/classpath/README 144.5K /var/lib/install/usr/share/classpath/tools.zip 7.9M /var/lib/install/usr/share/classpath/glibj.zip 8.1M total Classpath Native Size: 1.0k /var/lib/install/usr/lib/classpath/libjavautil.la 512 /var/lib/install/usr/lib/classpath/libjavautil.so 14.5k /var/lib/install/usr/lib/classpath/libjavaio.so.0.0.0 512 /var/lib/install/usr/lib/classpath/libjavaio.so.0 1.0k /var/lib/install/usr/lib/classpath/libjavaio.la 512 /var/lib/install/usr/lib/classpath/libjavaio.so 512 /var/lib/install/usr/lib/classpath/libjavanio.so.0 55.5k /var/lib/install/usr/lib/classpath/libjavalang.so.0.0.0 1.0k /var/lib/install/usr/lib/classpath/libjavalangreflect.la 512 /var/lib/install/usr/lib/classpath/libjavalangreflect.so 512 /var/lib/install/usr/lib/classpath/libjavalangreflect.so.0 1.0k /var/lib/install/usr/lib/classpath/libjavalang.la 512 /var/lib/install/usr/lib/classpath/libjavalang.so 512 /var/lib/install/usr/lib/classpath/libjavalang.so.0 25.5k /var/lib/install/usr/lib/classpath/libjavanet.so.0.0.0 4.5k /var/lib/install/usr/lib/classpath/libjavautil.so.0.0.0 3.5k /var/lib/install/usr/lib/classpath/libjavalangreflect.so.0.0.0 20.5k /var/lib/install/usr/lib/classpath/libjavanio.so.0.0.0 512 /var/lib/install/usr/lib/classpath/libjavautil.so.0 1.0k /var/lib/install/usr/lib/classpath/libjavanet.la 512 /var/lib/install/usr/lib/classpath/libjavanet.so 1.0k /var/lib/install/usr/lib/classpath/libjavanio.la 512 /var/lib/install/usr/lib/classpath/libjavanio.so 512 /var/lib/install/usr/lib/classpath/libjavanet.so.0 136.0k total Header Size: 61K /var/lib/install/usr/include/jni.h 2.5K /var/lib/install/usr/include/jawt_md.h 2.0K /var/lib/install/usr/include/jni_md.h 3.5K /var/lib/install/usr/include/jawt.h 69.0K total
When compiling with --disable-debug --disable-diassembler --disable-libjvm and GCC version 3.4.2 with...
-O2:
text data bss dec hex filename 450996 8076 50780 509852 7c79c src/cacao/cacao
-Os:
text data bss dec hex filename 430956 8080 50780 489816 77958 src/cacao/cacao
Frequently Asked Questions
Q: Are those packages for the Application Installer 2005?
A: Yes, they are for Maemo 1.1 also known as "Internet Tablet OS 2005".
Current Status
TODO
Things to remember for building
- remove cacheflush patch
- link with -ldl (ltdl needs it)
- disable disassembler (bfd and opcodes not usable)
- copy header files from somewhere else (cacaoh will not work in scratchbox)
- build classpath without gtk-peer (gtk version of scratchbox too old)
Contribute
Feel free to join the CacaoChat or the CacaoMailingList. We would really like to hear about your experiences using CACAO.