From 5850e5b49ebbf39136724f37ee064eeeeb1fc6e8 Mon Sep 17 00:00:00 2001 From: Andrew McDermott Date: Tue, 3 Sep 2013 17:05:40 +0100 Subject: initial import Signed-off-by: Andrew McDermott --- .gitmodules | 3 ++ Makefile | 82 ++++++++++++++++++++++++++++++++++ jtreg-bin | 1 + pre-build-root-install-dependencies.sh | 12 +++++ 4 files changed, 98 insertions(+) create mode 100644 .gitmodules create mode 100644 Makefile create mode 160000 jtreg-bin create mode 100755 pre-build-root-install-dependencies.sh diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..77ebd58 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "jtreg-bin"] + path = jtreg-bin + url = git://git.linaro.org/leg/openjdk/jtreg-bin diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d2ac0b4 --- /dev/null +++ b/Makefile @@ -0,0 +1,82 @@ +# Copyright (C) 2013, Linaro Limited. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Author: Andrew McDermott +# + +SHELL = /bin/bash + +SNAPSHOT_NAME = openjdk8-aarch64-snapshot +SNAPSHOT_URL = http://snapshots.linaro.org/openembedded/sources +SNAPSHOT_TAR_ARCHIVE = $(SNAPSHOT_NAME).tar.bz2 +SNAPSHOT_CLASSES_ARCHIVE = $(SNAPSHOT_NAME)-prebuilt-classes.tar.bz2 +CLASSES = $(shell shopt -s globstar; echo $(SNAPSHOT_NAME)/**/JTwork/classes) + +PRODUCT_HOME=$(PWD)/$(SNAPSHOT_NAME)/build/linux-x86_64-normal-server-release/images/j2sdk-image +export PRODUCT_HOME + +JT_HOME=$(PWD)/jtreg-bin/jtreg +export JT_HOME + +.PHONY: download explode configure build + +all: + @echo "be more explicit" + +$(SNAPSHOT_TAR_ARCHIVE): + wget --quiet $(SNAPSHOT_URL)/$(SNAPSHOT_TAR_ARCHIVE) + +download : $(SNAPSHOT_TAR_ARCHIVE) + +explode: + tar axf $(SNAPSHOT_TAR_ARCHIVE) + +configure: + (cd $(SNAPSHOT_NAME); sh configure) + +build: + make -C $(SNAPSHOT_NAME) images + +clean: + make -C $(SNAPSHOT_NAME) clean + +mrproper: + $(RM) -r $(SNAPSHOT_NAME) $(SNAPSHOT_TAR_ARCHIVE) $(SNAPSHOT_CLASSES_ARCHIVE) + +test: jdk-tests hotspot-tests + +jdk-tests: + -make -C $(SNAPSHOT_NAME)/jdk/test jdk_default + +hotspot-tests: + -make -C $(SNAPSHOT_NAME)/hotspot/test JT_HOME=$(JT_HOME) TESTDIRS="compiler runtime gc sanity serviceability testlibrary" + +.PHONY: archive $(SNAPSHOT_CLASSES_ARCHIVE) + +archive: + $(RM) $(SNAPSHOT_CLASSES_ARCHIVE) + $(MAKE) $(SNAPSHOT_CLASSES_ARCHIVE) + +$(SNAPSHOT_CLASSES_ARCHIVE): + @echo "Adding class files to $@ from" $(CLASSES) + @(for i in $(CLASSES); do \ + tar -uf $@ $$i --transform='s!.*JTwork!$(SNAPSHOT_NAME)/JTwork!' --show-transformed-names; \ + done) + @(echo `tar atf $@ | wc -l` "classes archived") +# +# Convenience rule for Jenkins job. +# +it-so: download explode configure build test archive diff --git a/jtreg-bin b/jtreg-bin new file mode 160000 index 0000000..a010ed6 --- /dev/null +++ b/jtreg-bin @@ -0,0 +1 @@ +Subproject commit a010ed674a26f03c7edf82a7d1d47a5c6184084d diff --git a/pre-build-root-install-dependencies.sh b/pre-build-root-install-dependencies.sh new file mode 100755 index 0000000..8adf675 --- /dev/null +++ b/pre-build-root-install-dependencies.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +apt-get -y --force-yes build-dep openjdk-7-jdk + +apt-get -y --force-yes install \ + build-essential \ + openjdk-7-jdk \ + libX11-dev libxext-dev \ + libxrender-dev libxtst-dev libcups2-dev \ + libfreetype6-dev libasound2-dev xvfb -- cgit v1.2.3