aboutsummaryrefslogtreecommitdiff
path: root/scripts/build-pktio-dpdk
blob: 6c6830ac0d1a4204fcce54c1777d57a035a4da2b (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
#!/bin/bash

TARGET=${TARGET:-"x86_64-native-linuxapp-gcc"}

export ROOT_DIR=$(readlink -e $(dirname $0) | sed 's|/scripts||')
pushd ${ROOT_DIR}

echo '#include "pcap.h"' | cpp -H -o /dev/null 2>&1
if [ "$?" != "0" ]; then
	echo "Error: pcap is not installed. You may need to install libpcap-dev"
fi

git -c advice.detachedHead=false clone -q --depth=1 --single-branch --branch=v17.02 http://dpdk.org/git/dpdk dpdk
pushd dpdk
git log --oneline --decorate

#Make and edit DPDK configuration
make config T=${TARGET} O=${TARGET}
pushd ${TARGET}
#To use I/O without DPDK supported NIC's enable pcap pmd:
sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_PCAP=).*,\1y,' .config
popd

#Build DPDK
make install T=${TARGET} EXTRA_CFLAGS="-fPIC"
popd

#Build ODP
./bootstrap;
./configure  --enable-test-vald  --enable-test-perf --enable-test-cpp \
	     --enable-debug --enable-debug-print \
	     --with-dpdk-path=`pwd`/dpdk/${TARGET}
make