add ARM compatibility

This commit is contained in:
Mason Rowe
2021-06-05 03:12:29 -04:00
parent 02dc401e58
commit 857e14efe8
8 changed files with 124 additions and 10 deletions
+27
View File
@@ -9,6 +9,15 @@ This directory contains all of the binaries required to run the benchmarking tes
* **iperf_x64** - v3.10 (compiled 28 May 2021) - 64-bit version
* **iperf_x86** - v3.10 (compiled 28 May 2021) - 32-bit version
### ARM Binaries
ARM compatibilty is considered experimental. Static binaries for ARM-based machines are cross-compiled within a Holy Build Box container using the [musl toolchain](https://musl.cc/).
* **fio_aarch64** - v3.27 (compiled 05 June 2021) - ARM 64-bit version
* **fio_arm** - v3.27 (compiled 05 June 2021) - ARM 32-bit version
* **iperf_aarch64** - v3.10 (compiled 05 June 2021) - ARM 64-bit version
* **iperf_arm** - v3.10 (compiled 05 June 2021) - ARM 32-bit version
### Compile Notes
**Pre-reqs**:
@@ -27,3 +36,21 @@ docker run -t -i --rm -v `pwd`:/io phusion/holy-build-box-32:latest linux32 bash
```
64-bit and 32-bit binaries will be placed in the current directory.
### ARM Compile Notes
Compilation of ARM-compatible binaries requires additional environment variables to identify the proper musl toolchain and architecture to target for cross-compilation.
**Compiling 64-bit binaries**:
```sh
docker run -t -i --rm -v `pwd`:/io --env ARCH=aarch64 --env CROSS=aarch64-linux-musl --env HOST=aarch64-linux-gnu phusion/holy-build-box-64:latest bash /io/compile-arm.sh
```
**Compiling 32-bit binaries**:
```sh
docker run -t -i --rm -v `pwd`:/io --env ARCH=arm --env CROSS=arm-linux-musleabihf --env HOST=arm-linux-gnueabihf phusion/holy-build-box-64:latest bash /io/compile-arm.sh
```
64-bit (aarch64) and 32-bit (arm) binaries will be placed in the current directory.
+51
View File
@@ -0,0 +1,51 @@
#!/bin/bash
set -e
# Activate Holy Build Box lib compiliation environment
source /hbb/activate
set -x
yum install -y yum-plugin-ovl # fix for docker overlay fs
yum install -y xz
# download musl cross compilation toolchain
cd ~
curl -L "https://musl.cc/${CROSS}-cross.tgz" -o "${CROSS}-cross.tgz"
tar xf ${CROSS}-cross.tgz
# download, compile, and install libaio as static library
cd ~
curl -L http://ftp.de.debian.org/debian/pool/main/liba/libaio/libaio_0.3.112.orig.tar.xz -o "libaio.tar.xz"
tar xf libaio.tar.xz
cd libaio-*/src
CC=/root/${CROSS}-cross/bin/${CROSS}-gcc ENABLE_SHARED=0 make prefix=/hbb_exe install
# Activate Holy Build Box exe compilation environment
source /hbb_exe/activate
# download and compile fio
cd ~
curl -L https://github.com/axboe/fio/archive/fio-3.27.tar.gz -o "fio.tar.gz"
tar xf fio.tar.gz
cd fio-fio*
CC=/root/${CROSS}-cross/bin/${CROSS}-gcc ./configure --disable-native --build-static
make
# verify no external shared library links
libcheck fio
# copy fio binary to mounted dir
cp fio /io/fio_$ARCH
# download and compile iperf
cd ~
curl -L https://github.com/esnet/iperf/archive/3.10.tar.gz -o "iperf.tar.gz"
tar xf iperf.tar.gz
cd iperf*
CC=/root/${CROSS}-cross/bin/${CROSS}-gcc ./configure --disable-shared --disable-profiling --build x86_64-pc-linux-gnu --host ${HOST} --with-openssl=no --enable-static-bin
make
# verify no external shared library links
libcheck src/iperf3
# copy iperf binary to mounted dir
cp src/iperf3 /io/iperf3_$ARCH
BIN
View File
Binary file not shown.
Executable
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Executable
BIN
View File
Binary file not shown.