summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-01-25 18:06:38 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-01-25 20:23:54 +0100
commitcf242248084333a92b3ffd9356b1535cc4a7fa43 (patch)
tree9c0940a0463d1581b1bd249678bc0de8b2487d5b
parent710f1b6ad2c9c967f7b592cfea471dcbb5f4f2b7 (diff)
AArch64: Add native build support
- ovs-dpdk/debian/control: Add arm64 to supported arch list - Dockerfile: For AArch64 native builds, pull Docker image from "aarch64/ubuntu:16.04". - install.sh: Simplify and remove version harcodes Since only one set of packages (DPDK/OVS/OVS-DPDK) is shipped per archive, we can safely wildcard the installed versions in install.sh, which previously hardcoded DPDK and OVS versions. This is helpful for arm64, which has a custom deb subversion for DPDK and also has different package names ("*_arm64.deb"). - build-ovs-*.sh: Fix debian changelog date formatting (two spaces) Change-Id: I0f2ade6516040ae6295ca61c37beba1fd87d28c1 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.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: Fri, 03 Feb 2017 00:18:01 +0000 Reviewed-on: https://review.openstack.org/425387 Project: openstack/fuel-plugin-ovs Branch: refs/heads/master
-rw-r--r--deployment_scripts/install.sh39
-rwxr-xr-xovs_build/build-ovs-dpdk.sh2
-rwxr-xr-xovs_build/build-ovs-nsh-dpdk.sh2
-rw-r--r--ovs_build/openvswitch_2.6-dpdk_16.07/debian/control2
-rwxr-xr-xpre_build_hook6
5 files changed, 25 insertions, 26 deletions
diff --git a/deployment_scripts/install.sh b/deployment_scripts/install.sh
index 4a22685..821668d 100644
--- a/deployment_scripts/install.sh
+++ b/deployment_scripts/install.sh
@@ -11,32 +11,23 @@ dpdk=$3
11dpdk_socket_mem=${4:-''} 11dpdk_socket_mem=${4:-''}
12pmd_cpu_mask=${5:-'2'} 12pmd_cpu_mask=${5:-'2'}
13 13
14ovs="ovs-dpdk.tar.gz"
15if [ $nsh = 'true' ]; then
16 ovs="ovs-nsh-dpdk.tar.gz"
17fi
18
14apt-get install -y --allow-unauthenticated dkms 19apt-get install -y --allow-unauthenticated dkms
15 20
16if [ $nsh = 'true' ] 21curl http://$host:8080/plugins/fuel-plugin-ovs-1.0/repositories/ubuntu/${ovs} | tar -xzv
22dpkg -i openvswitch-datapath-dkms_*.deb
23dpkg -i openvswitch-common_*.deb
24dpkg -i openvswitch-switch_*.deb
25dpkg -i python-openvswitch_*.deb
26
27if [ $dpdk = 'true' ]
17then 28then
18 curl http://$host:8080/plugins/fuel-plugin-ovs-1.0/repositories/ubuntu/ovs-nsh-dpdk.tar.gz | tar -xzv 29 apt-get install -y --allow-unauthenticated dpdk dpdk-dev dpdk-dkms
19 dpkg -i openvswitch-datapath-dkms_2.6.1-1.nsh_all.deb 30 dpkg -i openvswitch-switch-dpdk_*.deb
20 dpkg -i openvswitch-common_2.6.1-1.nsh_amd64.deb
21 dpkg -i openvswitch-switch_2.6.1-1.nsh_amd64.deb
22 dpkg -i python-openvswitch_2.6.1-1.nsh_all.deb
23 if [ $dpdk = 'true' ]
24 then
25 apt-get install -y --allow-unauthenticated dpdk dpdk-dev dpdk-dkms
26 dpkg -i openvswitch-switch-dpdk_2.6.1-1.nsh_amd64.deb
27 fi
28else
29 curl http://$host:8080/plugins/fuel-plugin-ovs-1.0/repositories/ubuntu/ovs-dpdk.tar.gz | tar -xzv
30 dpkg -i openvswitch-datapath-dkms_2.6.90-1_all.deb
31 dpkg -i openvswitch-common_2.6.90-1_amd64.deb
32 dpkg -i openvswitch-switch_2.6.90-1_amd64.deb
33 dpkg -i python-openvswitch_2.6.90-1_all.deb
34 if [ $dpdk = 'true' ]
35 then
36 apt-get install -y --allow-unauthenticated dpdk dpdk-dev dpdk-dkms
37 dpkg -i openvswitch-switch-dpdk_2.6.90-1_amd64.deb
38
39 fi
40fi 31fi
41 32
42if [[ $dpdk = 'true' && -n $dpdk_socket_mem ]] 33if [[ $dpdk = 'true' && -n $dpdk_socket_mem ]]
@@ -51,3 +42,5 @@ then
51 42
52 service openvswitch-switch restart 43 service openvswitch-switch restart
53fi 44fi
45
46rm -rf $INSTALL_HOME
diff --git a/ovs_build/build-ovs-dpdk.sh b/ovs_build/build-ovs-dpdk.sh
index 419f9d0..68c705f 100755
--- a/ovs_build/build-ovs-dpdk.sh
+++ b/ovs_build/build-ovs-dpdk.sh
@@ -25,7 +25,7 @@ dpdk (16.07-0ubuntu5~u1604+fuel10) xenial; urgency=low
25 * Rebuild debian package 25 * Rebuild debian package
26 * update librte-eal2.symbols 26 * update librte-eal2.symbols
27 27
28 -- Ruijing Guo <ruijing.guo@intel.com> $(date --rfc-2822) 28 -- Ruijing Guo <ruijing.guo@intel.com> $(date --rfc-2822)
29EOF 29EOF
30 30
31# copy from debian/control 31# copy from debian/control
diff --git a/ovs_build/build-ovs-nsh-dpdk.sh b/ovs_build/build-ovs-nsh-dpdk.sh
index 23cea86..dbf16c5 100755
--- a/ovs_build/build-ovs-nsh-dpdk.sh
+++ b/ovs_build/build-ovs-nsh-dpdk.sh
@@ -25,7 +25,7 @@ dpdk (16.07-0ubuntu5~u1604+fuel10) xenial; urgency=low
25 * Rebuild debian package 25 * Rebuild debian package
26 * update librte-eal2.symbols 26 * update librte-eal2.symbols
27 27
28 -- Ruijing Guo <ruijing.guo@intel.com> $(date --rfc-2822) 28 -- Ruijing Guo <ruijing.guo@intel.com> $(date --rfc-2822)
29EOF 29EOF
30 30
31# copy from debian/control 31# copy from debian/control
diff --git a/ovs_build/openvswitch_2.6-dpdk_16.07/debian/control b/ovs_build/openvswitch_2.6-dpdk_16.07/debian/control
index e7171b9..e0c27c5 100644
--- a/ovs_build/openvswitch_2.6-dpdk_16.07/debian/control
+++ b/ovs_build/openvswitch_2.6-dpdk_16.07/debian/control
@@ -27,7 +27,7 @@ Homepage: http://openvswitch.org/
27XS-Testsuite: autopkgtest 27XS-Testsuite: autopkgtest
28 28
29Package: openvswitch-switch-dpdk 29Package: openvswitch-switch-dpdk
30Architecture: i386 amd64 30Architecture: i386 amd64 arm64
31Depends: dpdk, 31Depends: dpdk,
32 openvswitch-switch (>= 2.4.0), 32 openvswitch-switch (>= 2.4.0),
33 ${misc:Depends}, 33 ${misc:Depends},
diff --git a/pre_build_hook b/pre_build_hook
index 43b5936..194a7b9 100755
--- a/pre_build_hook
+++ b/pre_build_hook
@@ -3,9 +3,15 @@
3set -eux 3set -eux
4 4
5BUILD_FOR=${BUILD_FOR:-ubuntu} 5BUILD_FOR=${BUILD_FOR:-ubuntu}
6BUILD_ARCH="$(dpkg --print-architecture)"
6DIR="$(dirname `readlink -f $0`)" 7DIR="$(dirname `readlink -f $0`)"
7 8
8function build_pkg { 9function build_pkg {
10 case ${BUILD_ARCH} in
11 arm64)
12 sed -i -e "s|FROM ubuntu|FROM aarch64/ubuntu|g" ovs_build/Dockerfile
13 ;;
14 esac
9 case $1 in 15 case $1 in
10 ubuntu) 16 ubuntu)
11 rm -rf ${DIR}/repositories/ubuntu; mkdir -p ${DIR}/repositories/ubuntu 17 rm -rf ${DIR}/repositories/ubuntu; mkdir -p ${DIR}/repositories/ubuntu