diff options
author | Ilias Apalodimas <ilias.apalodimas@linaro.org> | 2018-04-17 19:44:58 +0300 |
---|---|---|
committer | Ilias Apalodimas <ilias.apalodimas@linaro.org> | 2018-04-17 19:44:58 +0300 |
commit | 539c27970d52d537b1c52c912f83840371ac8bdf (patch) | |
tree | 5248de9ba8cbd00e7aab1ee45d43bcf6b8dc426d /scripts | |
parent | 42bef28977ff5499d5e364fa531d4b0e6e344823 (diff) |
testijng code for building dpdk on all archs
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build-dpdk.sh | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/scripts/build-dpdk.sh b/scripts/build-dpdk.sh new file mode 100755 index 0000000..a77159a --- /dev/null +++ b/scripts/build-dpdk.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +DPDK_VER='17.11.1' +DPDK_DIR='dpdk_source' +DPDK_STATIC_TAR='dpdk.tar.xz' + +arch=$(arch) + +dpdk_lava_result() { + reason=$1 + result=$2 + stop_session=$3 + + lava-test-case "$reason" --result "$result" + [ "$stop_session" = 'yes' ] && stop_hacking && exit 1 +} + +wget https://fast.dpdk.org/rel/dpdk-"$DPDK_VER".tar.xz -O "$DPDK_STATIC_TAR" && \ + mkdir "$DPDK_DIR" && tar xf "$DPDK_STATIC_TAR" --strip 1 -C "$DPDK_DIR" + +# terminate LAVA job if download failed +[ $? -ne 0 ] && dpdk_lava_result DPDK_DOWNLOAD FAILED yes + +# we usually run on Xeon/Thunderx, aadjust accordingly for future archs +case $arch in + aarch64) + dpdk_t='arm64-armv8a-linuxapp-gcc' + cjobs=98 + ;; + x86_64) + dpdk_t='x86_64-native-linuxapp-gcc' + cjobs=24 + ;; + *) + dpdk_lava_result BUILD_ARCH UNKNOWN_ARCH yes +esac + +cd "$DPDK_DIR" +make -j "$cjobs" install T="$dpdk_t" DESTDIR=./install +cd .. |