4 Star 1 Fork 0

Gitee 极速下载/lvs-dpdk

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/lvsgate/lvs-dpdk
克隆/下载
build-all.sh 2.99 KB
一键复制 编辑 原始数据 按行查看 历史
jlijian3 提交于 2018-01-29 15:12 +08:00 . git clone single-branch of dpdk
#!/bin/sh
ROOTDIR=`pwd`
DPDK_DIR=$ROOTDIR/dpdk
ODP_DPDK_DIR=$ROOTDIR/odp-dpdk
ODP_DPDK_INSTALL_DIR=$ROOTDIR/odp-dpdk/install
OFP_DIR=$ROOTDIR/ofp
OFP_VS_INSTALL_DIR=$ROOTDIR/ofp_vs
RTE_TARGET=x86_64-native-linuxapp-gcc
echo '#include "pcap.h"' | cpp -H -o /dev/null 2>&1
if [ "$?" != "0" ]; then
echo "Error: pcap is not installed. You may need to install libpcap-dev"
fi
#Fetch and build dpdk
if [ ! -d $DPDK_DIR ]; then
#git clone git://dpdk.org/dpdk $DPDK_DIR
git -c advice.detachedHead=false clone -q --depth=1 --single-branch --branch=v17.02 http://dpdk.org/git/dpdk $DPDK_DIR
fi
if [ ! -d $DPDK_DIR/$RTE_TARGET ]; then
cd $DPDK_DIR
make config T=$RTE_TARGET O=$RTE_TARGET
cd $DPDK_DIR/$RTE_TARGET
sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_PCAP=).*,\1y,' .config
#sed -ri 's,(CONFIG_RTE_LIBRTE_PMD_OPENSSL=).*,\1y,' .config
cd $DPDK_DIR
make install T=$RTE_TARGET EXTRA_CFLAGS="-fPIC"
fi
if [ "$?" != "0" ]; then
echo "Build dpdk error!"
exit $?
fi
export RTE_SDK=$DPDK_DIR
export RTE_TARGET=$RTE_TARGET
#Fetch and build odp-dpdk
if [ ! -d $ODP_DPDK_DIR ]; then
git clone https://github.com/lvsgate/odp-dpdk.git $ODP_DPDK_DIR
fi
cd $ODP_DPDK_DIR
git pull
if [ ! -d $ODP_DPDK_INSTALL_DIR ]; then
mkdir $ODP_DPDK_INSTALL_DIR
fi
./bootstrap
./configure --enable-shared --with-platform=linux-dpdk --enable-helper-linux --with-sdk-install-path=$DPDK_DIR/$RTE_TARGET --prefix=$ODP_DPDK_INSTALL_DIR
if [ "$?" != "0" ]; then
echo "Configure odp-dpdk error!"
exit $?
fi
make
if [ "$?" != "0" ]; then
echo "Build odp-dpdk error!"
exit $?
fi
make install
if [ "$?" != "0" ]; then
echo "Build odp-dpdk error!"
exit $?
fi
#Fetch and build ofp
yum install libnl3 libnl3-cli libnl3-devel
if [ ! -d $OFP_DIR ]; then
git clone https://github.com/lvsgate/ofp.git $OFP_DIR
fi
cd $OFP_DIR
git pull
./bootstrap
./configure --disable-libconfig --with-odp-lib=odp-dpdk --with-odp=$ODP_DPDK_INSTALL_DIR --enable-shared=no --enable-sp=yes --disable-mtrie CPPFLAGS=-I$ODP_DPDK_INSTALL_DIR/include/odp/arch/x86_64-linux/
if [ "$?" != "0" ]; then
echo "Configure ofp error!"
exit $?
fi
make
if [ "$?" != "0" ]; then
echo "Build ofp error!"
exit $?
fi
if [ ! -d $OFP_VS_INSTALL_DIR ]; then
mkdir $OFP_VS_INSTALL_DIR
fi
cp $OFP_DIR/example/ofp_vs/ofp_vs $OFP_VS_INSTALL_DIR
cp $OFP_DIR/example/ofp_vs/ofp.conf $OFP_VS_INSTALL_DIR
cp $OFP_DIR/example/ofp_vs/start.sh $OFP_VS_INSTALL_DIR
if [ "$?" != "0" ]; then
echo "Build ofp error!"
exit $?
fi
#Fetch and build lvs-dpdk tools
cd $ROOTDIR/tools/keepalived
sh configure --prefix=/usr --sysconfdir=/etc/ CPPFLAGS=-I/usr/include/libnl3/ LDFLAGS=-L/usr/lib64/
make
if [ "$?" != "0" ]; then
echo "Build ipvsadm error!"
exit $?
fi
make install
if [ "$?" != "0" ]; then
echo "Build keepalived error!"
exit $?
fi
cd $ROOTDIR/tools/ipvsadm
make
if [ "$?" != "0" ]; then
echo "Build ipvsadm error!"
exit $?
fi
make install
if [ "$?" != "0" ]; then
echo "Build ipvsadm error!"
exit $?
fi
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/mirrors/lvs-dpdk.git
git@gitee.com:mirrors/lvs-dpdk.git
mirrors
lvs-dpdk
lvs-dpdk
master

搜索帮助