aboutsummaryrefslogtreecommitdiff
path: root/helper/dpdk
blob: 2b3123eae6f0bf72ce6b1fe5823a4c64fa353c77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
[ -n "$DPDK_HELPER" ] && return || readonly DPDK_HELPER=1

source ${ROOT_DIR}/helper/vercomp

export ROOT_DIR_DPDK=$(readlink -f $ROOT_DIR_DPDK)
GIT_DPDK=${GIT_DPDK:-http://92.243.14.124/git/dpdk}

get_dpdk(){

    mkdir $ROOT_DIR_DPDK
    cd $ROOT_DIR_DPDK
    #get DPDK - we need a specific version
    git clone ${GIT_DPDK}
    cd dpdk
    git checkout tags/v1.6.0r2

    #apply patch depending on cleaned up version string to fix later builds
    VERSION=`uname -r`
    VERSION=${VERSION//[a-z]/}
    VERSION=${VERSION%?}
    COMPARISON=`vercomp "3.13.0-29 $VERSION"`
    echo "Check if a patch is needed: host is $VERSION $COMPARISON 3.13.0-29"

    if [[ $COMPARISON  == ">" ]]
    then
        echo "Need a patch in"
        pwd
        git am --3way "${ROOT_DIR}/patches/0001-fix-skb_set_hash-when-kernel-version-3.13.0-29.patch"
    else
        echo "No need to patch"
    fi

    #build DPDK so that ODP can see the incudes and get the lib to link to
    make install T=x86_64-default-linuxapp-gcc CONFIG_RTE_BUILD_COMBINE_LIBS=y EXTRA_CFLAGS="-fPIC"
}
## vim: set ft=sh sw=4 sts=4 et foldmethod=syntax : ##