This port is arm64 with a 32-bit ABI instead of a 64bit ABI. It is exactly equivalent to x32 on x86. The instruction set is 64-bit armv8, but not using the default LP64 ABI (64-bit longs and pointers) but the ILP32 ABI (ints, longs and pointers are all 32bit, same as they are on armhf/armel).

It gives exactly the same functionality as existing 32-bit ARM, but using the v8 instruction set. This is significant on arm cores that _only_ support v8, such as the Cavium ThunderX, where you also have software that is not 64-bit-safe.

It is fairly experimental at the moment (2016-2018) and whilst there is upstream toolchain support, kernel and glibc support are being maintained in topic trees, not mainline whilst the world determines if this architecture gets sufficient usage for long-term support.

Documentation

Linaro maintains a wiki page at https://wiki.linaro.org/Platform/arm64-ilp32

Status

Linaro is doing bootstrap work so that it is possible to build this in Debian. It is unlikely to become a Debian port unless it achieves sufficient interest and maturity to be maintainable. This may happen if enough 64-bit-only cores are produced, whilst interest in 32-bit-only software remains.

An initial bootstrap was done in Sept 2017, but there was enough breakage in glibc/kernel interfacing that it was not useful. A second bootstrap was done in Sept 2018, once things were ore mature.

Nearly everything is just mainline, with some patches as below The kernel and glibc are the exceptions

kernel

tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git branch: staging/ilp32-4.17 (changes with kernel updates)

glibc

Image generation

Use this command to cross-generate a filesystem image:

sudo debootstrap --foreign --no-check-gpg --arch=arm64ilp32 rebootstrap ilp32chroot http://people.linaro.org/~wookey/ilp32/repo /usr/share/debootstrap/scripts/stretch

You also need an arm64 kernel with ilp32 support enabled/built to run those binaries either on real hardware or in qemu.

The rebootstrap branch containing all the patches lives here: https://salsa.debian.org/wookey/rebootstrap/tree/ilp32

Debian differences

The debian port is a 'proper' multiarchable port for this ABI. Most other efforts so far have been to build an aarch64/arm64 toolchain which can build both LP64 and ILP32 ABI binaries, and treat everything as multilib. ?OpenSuse did an OBS build of a pile of packages to produce a set of arm64ilp32 binaries in 2016 (using the original GNU triplet).

Patches/BUGs

dpkg

824742

binutils

861833

gcc-6

874583

gcc-8

Pending

glibc

874587

linux

874536

linux4.18

Pending

libatomic-ops

867241

openssl

867240

libgpg-error

869605

gmp

869691

nspr

871741

nss

909777

libgc

872392

findutils

nobble getrlimit test

gnutls28

872454

systemd

set rlim_t to UQUAD, not ULONGWORD, in glibc

libssh2

874679 (Arch independent issue)

openssl1.0

874709

perl

875922 872471 875921

coreutils

?DebianBug: ?DebianBug: (arch-independent cross fixes)

kernel

Here's how to build an arm64ilp32 kernel:

apt install git bc gcc-aarch64-linux-gnu build-essential
git clone git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git -b staging/ilp32-4.17
cd linux/
git checkout ilp32-4.12
# bd1f3da26a9c73fe537490e6faeb96ccf3bf7b2c

make ARCH=arm64 defconfig
echo CONFIG_ARM64_ILP32=y >> .config
make ARCH=arm64 olddefconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j16 Image.gz

Test it on qemu:

apt install qemu-system-aarch64
qemu-system-aarch64 \
  -M virt -cpu cortex-a57 -m 1024 \
  -drive file=ilp32.img,if=none,format=raw,id=hd0 \
  -netdev user,id=net0 -device virtio-net-device,netdev=net0 \
  -device virtio-blk-device,drive=hd0 \
  -nographic \
  -kernel arch/arm64/boot/Image.gz \
  -append "root=/dev/vda rw"

See if you got the right stuff:

$ arch-test
arm64
arm64ilp32
armel
armhf