summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuo Ruijing <ruijing.guo@intel.com>2016-05-03 15:23:38 +0800
committerGuo Ruijing <ruijing.guo@intel.com>2016-05-03 15:24:50 +0800
commit5d3bd1e2038482b416a91503c2c4639bd540c09f (patch)
treeba73c8d27bd6a6d435795d8a71c3c8ce98c281a4
parenta7d0e546afd2b0379eb0ead9ad818bdb7bcbe9c9 (diff)
Add build home and move to ubuntu
Change-Id: I35723d79269dce2a6afbb97ac81bbe093c9575a6 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: Tue, 03 May 2016 07:21:59 +0000 Reviewed-on: https://review.openstack.org/311943 Project: openstack/fuel-plugin-ovs Branch: refs/heads/master
-rwxr-xr-xovs_build/build-ovs-dpdk.sh10
-rwxr-xr-xovs_build/build-ovs-nsh-dpdk.sh10
-rwxr-xr-xovs_build/build-ovs-nsh.sh7
-rwxr-xr-xpre_build_hook6
4 files changed, 20 insertions, 13 deletions
diff --git a/ovs_build/build-ovs-dpdk.sh b/ovs_build/build-ovs-dpdk.sh
index 53313a5..9168f86 100755
--- a/ovs_build/build-ovs-dpdk.sh
+++ b/ovs_build/build-ovs-dpdk.sh
@@ -1,16 +1,18 @@
1#!/bin/bash 1#!/bin/bash
2 2
3DPDK_VER=2.1.0 3DPDK_VER=2.1.0
4BUILD_HOME=`pwd`/tmp
4 5
5export RTE_TARGET=x86_64-native-linuxapp-gcc 6export RTE_TARGET=x86_64-native-linuxapp-gcc
6export RTE_SDK=/dpdk-${DPDK_VER} 7export RTE_SDK=${BUILD_HOME}/dpdk-${DPDK_VER}
7export DPDK_BUILD=${RTE_SDK}/${RTE_TARGET} 8export DPDK_BUILD=${RTE_SDK}/${RTE_TARGET}
8 9
9OVS_COMMIT=121daded51b9798fe3722824b27a05c16806cbd1 10OVS_COMMIT=121daded51b9798fe3722824b27a05c16806cbd1
10URL_OVS=https://github.com/openvswitch/ovs.git 11URL_OVS=https://github.com/openvswitch/ovs.git
11URL_DPDK=http://dpdk.org/browse/dpdk/snapshot/dpdk-${DPDK_VER}.tar.gz 12URL_DPDK=http://dpdk.org/browse/dpdk/snapshot/dpdk-${DPDK_VER}.tar.gz
12 13
13cd / 14mkdir -p ${BUILD_HOME}
15cd ${BUILD_HOME}
14wget ${URL_DPDK} 16wget ${URL_DPDK}
15tar -xzvf dpdk-${DPDK_VER}.tar.gz 17tar -xzvf dpdk-${DPDK_VER}.tar.gz
16cd dpdk-${DPDK_VER} 18cd dpdk-${DPDK_VER}
@@ -20,7 +22,7 @@ sed -i -e 's/CONFIG_RTE_LIBRTE_VHOST=n/CONFIG_RTE_LIBRTE_VHOST=y/' \
20 config/common_linuxapp 22 config/common_linuxapp
21make install T=${RTE_TARGET} 23make install T=${RTE_TARGET}
22 24
23cd / 25cd ${BUILD_HOME}
24git clone ${URL_OVS} openvswitch 26git clone ${URL_OVS} openvswitch
25cd openvswitch 27cd openvswitch
26git checkout ${OVS_COMMIT} -b development 28git checkout ${OVS_COMMIT} -b development
@@ -34,4 +36,4 @@ sed -i "2iDATAPATH_CONFIGURE_OPTS='--with-dpdk=$DPDK_BUILD'" debian/rules.module
34debian/rules build 36debian/rules build
35fakeroot debian/rules binary 37fakeroot debian/rules binary
36 38
37cp /*.deb /build 39cp ${BUILD_HOME}/*.deb /deb
diff --git a/ovs_build/build-ovs-nsh-dpdk.sh b/ovs_build/build-ovs-nsh-dpdk.sh
index 11ef6b8..3bb653c 100755
--- a/ovs_build/build-ovs-nsh-dpdk.sh
+++ b/ovs_build/build-ovs-nsh-dpdk.sh
@@ -1,9 +1,10 @@
1#!/bin/bash 1#!/bin/bash
2 2
3DPDK_VER=2.1.0 3DPDK_VER=2.1.0
4BUILD_HOME=`pwd`/tmp
4 5
5export RTE_TARGET=x86_64-native-linuxapp-gcc 6export RTE_TARGET=x86_64-native-linuxapp-gcc
6export RTE_SDK=/dpdk-${DPDK_VER} 7export RTE_SDK=${BUILD_HOME}/dpdk-${DPDK_VER}
7export DPDK_BUILD=${RTE_SDK}/${RTE_TARGET} 8export DPDK_BUILD=${RTE_SDK}/${RTE_TARGET}
8 9
9OVS_COMMIT=121daded51b9798fe3722824b27a05c16806cbd1 10OVS_COMMIT=121daded51b9798fe3722824b27a05c16806cbd1
@@ -11,7 +12,8 @@ PATCHES="060679 060680 060681 060682 060683 060684 060685"
11URL_OVS=https://github.com/openvswitch/ovs.git 12URL_OVS=https://github.com/openvswitch/ovs.git
12URL_DPDK=http://dpdk.org/browse/dpdk/snapshot/dpdk-${DPDK_VER}.tar.gz 13URL_DPDK=http://dpdk.org/browse/dpdk/snapshot/dpdk-${DPDK_VER}.tar.gz
13 14
14cd / 15mkdir -p ${BUILD_HOME}
16cd ${BUILD_HOME}
15wget ${URL_DPDK} 17wget ${URL_DPDK}
16tar -xzvf dpdk-${DPDK_VER}.tar.gz 18tar -xzvf dpdk-${DPDK_VER}.tar.gz
17cd dpdk-${DPDK_VER} 19cd dpdk-${DPDK_VER}
@@ -21,7 +23,7 @@ sed -i -e 's/CONFIG_RTE_LIBRTE_VHOST=n/CONFIG_RTE_LIBRTE_VHOST=y/' \
21 config/common_linuxapp 23 config/common_linuxapp
22make install T=${RTE_TARGET} 24make install T=${RTE_TARGET}
23 25
24cd / 26cd ${BUILD_HOME}
25git clone ${URL_OVS} openvswitch 27git clone ${URL_OVS} openvswitch
26cd openvswitch 28cd openvswitch
27git checkout ${OVS_COMMIT} -b development 29git checkout ${OVS_COMMIT} -b development
@@ -38,4 +40,4 @@ sed -i "2iDATAPATH_CONFIGURE_OPTS='--with-dpdk=$DPDK_BUILD'" debian/rules.module
38debian/rules build 40debian/rules build
39fakeroot debian/rules binary 41fakeroot debian/rules binary
40 42
41cp /*.deb /build 43cp ${BUILD_HOME}/*.deb /deb
diff --git a/ovs_build/build-ovs-nsh.sh b/ovs_build/build-ovs-nsh.sh
index 34c661d..03db867 100755
--- a/ovs_build/build-ovs-nsh.sh
+++ b/ovs_build/build-ovs-nsh.sh
@@ -1,10 +1,13 @@
1#!/bin/bash 1#!/bin/bash
2 2
3BUILD_HOME=`pwd`/tmp
4
3OVS_COMMIT=121daded51b9798fe3722824b27a05c16806cbd1 5OVS_COMMIT=121daded51b9798fe3722824b27a05c16806cbd1
4PATCHES="060679 060680 060681 060682 060683 060684 060685" 6PATCHES="060679 060680 060681 060682 060683 060684 060685"
5URL_OVS=https://github.com/openvswitch/ovs.git 7URL_OVS=https://github.com/openvswitch/ovs.git
6 8
7cd / 9mkdir -p ${BUILD_HOME}
10cd ${BUILD_HOME}
8git clone ${URL_OVS} openvswitch 11git clone ${URL_OVS} openvswitch
9cd openvswitch 12cd openvswitch
10git checkout ${OVS_COMMIT} -b development 13git checkout ${OVS_COMMIT} -b development
@@ -17,4 +20,4 @@ export DEB_BUILD_OPTIONS='parallel=8 nocheck'
17sed -i "s/2.4.90/2.4.90.nsh/g" debian/changelog 20sed -i "s/2.4.90/2.4.90.nsh/g" debian/changelog
18debian/rules build 21debian/rules build
19fakeroot debian/rules binary 22fakeroot debian/rules binary
20cp /*.deb /build 23cp ${BUILD_HOME}/*.deb /deb
diff --git a/pre_build_hook b/pre_build_hook
index fc5f1b1..754e594 100755
--- a/pre_build_hook
+++ b/pre_build_hook
@@ -22,9 +22,9 @@ function build_pkg {
22 popd 22 popd
23 cd ${DIR}/ovs_build 23 cd ${DIR}/ovs_build
24 sudo docker build -t ovs_build . 24 sudo docker build -t ovs_build .
25 sudo docker run -v ${DIR}/repositories/ubuntu/ovs-nsh:/build -t ovs_build /ovs_build/build-ovs-nsh.sh 25 sudo docker run -v ${DIR}/repositories/ubuntu/:/deb -t ovs_build /ovs_build/build-ovs-nsh.sh
26 sudo docker run -v ${DIR}/repositories/ubuntu/ovs-dpdk:/build -t ovs_build /ovs_build/build-ovs-dpdk.sh 26 sudo docker run -v ${DIR}/repositories/ubuntu/:/deb -t ovs_build /ovs_build/build-ovs-dpdk.sh
27 sudo docker run -v ${DIR}/repositories/ubuntu/ovs-nsh-dpdk:/build -t ovs_build /ovs_build/build-ovs-nsh-dpdk.sh 27 sudo docker run -v ${DIR}/repositories/ubuntu/:/deb -t ovs_build /ovs_build/build-ovs-nsh-dpdk.sh
28 ;; 28 ;;
29 *) echo "Not supported system"; exit 1;; 29 *) echo "Not supported system"; exit 1;;
30 esac 30 esac