UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor mdkrajnak
Visitor
487 Views
Registered: ‎02-27-2019

Building OpenJDK for PetaLinux with aarch64 is not supported error

I'm trying to build OpenJDK 8 following the discussion here:

https://forums.xilinx.com/t5/Embedded-Linux/Is-it-possible-to-run-Java-application-in-petalinux-Xilinx/m-p/821428

I'm using PetaLinux 2018.2 and targeting a Zinq UltraScale+ SOM on an Avnet board.

When I run petalinux-build I get an error saying aarch64 is not supported:

WARNING: /home/developer/dev/avnet-bsp-2018.2/project-spec/meta-java/recipes-core/openjdk/openjre-8_102b14.bb: openjre-8 does not support aarch64 yet-:--:--

Is there an up to date process for building OpenJDK for PetaLinux? Any recommendations of where to start if I need to tailor the current build files?

Thanks.

 

 

8 Replies
Visitor mdkrajnak
Visitor
480 Views
Registered: ‎02-27-2019

Re: Building OpenJDK for PetaLinux with aarch64 is not supported error

I should probably add that I'm using the latest commit as of today (Mar 2019) for the meta-java layer on the rocko branch, fbe0b0eb.
0 Kudos
Participant eliezer
Participant
297 Views
Registered: ‎03-21-2019

Re: Building OpenJDK for PetaLinux with aarch64 is not supported error

Hey, did you ever find a solution for this? I've been following along the instructions Sandeep posted in this thread but have run into this same issue.

0 Kudos
Visitor mdkrajnak
Visitor
255 Views
Registered: ‎02-27-2019

Re: Building OpenJDK for PetaLinux with aarch64 is not supported error

No. We've opted to wait for Petalinux 2019.1 and try again later. Although 2019.1 is out, a BSP is not available for our development boards so it will be a few more weeks, possibly not until after the holidays that we'll try again.

As a backup plan we may try create a custom build of the JRE. It's reportedly not too difficult and allows us to tailor the build for our product.

Participant eliezer
Participant
245 Views
Registered: ‎03-21-2019

Re: Building OpenJDK for PetaLinux with aarch64 is not supported error

I've been trying to build the aarch64 port of OpenJDK, but it's pretty rough. The only documentation I could find on how to do it was in the README of the source code. And the code is full of errors and warnings, so I'm having trouble compiling it. I will probably try to cross-compile it with the ARM foundation model simulator, instead of the buggy small aarch64 simulator that the README recommends.

If that does end up working, I will probably not ever rebuild it, and just add the final product to my Petalinux build within the build scripts fpr Petalinux.

0 Kudos
Highlighted
Visitor mdkrajnak
Visitor
230 Views
Registered: ‎02-27-2019

Re: Building OpenJDK for PetaLinux with aarch64 is not supported error

If I can't get the Yocto layers to work I plan to:

1. Try compiling my own JRE based on the following articles:

http://august.nagro.us/small-java.html

http://zlika.github.io/presentations/compile-openjdk8/slides_en.html#/_how_to_compile_openjdk_8_for_embedded_devices

2. Or use a prebuilt JDK. I have downloaded and successfully used the Azul Systems aarch64 JRE on an Xilinix Ultrascrale+ development board from Avnet.

I would prefer to use the AdoptOpenJdk build since I can get a much smaller JRE-only version, but have not tried it yet.

All of this is unfortunately been moved to a much lower priority and probably will remain that way for some months.

 

 

Participant eliezer
Participant
227 Views
Registered: ‎03-21-2019

Re: Building OpenJDK for PetaLinux with aarch64 is not supported error

Where did you find the Azul prebuilt for Aarch64? That sounds like it might save me a lot of headache

0 Kudos
Visitor mdkrajnak
Visitor
212 Views
Registered: ‎02-27-2019

Re: Building OpenJDK for PetaLinux with aarch64 is not supported error

Azul has JDKs for 8, 11, and 13 here:

https://www.azul.com/downloads/zulu-community/?&architecture=x86-64-bit&package=jdk

In addition to the comminity downloads there's a supported version as well, although I don't know any details about what the support includes.

AdoptOpenJDK builds, which provide a smaller JRE only version are here:

https://adoptopenjdk.net/

Amazon now has an Amazon JDK (Corretto) with builds for Java 8 and 11 for aarch64, here's the link to 8:

https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/downloads-list.html

But again, these are full JDK builds, not JREs. 

Corretto has been out for a little while now, but only added aarch64 support quite recently.

Good luck!

Participant eliezer
Participant
176 Views
Registered: ‎03-21-2019

Re: Building OpenJDK for PetaLinux with aarch64 is not supported error

Thank you so much! I'll suffer through using full JDKs for now, hopefully we get better support for Aarch64 someday.

0 Kudos