linux ilp32,Arm64ilp32Port

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

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

binutils

gcc-8

Pending

linux4.18

Pending

libatomic-ops

openssl

libgpg-error

findutils

nobble getrlimit test

gnutls28

systemd

set rlim_t to UQUAD, not ULONGWORD, in glibc

libssh2

874679 (Arch independent issue)

openssl1.0

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

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值