Install Graal

– Set JAVA_HOME:

  • export JAVA_HOME=/home/parallella/sumatra-dev/build/linux-arm-normal-zero-release/images/j2sdk-image/

– Clone Graal Repository (we assume /home/parallella as base directory)

  • hg clone http://hg.openjdk.java.net/graal/graal

– On /home/parallella/graal/mxtool/mx.py, before line 1415, add the following:” 

  • if machine in [‘armv7l’]: return ‘armv7l’ “

– Run the following command (/home/parallella/graal):

  • $ ./mx.sh –vmbuild product –vm server build
Advertisements

Install Sumatra

We assume that the base work directory is “/home/parallella”;

– Clone the repository:

– Unset JAVA_HOME variable:

  • $ unset JAVA_HOME;

– Create a swap file with 5GB (Parallella doesn’t have enough memory to compile Sumatra and Graal)

– Get additional sources:

  • $ sh get_source.sh

– Execute configure command with zero jvm variant (Parallella main processor – armv7 – is not natively supported on default sumatra compilation) – http://openjdk.java.net/projects/zero/

  • $ bash ./configure –with-jvm-variants=zero &

– Execute make command (we are using nohup and background processing since this stage is very intensive and lasts long):

  • $ nohup make CONF=linux-arm-normal-zero-release DEBUG_BINARIES=true &

– In file “/home/parallella/sumatra-dev/build/linux-arm-normal-zero-release/jdk/btclasses/build/tools/deps/refs.allowed” add this line at the end :

  • “com.oracle.graal.compiler.hsail.CompileAndDispatch=
    com.amd.sumatra.SumatraFactory,java.util.stream.PipelineInfo,
    compact1,compact2,compact3”

– Make profiles:

  • $ make profiles CONF=linux-arm-normal-zero-release

– Make images:

  • $ make images