Bug 1295 - Add linux-aarch64 GNU/Linux AArch64 support
Summary: Add linux-aarch64 GNU/Linux AArch64 support
Status: IN_PROGRESS
Alias: None
Product: General
Classification: JogAmp
Component: builds (show other bugs)
Version: 2.4.0
Hardware: embedded_arm linux
: P4 normal
Assignee: Xerxes Rånby
URL:
Depends on: 1273
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-29 11:06 CET by Xerxes Rånby
Modified: 2016-12-12 11:30 CET (History)
1 user (show)

See Also:
Type: FEATURE
SCM Refs:
Workaround: ---


Attachments
aarch64-libc-2.18-versioned-symbols.log (9.20 KB, text/plain)
2016-12-12 09:11 CET, Xerxes Rånby
Details
aarch64-freedreno-GLWindow.log (47.08 KB, text/x-log)
2016-12-12 11:30 CET, Xerxes Rånby
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xerxes Rånby 2016-02-29 11:06:41 CET
General purpose ARM 64bit GNU/Linux systems are now cheaply available with various GPU configurations.
https://www.raspberrypi.org/blog/raspberry-pi-3-on-sale/
https://www.pine64.com/

JogAmp buildfarm need to build linux-aarch64 GNU/Linux AArch64 natives into gluegen and all modules in order to support these new boards and system configurations.
Comment 1 Xerxes Rånby 2016-05-27 09:17:28 CEST
The following branch adds GNU/Linux aarch64 support to Gluegen
Branch to merge:
https://github.com/xranby/gluegen/tree/aarch64

https://github.com/xranby/gluegen/commit/c9145b93b6d47fa09789460c21e4d5d764611e41

make/build.xml: New target declare.linux.aarch64
                Update target declare.linux to depend on declare.linux.aarch64
make/gluegen-cpp-tasks-base.xml: Fix aarch64 jre/lib/arm -> jre/lib/aarch64
make/lib/gluegen-cpptasks-linux-aarch64.xml: Added
make/scripts/make.gluegen.all.linux-aarch64.sh: Added

Tested on DragonBoard 410c running Linaro Debian
Platform: LINUX / Linux 4.4.8-linaro-lt-qcom (4.4.8), aarch64 (ARM64, EABI_AARCH64), 4 cores, littleEndian true
MachineDataInfo: runtimeValidated true, 32Bit false, primitive size / alignment:
  int8    1 / 1, int16   2 / 2
  int     4 / 4, long    8 / 8
  int32   4 / 4, int64   8 / 8
  float   4 / 4, double  8 / 8, ldouble 16 / 16
  pointer 8 / 8, page    4096
Platform: Java Version: 1.8.0_91 (1.8.0u91), VM: OpenJDK 64-Bit Server VM, Runtime: OpenJDK Runtime Environment
Platform: Java Vendor: Oracle Corporation, http://java.oracle.com/, JavaSE: true, Java6: true, AWT enabled: true

Signed-off-by: Xerxes Ranby <xerxes@gudinna.com>
Comment 2 Xerxes Rånby 2016-12-12 09:04:45 CET
Updated branch to merge:
https://github.com/xranby/gluegen/commits/aarch64

https://github.com/xranby/gluegen/commit/0ba8e7f4173c04eef40ae95baca07a8c1cedfa40

 Add GitLab CI .gitlab-ci.yml
 build and test each commit on aarch64 and x86-64 linux systems.

https://github.com/xranby/gluegen/commit/00ea29eb954a29aaf2fd2adffd6677e580ab2850

 Bug 1295: Add linux-aarch64 GNU/Linux AArch64 support

make/build.xml: New target declare.linux.aarch64
                Update target declare.linux to depend on declare.linux.aarch64
make/gluegen-cpp-tasks-base.xml: Fix aarch64 jre/lib/arm -> jre/lib/aarch64
make/lib/gluegen-cpptasks-linux-aarch64.xml: Added
make/scripts/make.gluegen.all.linux-aarch64.sh: Added

Tested on DragonBoard 410c running Linaro Debian 8

https://github.com/xranby/gluegen/commit/e7db4d356f264b45d178839798b7d3d552019fc1

 Bug 1295: Add linux-aarch64 GNU/Linux AArch64 crosscompile support

make/lib/gluegen-cpptasks-linux-aarch64.xml:
  Add missing -DisLinux=true required when crosscompiling
  Remove -marm -mfloat-abi=hard flags unrecognisable by aarch64 crosscompile toolchain

make/lib/toolchain/aarch64-linux-gnueabi/bin/*:
  Symlink to /usr/local/x-tools/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-*

make/scripts/make.gluegen.all.linux-aarch64-cross.sh:
  New crosscompile script

make/stub_includes/platform/glibc-compat-symbols.h:
  glibc 2.17 is the first glibc version that support aarch64
  however memcpy is not versioned for aarch64
  Disable versioning for linux glibc/aarch64
Comment 3 Xerxes Rånby 2016-12-12 09:11:18 CET
Created attachment 794 [details]
aarch64-libc-2.18-versioned-symbols.log

Attached logfile from aarch64 crosstools-ng crosscompile toolchain with versioned symbols support indicating that memcpy is not versioned despite that versioned symbols down to 2.17 is included. This is the reasion to disable versioned symbols for memcpy on linux glibc aarch64.
Comment 4 Xerxes Rånby 2016-12-12 09:30:01 CET
The following branch adds GNU/Linux aarch64 crosscompile support to joal
Branch to merge:
https://github.com/xranby/joal/tree/aarch64

https://github.com/xranby/joal/commit/0ce27b5d184ea23557a52443d239d405e34288f5

 Bug 1295: Add linux-aarch64 GNU/Linux AArch64 support

make/scripts/make.joal.all.linux-aarch64-cross.sh:
  New crosscompile script
Comment 5 Xerxes Rånby 2016-12-12 10:09:36 CET
The following branch adds GNU/Linux aarch64 crosscompile support to jogl
Branch to merge:
https://github.com/xranby/jogl/tree/aarch64

https://github.com/xranby/jogl/commit/d21c48849eb962c3c5c863587aeffe2db33a236f

 Bug 1295: Add linux-aarch64 GNU/Linux AArch64 support

scripts/make.jogl.all.linux-aarch64-cross.sh:
  New crosscompile script

build-common.xml:
  Add SWT compile hack for isLinuxARM64
Comment 6 Xerxes Rånby 2016-12-12 10:15:10 CET
The following branch adds GNU/Linux aarch64 crosscompile support to jocl
Branch to merge:
https://github.com/xranby/jocl/tree/aarch64

https://github.com/xranby/jocl/commit/bc915ab43007b827f021b18e84a5d7645f7f4185

 Bug 1295: Add linux-aarch64 GNU/Linux AArch64 support

scripts/make.jocl.all.linux-aarch64-cross.sh:
  New crosscompile script
Comment 7 Xerxes Rånby 2016-12-12 10:37:35 CET
The following branch adds GNU/Linux aarch64 crosscompile support to jogamp-scriptin
Branch to merge:
https://github.com/xranby/jogamp-scripting/tree/aarch64

https://github.com/xranby/jogamp-scripting/commit/02ddd58172f293597442891c9745b9677cc8ab3f

 Bug 1295: Add linux-aarch64 GNU/Linux AArch64 support

jenkins-server-slave-setup/nodes/crosstools/README.txt
  Instructions how to build crosstools-ng for aarch64 from git

jenkins-server-slave-setup/nodes/crosstools/aarch64-unknown-linux-gnueabi/.config:
  aarch64 config
Comment 8 Xerxes Rånby 2016-12-12 11:30:26 CET
Created attachment 795 [details]
aarch64-freedreno-GLWindow.log

Here is the output from GLWindow running using the crosscompiled jogamp for aarch64 running on real hardware using hardware acceleration.
http://labb.zafena.se/jogamp/aarch64/

X11GraphicsDevice[type .x11, connection :0.0]: 
	Natives
		GL4bc 	false
		GL4 	false
		GLES3 	true [3.0 (ES profile, arb, compat[ES2, ES3], FBO, hardware)]
		GL3bc 	false
		GL3 	true [3.1 (Core profile, arb, compat[ES2, ES3], FBO, hardware)]
		GL2 	true [3.0 (Compat profile, arb, compat[ES2], FBO, hardware)]
		GLES2 	true [3.0 (ES profile, arb, compat[ES2, ES3], FBO, hardware)]
		GLES1 	true [1.1 (ES profile, arb, compat[FP32], hardware)]
		Count	5 / 8
	Common
		GL4ES3 	true
		GL2GL3 	true
		GL2ES2 	true
		GL2ES1 	true
	Mappings
		GLES1 	GLProfile[GLES1/GLES1.hw]
		GLES2 	GLProfile[GLES2/GLES3.hw]
		GL2ES1 	GLProfile[GL2ES1/GL2.hw]
		GL4ES3 	GLProfile[GL4ES3/GLES3.hw]
		GL2ES2 	GLProfile[GL2ES2/GL3.hw]
		GL2 	GLProfile[GL2/GL2.hw]
		GLES3 	GLProfile[GLES3/GLES3.hw]
		GL3 	GLProfile[GL3/GL3.hw]
		GL2GL3 	GLProfile[GL2GL3/GL3.hw]
		default GLProfile[GL2/GL2.hw]
		Count	9 / 12

Swap Interval  1
GL Profile     GLProfile[GL2/GL2.hw]
GL Version     3.0 (Compat profile, arb, compat[ES2], FBO, hardware) - 3.0 Mesa 12.0.4 [GL 3.0.0, vendor 12.0.4 (Mesa 12.0.4)]
Quirks         [NoDoubleBufferedPBuffer, NoSetSwapIntervalPostRetarget]
Impl. class    jogamp.opengl.gl4.GL4bcImpl
GL_VENDOR      freedreno
GL_RENDERER    Gallium 0.4 on FD307
GL_VERSION     3.0 Mesa 12.0.4
GLSL           true, has-compiler-func: true, version: 1.30 / 1.30.0
GL FBO: basic true, full true
GL_EXTENSIONS  193
GLX_EXTENSIONS 30