Difference between revisions of "DaCapo benchmarks"

From gem5
Jump to: navigation, search
m
m
Line 1: Line 1:
 
This page describes how to get the Oracle-Sun JRE version 7 working on a disk image for use with ARM gem5. This will allow you to use the DaCapo benchmarks, which are on the [http://www.gem5.org/dist/current/arm/arm-system-2011-08.tgz Ubuntu image for gem5 ARM].
 
This page describes how to get the Oracle-Sun JRE version 7 working on a disk image for use with ARM gem5. This will allow you to use the DaCapo benchmarks, which are on the [http://www.gem5.org/dist/current/arm/arm-system-2011-08.tgz Ubuntu image for gem5 ARM].
  
* Get the [http://www.gem5.org/dist/current/arm/arm-system-2011-08.tgz ARM full-system files] and untar them.
+
== Installing Oracle-Sun Java on an Ubuntu image for ARM gem5 ==
* Get the headless version of the JRE for ARMv6/7 from [http://www.oracle.com/technetwork/java/embedded/downloads/javase/index.html Oracle]. Once you have this, untar it.
+
 
 +
Download the standard edition(SE) of Java 7 from Oracle. The SE version is the free version of Java available from Oracle. Make sure to get the headless version of the JRE for ARMv6/7 from [http://www.oracle.com/technetwork/java/embedded/downloads/javase/index.html Oracle]. You may need to register with Oracle before being allowed to download. Once you have this, untar it.
 +
 
 
* Create a mount point and mount the Ubuntu image:
 
* Create a mount point and mount the Ubuntu image:
** <code>sudo mkdir /mnt/ubuntu-gem5</code>
+
<nowiki>
** <code>sudo mount -o loop,offset=32256 arm-ubuntu-natty-headless.img /mnt/ubuntu-gem5</code>
+
sudo mkdir /mnt/ubuntu-gem5
* Make the Java install directory and copy the Java directory over:
+
sudo mount -o loop,offset=32256 arm-ubuntu-natty-headless.img /mnt/ubuntu-gem5
** <code>cd /mnt/ubuntu-gem5/usr/lib</code>
+
Setup the Java install directory and copy the Java directory over to your image:
** <code>sudo mkdir jvm</code>
+
cd /mnt/ubuntu-gem5/usr/lib
** <code>sudo cp -a /path_to_jre/jre_folder /mnt/ubuntu-gem5/usr/lib/jvm</code>
+
sudo mkdir jvm
 +
sudo cp -a /path_to_jre/jre_folder /mnt/ubuntu-gem5/usr/lib/jvm
 +
</nowiki>
 +
* Install Java:
 +
<nowiki>
 +
//setup your directory
 +
cd /mnt/ubuntu-gem5
 +
sudo bind -o /proc ./proc
 +
sudo bind -o /dev ./dev
 +
sudo bind -o /sys ./sys
 +
sudo chroot .
 +
exec ./bin/bash
 +
cd /usr/lib/jvm
 +
ln -s ./jre_dir java-7-sun
 +
 
 +
//install Java
 +
update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-7-sun/bin/java 1
 +
update-alternatives --install /usr/bin/keytool keytool /usr/lib/jvm/java-7-sun/bin/keytool 1
 +
 
 +
//setup .jinfo file
 +
echo "name=java-7-sun" > .java-7-sun.jinfo
 +
echo "alias=java-7-sun" >> .java-7-sun.jinfo
 +
echo "priority=1" >> .java-7-sun.jinfo
 +
echo "section=non-free" >> .java-7-sun.jinfo
 +
echo "jre java /usr/lib/jvm/java-7-sun/bin/java" >> .java-7-sun.jinfo
 +
echo "jre keytool /usr/lib/jvm/java-7-sun/bin/keytool" >> .java-7-sun.jinfo
 +
 
 +
//update java alternatives
 +
update-java-alternatives -s java-7-sun
 +
</nowiki>
 +
 
 +
Once you have unmounted the image, you should be able to run Java with this disk image. Boot this image on gem5 and from the terminal type <code>java -version</code> to verify the Java version on your image.

Revision as of 19:46, 2 July 2012

This page describes how to get the Oracle-Sun JRE version 7 working on a disk image for use with ARM gem5. This will allow you to use the DaCapo benchmarks, which are on the Ubuntu image for gem5 ARM.

Installing Oracle-Sun Java on an Ubuntu image for ARM gem5

Download the standard edition(SE) of Java 7 from Oracle. The SE version is the free version of Java available from Oracle. Make sure to get the headless version of the JRE for ARMv6/7 from Oracle. You may need to register with Oracle before being allowed to download. Once you have this, untar it.

  • Create a mount point and mount the Ubuntu image:
sudo mkdir /mnt/ubuntu-gem5
sudo mount -o loop,offset=32256 arm-ubuntu-natty-headless.img /mnt/ubuntu-gem5
Setup the Java install directory and copy the Java directory over to your image:
cd /mnt/ubuntu-gem5/usr/lib
sudo mkdir jvm
sudo cp -a /path_to_jre/jre_folder /mnt/ubuntu-gem5/usr/lib/jvm

  • Install Java:
//setup your directory
cd /mnt/ubuntu-gem5
sudo bind -o /proc ./proc
sudo bind -o /dev ./dev
sudo bind -o /sys ./sys
sudo chroot .
exec ./bin/bash
cd /usr/lib/jvm
ln -s ./jre_dir java-7-sun

//install Java
update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-7-sun/bin/java 1
update-alternatives --install /usr/bin/keytool keytool /usr/lib/jvm/java-7-sun/bin/keytool 1

//setup .jinfo file
echo "name=java-7-sun" > .java-7-sun.jinfo
echo "alias=java-7-sun" >> .java-7-sun.jinfo
echo "priority=1" >> .java-7-sun.jinfo
echo "section=non-free" >> .java-7-sun.jinfo
echo "jre java /usr/lib/jvm/java-7-sun/bin/java" >> .java-7-sun.jinfo
echo "jre keytool /usr/lib/jvm/java-7-sun/bin/keytool" >> .java-7-sun.jinfo

//update java alternatives
update-java-alternatives -s java-7-sun

Once you have unmounted the image, you should be able to run Java with this disk image. Boot this image on gem5 and from the terminal type java -version to verify the Java version on your image.