OpenJDK compilation (ARM native buildsystem installation)
xerxes at zafena.se
Wed Jul 23 05:16:46 PDT 2008
When you have a working system running Fedora core 8 on a ARM platform
with network support you can install all required packages to build
Icedtea6 by running yum.
yum install vi mercurial cups-devel lesstif-devel libXp-devel
libXtst-devel libXi-devel xalan-j2 xerces-j2 \
libXt-devel freetype-devel gcc gcc-c++ wget java-1.5.0-gcj-devel
alsa-lib-devel firefox-devel glib2-devel gtk2-devel \
ant libXinerama-devel libjpeg-devel libpng-devel giflib-devel patch tar
unzip make gzip rhino
When i did my last install yum complained that the eclipse-ecj package
could not be found precompiled for armv5tel but there is a quick fix for
There is one available compiled by one of the Fedora core 8 maintainers
for armv5tejl yet since the jazelle instructions is not used it can be
installed on a armv5tel system!
rpm -i --ignorearch
To improve your development experience i reccomend you to install a
openssh server on your target!
gdb and ddd are usefull to have if you are going to do some debugging!
then you can simply ssh in to the target running ssh -X
username at armdevtarget
and do remote graphical debugging with ddd by simply running ddd
./executableToBeDebugged on the target!
With everything in place you can get the icedtea6 sources by running
hg clone http://icedtea.classpath.org/hg/icedtea6
Some current issues with Icedtea6 on ARM:
If the compile complains about libffi headerfiles redeclared #ARM
install libffi from sources. this have been fixed in libffi releases
3.0.5 and above.
It will build ok but then the built java will segfault when run.
Yesterday it wave been sorted out that the segfault was optimization
related. With gcc compiler v 4.1.2 shipped with fc8 a pointer got
mangled during execution when compiled with -O3 optimization on ARM target.
You can manually change the file
openjdk-ecj/hotspot/build/linux/makefiles/gcc.make to change the
optimization to -O0 (the file exists after make have downloaded the
openjdk sources unpacked them and patched them)
Or better install a more recent gcc like 4.3.1 from source.
Im currently doing both and will see at the end of this day if all
systems are go when running a -O0 compilation.
Several Java alternatives for ARM based on free software:
The description above compiles Icedtea6 with the default zero hotspot
If you want to test some java code quickly on arm first try running your
code using gcj ! Some swing applications do work and you can test JNI
bindings and more. gcj can run java code both interperted and
precompiled to native code. When gcj is installed you can run java
classes by simply using the java "wrapper" command. Icedtea uses gcj för
bootstrapping itself aswell!
Icedtea can be configured to use CACAO as VM instead of the default zero
hotspot. Christian Thalinger have made this JIT VM compile and run with
the icedtea classes on hos ARM machines. Ask him about anything Cacao
There is a new shark hotspot you could try as well with JIT support that
can be enabled during configure of Icedtea6. This is all new cool and
Have a great day!
Xerxes Rånby skrev:
> Hi Aaron!
> Some quick notes how i installed a native arm build system to compile
> I have set up a build environment using the Fedora core 8 ARM
> I have a AT91SAM9263 based arm-devkit (armv5tejl cpu). Yet when
> running the build system on that one it is too slow since my devkit
> have only about 98mb of ram.
> Instead I have set up my build system on a emulated arm platform by
> using the qemu emulator.
> My installation went like this:
> First i downloaded a prebuild rootfilesystem for fc8:
> I uncompressed the rootfilesystem to a ext3 filesystem on a
> usbmemorystick for my real hardware and on a loopbackmounted image
> file for use in qemu.
> Then you have to compile your own linux kernel if you are going to run
> it on your own hardware, there are prebuilt kernels from the fc8
> homepage for emulated systems.
> for my real hardware i booted up my system by letting the hardware
> load the kernel over a tftp server and boot the filesystem directly
> from the usbflashdrive.
> on qemu it is just a matter of supplying the correct bootflags to the
> qemu emulator to load the kernel and instruct it to use the image file
> like a harddrive.
> i added some swapspace to both systems as well.
> ok.. now with everything in place fc8 can boot up!
> When you have fedora 8 running with networking up it is possible to
> install all the devtools you need by using the yum command.
> i will continue in the next letter with some instructions what to
> install using yum.
> comment if it is something you wish to have clarifyed.
> Have a great day!
More information about the distro-pkg-dev