summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuo Ruijing <ruijing.guo@intel.com>2016-05-18 14:48:31 +0800
committerGuo Ruijing <ruijing.guo@intel.com>2016-05-19 14:50:09 +0800
commitb15c57083b8646ffd38271bee81704cf120f5599 (patch)
tree6af69c390927feeec73ddbd16d344a96fd438f3f
parent5d3bd1e2038482b416a91503c2c4639bd540c09f (diff)
Build OVS with DPDK
Change-Id: I4f8657eeef418ee90fcb6a399541da1911c2ab27 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
Notes
Notes (review): Code-Review+2: Ruijing <ruijing.guo@intel.com> Workflow+1: Ruijing <ruijing.guo@intel.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Thu, 19 May 2016 07:03:58 +0000 Reviewed-on: https://review.openstack.org/317858 Project: openstack/fuel-plugin-ovs Branch: refs/heads/master
-rwxr-xr-xovs_build/build-ovs-dpdk.sh96
1 files changed, 64 insertions, 32 deletions
diff --git a/ovs_build/build-ovs-dpdk.sh b/ovs_build/build-ovs-dpdk.sh
index 9168f86..8ab7804 100755
--- a/ovs_build/build-ovs-dpdk.sh
+++ b/ovs_build/build-ovs-dpdk.sh
@@ -1,39 +1,71 @@
1#!/bin/bash 1#!/bin/bash
2 2
3DPDK_VER=2.1.0 3OVS_COMMIT=cd4764fdd8ce0aa0063525dad0e67f20b3bcf6e9
4BUILD_HOME=`pwd`/tmp
5 4
6export RTE_TARGET=x86_64-native-linuxapp-gcc 5BUILD_HOME=`pwd`
7export RTE_SDK=${BUILD_HOME}/dpdk-${DPDK_VER} 6sudo apt-get update -y
8export DPDK_BUILD=${RTE_SDK}/${RTE_TARGET} 7sudo apt-get build-dep openvswitch -y
8sudo apt-get -y install devscripts dpkg-dev git wget
9 9
10OVS_COMMIT=121daded51b9798fe3722824b27a05c16806cbd1
11URL_OVS=https://github.com/openvswitch/ovs.git
12URL_DPDK=http://dpdk.org/browse/dpdk/snapshot/dpdk-${DPDK_VER}.tar.gz
13
14mkdir -p ${BUILD_HOME}
15cd ${BUILD_HOME} 10cd ${BUILD_HOME}
16wget ${URL_DPDK} 11wget https://launchpad.net/ubuntu/+archive/primary/+files/dpdk_2.2.0-0ubuntu8.dsc
17tar -xzvf dpdk-${DPDK_VER}.tar.gz 12wget https://launchpad.net/ubuntu/+archive/primary/+files/dpdk_2.2.0.orig.tar.gz
18cd dpdk-${DPDK_VER} 13wget https://launchpad.net/ubuntu/+archive/primary/+files/dpdk_2.2.0-0ubuntu8.debian.tar.xz
19sed -i -e 's/CONFIG_RTE_LIBRTE_VHOST=n/CONFIG_RTE_LIBRTE_VHOST=y/' \ 14dpkg-source -x dpdk_2.2.0-0ubuntu8.dsc
20 -e 's/CONFIG_RTE_BUILD_COMBINE_LIBS=n/CONFIG_RTE_BUILD_COMBINE_LIBS=y/' \ 15
21 -e 's/CONFIG_RTE_PKTMBUF_HEADROOM=128/CONFIG_RTE_PKTMBUF_HEADROOM=256/' \ 16# copy from debian/control
22 config/common_linuxapp 17sudo apt-get install -y debhelper \
23make install T=${RTE_TARGET} 18 dh-python \
19 dh-systemd \
20 doxygen \
21 graphviz \
22 inkscape \
23 libcap-dev \
24 libpcap-dev \
25 libxen-dev \
26 libxenstore3.0 \
27 python \
28 python-sphinx \
29 texlive-fonts-recommended \
30 texlive-latex-extra
31
32cd dpdk-2.2.0; rm -rf debian/patches/; debian/rules build; fakeroot debian/rules binary
33cd ${BUILD_HOME}; sudo dpkg -i *.deb
24 34
25cd ${BUILD_HOME} 35cd ${BUILD_HOME}
26git clone ${URL_OVS} openvswitch 36wget https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0.orig.tar.gz
27cd openvswitch 37wget https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0-0ubuntu1.dsc
28git checkout ${OVS_COMMIT} -b development 38wget https://launchpad.net/ubuntu/+archive/primary/+files/openvswitch-dpdk_2.4.0-0ubuntu1.debian.tar.xz
29 39dpkg-source -x openvswitch-dpdk_2.4.0-0ubuntu1.dsc
30export DEB_BUILD_OPTIONS='parallel=8 nocheck' 40
31sed -i "s/2.4.90/2.4.90.dpdk/g" debian/changelog 41
32sed -i "s/DATAPATH_CONFIGURE_OPTS.*=.*//" debian/rules 42# copy from debian/control
33sed -i "2iDATAPATH_CONFIGURE_OPTS='--with-dpdk=$DPDK_BUILD'" debian/rules 43sudo apt-get intall -y autoconf \
34sed -i "s/DATAPATH_CONFIGURE_OPTS.*=.*//" debian/rules.modules 44 automake \
35sed -i "2iDATAPATH_CONFIGURE_OPTS='--with-dpdk=$DPDK_BUILD'" debian/rules.modules 45 bzip2 \
36debian/rules build 46 debhelper \
37fakeroot debian/rules binary 47 dh-autoreconf \
38 48 dh-systemd \
39cp ${BUILD_HOME}/*.deb /deb 49 graphviz \
50 libdpdk-dev \
51 libfuse-dev \
52 libssl-dev \
53 libtool \
54 openssl \
55 procps \
56 python-all \
57 python-qt4 \
58 python-twisted-conch \
59 python-zopeinterface
60
61git clone https://github.com/openvswitch/ovs.git
62cd ovs; git checkout ${OVS_COMMIT}
63cd ${BUILD_HOME}; tar czvf ovs.tar.gz ovs
64rm -rf openvswitch-dpdk-2.5.0*
65cd openvswitch-dpdk-2.4.0; uupdate -v 2.5.0 ../ovs.tar.gz
66cd ../openvswitch-dpdk-2.5.0
67sed -i "s/include\/rte_config.h/include\/dpdk\/rte_config.h/" acinclude.m4
68sed -i 's/DPDK_INCLUDE=.*/DPDK_INCLUDE=$RTE_SDK\/include\/dpdk/' acinclude.m4
69autoreconf --install
70rm -rf debian/patches/ .git;
71debian/rules build; fakeroot debian/rules binary