From 30933c60156c67a9624fefae2be6504300ce71bb Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 30 Jan 2015 07:04:39 +0100 Subject: Bug 1122: Add AArch64 support (Android, GNU/Linux and in general) - Add AArch64 detection via - Elf Parser - Android properties - Java properties - Android: Validate CPUType.Family _and_ ABIType - MachineDescription - Remove redundant Type ID and its field - Reuse X86_64_UNIX for AArch64 (static config) New ARCH 'aarch64' for ant: armv8a aarch64 New CPUType.ARM64 (ARM): java: os.arch aarch64 arm64 New CPUType.ARMv8_A (ARM): java: os.arch armv8-a arm64-v8a New ABIType: EABI_AARCH64 --- make/gluegen-cpptasks-base.xml | 69 +++++++++++- make/lib/gluegen-cpptasks-android-aarch64.xml | 123 +++++++++++++++++++++ make/scripts/adb-install-all-arm64-v8a.sh | 2 + make/scripts/adb-reinstall-all-arm64-v8a.sh | 5 + .../make.gluegen.all.android-aarch64-cross.sh | 62 +++++++++++ 5 files changed, 258 insertions(+), 3 deletions(-) create mode 100644 make/lib/gluegen-cpptasks-android-aarch64.xml create mode 100755 make/scripts/adb-install-all-arm64-v8a.sh create mode 100755 make/scripts/adb-reinstall-all-arm64-v8a.sh create mode 100755 make/scripts/make.gluegen.all.android-aarch64-cross.sh (limited to 'make') diff --git a/make/gluegen-cpptasks-base.xml b/make/gluegen-cpptasks-base.xml index 222cad7..e896fc0 100755 --- a/make/gluegen-cpptasks-base.xml +++ b/make/gluegen-cpptasks-base.xml @@ -21,7 +21,7 @@ - isI386 - isAMD64 - is64Bit - - isAbiEabiGnuArmel (implicit if isAndroidARMv6 or isLinuxARMv6) + - isAbiEabiGnuArmel (implicit if isAndroidARMv6 or isAndroidARM64) - isAbiEabiGnuArmhf (shall be declared explicit) - isUnix - isX11 @@ -32,6 +32,7 @@ - isIA64 - isAndroid - isAndroidARMv6 + - isAndroidARM64 - isAndroidARMv6Armel (set in gluegen.cpptasks.detected.os.2) - isAndroidARMv6Armhf (set in gluegen.cpptasks.detected.os.2) - isLinux @@ -39,6 +40,7 @@ - isLinuxIA64 - isLinuxX86 - isLinuxARMv6 + - isLinuxARM64 - isLinuxARMv6Armel (set in gluegen.cpptasks.detected.os.2) - isLinuxARMv6Armhf (set in gluegen.cpptasks.detected.os.2) - isLinuxAlpha @@ -125,6 +127,7 @@ - compiler.cfg.linux.x86 - compiler.cfg.linux.amd64 - compiler.cfg.linux.armv6 + - compiler.cfg.linux.aarch64 - compiler.cfg.linux.alpha - compiler.cfg.linux.hppa - compiler.cfg.linux.mips @@ -146,6 +149,7 @@ - linker.cfg.linux.x86 - linker.cfg.linux.amd64 - linker.cfg.linux.armv6 + - linker.cfg.linux.aarch64 - linker.cfg.linux.alpha - linker.cfg.linux.hppa - linker.cfg.linux.mips @@ -255,6 +259,8 @@ + + @@ -324,6 +330,15 @@ + + + + + + + + + @@ -334,12 +349,23 @@ + + + + + + + + + + + @@ -559,6 +585,7 @@ + @@ -566,6 +593,7 @@ + @@ -629,6 +657,10 @@ + + + + @@ -669,7 +701,11 @@ - + + + + + @@ -977,6 +1013,19 @@ + + + + + + + + + + + + + @@ -1188,6 +1237,13 @@ + + + + + + + @@ -1390,6 +1446,13 @@ + + + + + + + @@ -1446,7 +1509,7 @@ - + diff --git a/make/lib/gluegen-cpptasks-android-aarch64.xml b/make/lib/gluegen-cpptasks-android-aarch64.xml new file mode 100644 index 0000000..7096ecc --- /dev/null +++ b/make/lib/gluegen-cpptasks-android-aarch64.xml @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/make/scripts/adb-install-all-arm64-v8a.sh b/make/scripts/adb-install-all-arm64-v8a.sh new file mode 100755 index 0000000..46bf24b --- /dev/null +++ b/make/scripts/adb-install-all-arm64-v8a.sh @@ -0,0 +1,2 @@ +adb $* install ../build-android-aarch64/jogamp-android-launcher.apk +adb $* install ../build-android-aarch64/gluegen-rt-android-arm64-v8a.apk diff --git a/make/scripts/adb-reinstall-all-arm64-v8a.sh b/make/scripts/adb-reinstall-all-arm64-v8a.sh new file mode 100755 index 0000000..2627cc8 --- /dev/null +++ b/make/scripts/adb-reinstall-all-arm64-v8a.sh @@ -0,0 +1,5 @@ +sdir=`dirname $0` + +$sdir/adb-uninstall-all.sh $* +$sdir/adb-install-all-arm64-v8a.sh $* + diff --git a/make/scripts/make.gluegen.all.android-aarch64-cross.sh b/make/scripts/make.gluegen.all.android-aarch64-cross.sh new file mode 100755 index 0000000..6d46779 --- /dev/null +++ b/make/scripts/make.gluegen.all.android-aarch64-cross.sh @@ -0,0 +1,62 @@ +#! /bin/sh + +SDIR=`dirname $0` + +if [ -e $SDIR/setenv-build-jogl-x86_64.sh ] ; then + . $SDIR/setenv-build-jogl-x86_64.sh +fi + +if [ -e $SDIR/setenv-android-tools.sh ] ; then + . $SDIR/setenv-android-tools.sh +fi + +export NODE_LABEL=. + +export HOST_UID=jogamp +# jogamp02 - 10.1.0.122 +export HOST_IP=10.1.0.122 +export HOST_RSYNC_ROOT=PROJECTS/JOGL + +export TARGET_UID=jogamp +export TARGET_IP=panda02 +#export TARGET_IP=jautab03 +#export TARGET_IP=jauphone04 +export TARGET_ADB_PORT=5555 +# needs executable bit (probably su) +export TARGET_ROOT=/data/projects +export TARGET_ANT_HOME=/usr/share/ant + +export ANDROID_VERSION=21 +export SOURCE_LEVEL=1.6 +export TARGET_LEVEL=1.6 +export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar + +#export GCC_VERSION=4.4.3 +export GCC_VERSION=4.9 +HOST_ARCH=linux-x86_64 +export TARGET_TRIPLE=aarch64-linux-android + +export NDK_TOOLCHAIN_ROOT=$NDK_ROOT/toolchains/${TARGET_TRIPLE}-${GCC_VERSION}/prebuilt/${HOST_ARCH} +export TARGET_PLATFORM_ROOT=${NDK_ROOT}/platforms/android-${ANDROID_VERSION}/arch-arm64 + +# Need to add toolchain bins to the PATH. +# May need to create symbolic links within $NDK_TOOLCHAIN_ROOT/$TARGET_TRIPLE/bin +# cd $NDK_TOOLCHAIN_ROOT/$TARGET_TRIPLE/bin +# ln -s ../../bin/aarch64-linux-android-gcc gcc +export PATH="$NDK_TOOLCHAIN_ROOT/$TARGET_TRIPLE/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/build-tools/$ANDROID_BUILD_TOOLS_VERSION:$PATH" + +export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-android-aarch64.xml" + +#export JUNIT_DISABLED="true" +#export JUNIT_RUN_ARG0="-Dnewt.test.Screen.disableScreenMode" + +echo PATH $PATH 2>&1 | tee make.gluegen.all.android-aarch64-cross.log +echo gcc `which gcc` 2>&1 | tee -a make.gluegen.all.android-aarch64-cross.log + +#export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org" +export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet" + +#BUILD_ARCHIVE=true \ +ant \ + -Drootrel.build=build-android-aarch64 \ + $* 2>&1 | tee -a make.gluegen.all.android-aarch64-cross.log -- cgit v1.2.3