3 # Copyright (c) 2016 Open Platform for NFV Project, Inc. and its contributors
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
19 echo "==============================="
21 echo executing on machine `uname -a`
24 echo run BuildAndTestOVS -h for complete help on options on ovsnfv scripts.
27 while getopts "g:hp:u:v" opt; do
30 DPDK_VERSION=${OPTARG}
40 DPDK_REPO_URL=${OPTARG}
48 if [ -z $DPDK_REPO_URL ]; then
49 DPDK_REPO_URL=http://dpdk.org/git/dpdk
51 if [ -z $DPDK_VERSION ]; then
54 export REPO_PATH="/etc/yum.repos.d/fdio-release.repo"
55 if [ ! -f $REPO_PATH ]; then
56 echo "-------------------------------------------"
57 echo install upstream repo - Use fd.io nexus repo for now
58 echo until dpdk rpm is in epel or Centos NFV SIG
60 cat - > $FDIORELEASE <<"_EOF"
62 name=fd.io release branch latest merge
63 baseurl=https://nexus.fd.io/content/repositories/fd.io.master.centos7/
67 sudo cp $FDIORELEASE $REPO_PATH
68 sudo chmod 644 $REPO_PATH
75 function install_pre_reqs() {
76 echo "----------------------------------------"
77 echo Install dependencies for dpdk.
79 sudo yum -y install gcc make python-devel openssl-devel kernel-devel graphviz \
80 kernel-debug-devel autoconf automake rpm-build redhat-rpm-config \
81 libtool python-twisted-core desktop-file-utils groff PyQt4 \
85 if [ ! -d $TEMPDIR ]; then
93 echo "---------------------------------"
94 echo Download DPDK RPMs
95 yumdownloader dpdk-$DPDK_VERSION
96 yumdownloader dpdk-devel-$DPDK_VERSION
97 yumdownloader dpdk-debuginfo-$DPDK_VERSION
98 yumdownloader dpdk-doc-$DPDK_VERSION
99 yumdownloader dpdk-examples-$DPDK_VERSION
100 yumdownloader dpdk-tools-$DPDK_VERSION
103 echo "-------------------------------"
106 cp $TEMPDIR/*.rpm $HOME