@@ -31,6 +31,7 @@ core
cscope.out
depcomp
doc/output
+dpdk/
install-sh
lib/
libtool
new file mode 100755
@@ -0,0 +1,34 @@
+#!/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 clone http://dpdk.org/git/dpdk dpdk
+pushd dpdk
+git checkout -b bv2.2.0 v2.2.0
+
+#Make and edit DPDK configuration
+make config T=${TARGET} O=${TARGET}
+pushd ${TARGET}
+sed -ri 's,(CONFIG_RTE_BUILD_COMBINE_LIBS=).*,\1y,' .config
+#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
Add script to quickly build odp with dpdk pktio support. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> --- .gitignore | 1 + scripts/build-pktio-dpdk | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100755 scripts/build-pktio-dpdk