aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authoryinzhongyi <yinzhongyi@huawei.com>2018-07-11 20:37:42 +0800
committeryinzhongyi <yinzhongyi@huawei.com>2018-07-12 16:48:56 +0800
commit4cfebdd30a88eb27e9f8baa6634005239851bf02 (patch)
treedef3086761094210c02d4d2d883b61635bb41e9d /scripts
parent6407560ec2d98a52b05b46513995483947110866 (diff)
Add build rsocket in build.sh and Build_DMM.md
Change-Id: I776d6a851b684025fd24bd459ea3cac02dd69e2c Signed-off-by: yinzhongyi <yinzhongyi@huawei.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build.sh52
1 files changed, 37 insertions, 15 deletions
diff --git a/scripts/build.sh b/scripts/build.sh
index 926f3b0..a887f9f 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -63,7 +63,7 @@ if [ "$OS_ID" == "ubuntu" ]; then
APT_OPTS="--assume-yes --no-install-suggests --no-install-recommends -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\""
sudo apt-get update ${APT_OPTS}
- sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq git cmake gcc g++ automake libtool wget lsof lshw pciutils net-tools tcpdump libpcre3 libpcre3-dev zlibc zlib1g zlib1g-dev vim
+ sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq git cmake gcc g++ automake libtool wget lsof lshw pciutils net-tools tcpdump libpcre3 libpcre3-dev zlibc zlib1g zlib1g-dev vim pkg-config tcl libnl-route-3-200 flex graphviz tk debhelper dpatch gfortran ethtool libgfortran3 bison dkms quilt chrpath swig python-libxml2
elif [ "$OS_ID" == "debian" ]; then
export DEBIAN_FRONTEND=noninteractive
export DEBCONF_NONINTERACTIVE_SEEN=true
@@ -72,7 +72,7 @@ elif [ "$OS_ID" == "debian" ]; then
sudo apt-get update ${APT_OPTS}
sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq git cmake gcc g++ automake libtool wget lsof lshw pciutils net-tools tcpdump libpcre3 libpcre3-dev zlibc zlib1g zlib1g-dev vim
elif [ "$OS_ID" == "centos" ]; then
- sudo yum install -y git cmake gcc g++ automake libtool wget lsof lshw pciutils net-tools tcpdump vim sudo yum-utils pcre-devel zlib-devel
+ sudo yum install -y deltarpm git cmake gcc g++ automake libtool wget lsof lshw pciutils net-tools tcpdump vim sudo yum-utils pcre-devel zlib-devel libiverbs tk tcl tcsh
elif [ "$OS_ID" == "opensuse" ]; then
sudo yum install -y git cmake gcc g++ automake libtool wget lsof lshw pciutils net-tools tcpdump vim sudo yum-utils pcre-devel zlib-devel
fi
@@ -126,12 +126,11 @@ rm -rf *
cmake ..
make -j 8
-if [ $? -eq 0 ]
-then
- echo "DMM build is SUCCESS"
+if [ $? -eq 0 ]; then
+ echo "DMM build is SUCCESS"
else
- echo "DMM build has FAILED"
- exit 1
+ echo "DMM build has FAILED"
+ exit 1
fi
if [ "$OS_ID" == "centos" ]; then
@@ -154,20 +153,20 @@ fi
hugepageTotal=$(cat /proc/meminfo | grep -c "HugePages_Total: 0")
if [ $hugepageTotal -ne 0 ]; then
- echo "HugePages_Total is zero"
- exit
+ echo "HugePages_Total is zero"
+ exit
fi
hugepageFree=$(cat /proc/meminfo | grep -c "HugePages_Free: 0")
if [ $hugepageFree -ne 0 ]; then
- echo "HugePages_Free is zero"
- exit
+ echo "HugePages_Free is zero"
+ exit
fi
hugepageSize=$(cat /proc/meminfo | grep -c "Hugepagesize: 0 kB")
if [ $hugepageSize -ne 0 ]; then
- echo "Hugepagesize is zero"
- exit
+ echo "Hugepagesize is zero"
+ exit
fi
sudo mkdir /mnt/nstackhuge -p
@@ -188,9 +187,9 @@ mkdir -p $DMM_DIR/config/app_test
cd $DMM_DIR/config/app_test
if [ "$OS_ID" == "ubuntu" ]; then
- ifaddress1=$(ifconfig eth1 | grep 'inet addr' | cut -d: -f2 | awk '{print $1}')
+ ifaddress1=$(ifconfig enp0s8 | grep 'inet addr' | cut -d: -f2 | awk '{print $1}')
echo $ifaddress1
- ifaddress2=$(ifconfig eth2 | grep 'inet addr' | cut -d: -f2 | awk '{print $1}')
+ ifaddress2=$(ifconfig enp0s9 | grep 'inet addr' | cut -d: -f2 | awk '{print $1}')
echo $ifaddress2
elif [ "$OS_ID" == "centos" ]; then
ifaddress1=$(ifconfig enp0s8 | grep 'inet' | cut -d: -f2 | awk '{print $2}')
@@ -240,3 +239,26 @@ echo '{
}' | tee rd_config.json
echo "DMM build finished....."
+
+############### build rsocket
+echo "rsocket build start"
+cd $DMM_DIR/stacks/rsocket
+if [ "$OS_ID" == "ubuntu" ]; then
+ wget http://www.mellanox.com/downloads/ofed/MLNX_OFED-4.4-1.0.0.0/MLNX_OFED_LINUX-4.4-1.0.0.0-ubuntu16.04-x86_64.tgz
+ tar -zxvf MLNX_OFED_LINUX-4.4-1.0.0.0-ubuntu16.04-x86_64.tgz
+ cd MLNX_OFED_LINUX-4.4-1.0.0.0-ubuntu16.04-x86_64
+elif [ "$OS_ID" == "centos" ]; then
+ wget http://www.mellanox.com/downloads/ofed/MLNX_OFED-4.4-1.0.0.0/MLNX_OFED_LINUX-4.4-1.0.0.0-rhel7.2-x86_64.tgz
+ tar -zxvf MLNX_OFED_LINUX-4.4-1.0.0.0-rhel7.2-x86_64.tgz
+ cd MLNX_OFED_LINUX-4.4-1.0.0.0-rhel7.2-x86_64
+fi
+./mlnxofedinstall --force
+cd $BUILD_DIR
+make dmm_rsocket
+if [ $? -eq 0 ]; then
+ echo "rsocket build has SUCCESS"
+else
+ echo "rsocket build has FAILED"
+ exit 1
+fi
+echo "rsocket build finished"