]> git.proxmox.com Git - ceph.git/blame - ceph/src/spdk/scripts/build_kmod.sh
bump version to 12.2.12-pve1
[ceph.git] / ceph / src / spdk / scripts / build_kmod.sh
CommitLineData
7c673cae
FG
1#!/usr/bin/env bash
2
3readonly BASEDIR=$(readlink -f $(dirname $0))/..
4
5set -e
6
7function build_ioat_kmod() {
8 if [ -d $BASEDIR/examples/ioat/kperf/kmod ]; then
9 echo "Build Linux Ioat Test Module ..."
10 cd $BASEDIR/examples/ioat/kperf/kmod
11 make
12 fi
13}
14
15function clean_ioat_kmod() {
16 # remove dmaperf test module
17 grep -q "^dmaperf" /proc/modules && rmmod dmaperf
18 # cleanup build
19 if [ -d $BASEDIR/examples/ioat/kperf/kmod ]; then
20 echo "Cleanup Linux Ioat Test Module ..."
21 cd $BASEDIR/examples/ioat/kperf/kmod
22 make clean
23 fi
24}
25
26if [ `uname` = Linux ]; then
27 if [ "$1" = "build" ]; then
28 build_ioat_kmod
29 fi
30 if [ "$1" = "clean" ]; then
31 clean_ioat_kmod
32 fi
33fi