CrossCompileFaq

From IcedTea

Jump to: navigation, search

Contents

Instructions?

Cross compilation is currently not supported out of the box with the Icedtea buildsystem although the Jalimo project have invented a way to cross compile Icedtea using the Openembedded infrastructure to build icedtea.

Why Cross Compile?

Icedtea requires the build to run on native hardware thus the build can take a long long time when run under an emulator or small embedded processor. Building the ARM port of icedtea takes about 4h on native and up to a week on emulated hardware. By cross compiling this build can be completed within an afternoon, a decent quadcore i386 machine can cross compile openjdk for ARM using the instructions below in about 180min!

By using Openembedded it might also be possible to cross compile OpenJDK for linux running on uClibc and MMU-less systems.

Please report if you manage to cross compile openjdk, we would be delighted to hear from your awesome porting efforts.

How do I make an automated crosscompile using Openembedded?

  • CrossCompileOEClassicTutorial - Up until late 2011 most openjdk OE cross compilation work took place inside the large monolitic OE git dev tree.

How do I make a manual crosscompile setup?

You are on your own, below you will find a list of pointers that can be used to bring full cross-compile support into the icedtea and openjdk build infrastructure.

You can in theory do a manual crosscompile as well without using openembedded, unfortunally it's not a walk in the park, old instructions how to manually setup the cross compile environment have been put on the Jalimo wiki, see: http://wiki.evolvis.org/jalimo/index.php/CrossCompilingOpenJDK

Some of the required patches for icedtea are in the openembedded tree:

 http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/openjdk/openjdk-6-6b18-1.8?h=org.openembedded.dev
 and
 http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/openjdk/openjdk-6-6b18-1.8.5?h=org.openembedded.dev

During the spring of 2010 Thierry Reding sent in a patch to the IcedTea mailing list to add rudimentary support for cross-compiling IcedTea 7 based on the openembedded patches. This work has not yet been merged into Icedtea or OpenJDK upstream. http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-June/009297.html

Robert Schuster made a presentation in 2010 to explain the main tricks needed to cross compile openjdk. http://elinux.org/images/4/40/Cross-compiling_OpenJDK.pdf

Robert has also started on a Linaro blueprint to add cross compilation support to OpenJDK. https://blueprints.launchpad.net/linaro/+spec/java-crosscompiling-openjdk

Got any proof of a working Cross Compilation?

http://rschuster.blogs.evolvis.org/2008/12/21/serving-cross-compiled-openjdk-with-icedtea/ - nice screenshots by Robert Schuster of crosscompiled openjdk running various applications on embedded hardware and all the technical guts behind the cross compile effort. http://rschuster.blogs.evolvis.org/2008/12/23/comments-on-latest-post-on-openjdk/

Personal tools