OpenJDK ARMv7 binaries for Linux

Edward Nevill edward.nevill at gmail.com
Mon Mar 19 14:43:32 UTC 2018


Hi Chris,

OpenJDK is reasonably good at cross compiling. You need to specify

--openjdk-target=<target>

where <target> is something like arm-unknown-linux-gnu and also

--with-sysroot=<sysroot>

where <sysroot> is the location of the arm system root (presumeably you would get this from the rest of the yocto build)

You will also need to specify the location of the various tools. EG

CC=...
LD=...
AR=...

etc, etc

I wrote some notes about building OpenJDK including cross compilation a long time ago at

http://openjdk.linaro.org/build.htm

and there are some cross compilation scripts at

http://hg.openjdk.java.net/aarch64-port/jdk8/file/9a781f9c1338/cross_configure

and

http://hg.openjdk.java.net/aarch64-port/jdk8/file/9a781f9c1338/cross_compile

All the best,
Ed.

On Mon, 2018-03-19 at 11:39 +0000, Grey, Chris                UTC CCS
wrote:
> Thank you for each of your responses. 
> 
> The Linux distro we are using is a Yocto-based custom tarball using
> only the recipes that we needed in an effort to keep the entire
> tarball of the file system as small as possible. The bitbake
> application does all the cross-compiling for us. Now that we are
> expanding our embedded world to include Java, we now need a JVM, but
> would prefer to use Java 9, again to keep the filesystem footprint of
> the JVM as small as possible.
> 
> One of your responses mentioned the JVM possibly being included, in
> compiled form, in other Linux distros. Is there any chance there's a
> bitbake recipe that we can include to simply get bitbake to compile
> it directly into our distro? If so, where would I find info on that.
> 
> If not, are there any details pertinent to building the JVM from
> source that I should be aware of? If this were a traditional Linux-
> targetted source, I'd expect to run a configure script, which would
> generate a makefile that, then would complete the build. However this
> wouldn't be a traditional build. It's a cross-compile build where the
> make would need to know NOT to use the PC's native Linux GNU compiler
> and instead use the GNU ARM cross compiler. Thus I expect some manual
> configuration would be required along with likely numerous details
> about the target. Is there a website or a document that details
> exactly how this is done? Or am I simply imagining it being worse
> than it really is?
> 
> The other option is I do have a Beaglebone Black that I could attempt
> to natively compile the code on. I expect that would be quite slow,
> but if that route would actually be the simplest option, I'm open to
> trying that as well.
> 
> Thoughts?
> 
> 
> Chris Grey
> ALC/Firmware
> 
> ________________________________________
> From: aarch32-port-dev <aarch32-port-dev-bounces at openjdk.java.net> on
> behalf of Anton Kozlov <akozlov at azul.com>
> Sent: Monday, March 19, 2018 6:37 AM
> To: Grey, Chris                UTC CCS; aarch32-port-dev at openjdk.java
> .net
> Subject: [External] Re: OpenJDK ARMv7 binaries for Linux
> 
> Hi, Chris,
> 
> On 16.03.2018 21:57, Grey, Chris                UTC CCS wrote:
> > We are wanting to use the Open JDK Java 9 ... However if the Open
> > JDK 8 binaries for ARM are also available, we'd like to get them
> > too.
> 
> You can get Azul's latest OpenJDK 8 build from
> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.azul.com_dow
> nloads_zulu-
> 2Dembedded&d=DwICaQ&c=ilBQI1lupc9Y65XwNblLtw&r=pnpLNf5xnZMm_WTY63muGb
> H8kjDjFt2v-o_OZJmTHRM&m=rVH-XpAklTVECaLWCBG2QsxhSnKG-MerSziiBVRwd-
> M&s=YiRSImZVLLFiFrEMeVAtglud7e8djtyIXBInMtNSBFE&e=
> 
> "ARM v8/v7/v6 Hard Float ABI" variant should match your needs.
> 
> OpenJDK 9 binaries will show up there in the future, stay tuned :-)
> 
> Thanks,
> Anton


More information about the aarch32-port-dev mailing list