diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build_dmm_dep.sh | 5 | ||||
-rwxr-xr-x | scripts/build_dpdk1802.sh | 9 | ||||
-rwxr-xr-x | scripts/build_dpdk1805.sh | 2 | ||||
-rw-r--r--[-rwxr-xr-x] | scripts/compile_dmm.sh | 12 | ||||
-rwxr-xr-x | scripts/generate_dmm_rpm.sh | 2 |
5 files changed, 27 insertions, 3 deletions
diff --git a/scripts/build_dmm_dep.sh b/scripts/build_dmm_dep.sh index 980b3f5..ecbb686 100755 --- a/scripts/build_dmm_dep.sh +++ b/scripts/build_dmm_dep.sh @@ -2,6 +2,11 @@ set -x +# add inherited proxy for sudo user +LINE='Defaults env_keep += "ftp_proxy http_proxy https_proxy no_proxy"' +FILE=/etc/sudoers +grep -qF -- "$LINE" "$FILE" || sudo echo "$LINE" >> "$FILE" + OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') #set and check the environment for Linux diff --git a/scripts/build_dpdk1802.sh b/scripts/build_dpdk1802.sh index 5686e82..74d4860 100755 --- a/scripts/build_dpdk1802.sh +++ b/scripts/build_dpdk1802.sh @@ -62,9 +62,15 @@ sed -i '94a sed -ri '\''s!CONFIG_RTE_LIBRARY_PMD_KNI=.*!CONFIG_RTE_LIBRARY_PMD_K sed -i '95a sed -ri '\''s!CONFIG_RTE_KNI_KMOD=.*!CONFIG_RTE_KNI_KMOD=n!1'\'' %{target}/.config' dpdk.spec sed -i '96a sed -ri '\''s!CONFIG_RTE_KNI_PREEMPT_DEFAULT=.*!CONFIG_RTE_KNI_PREEMPT_DEFAULT=n!1'\'' %{target}/.config' dpdk.spec +#Add debug info +sed -i '98s!$! EXTRA_CFLAGS="-O0 -g" !' dpdk.spec + +#Not strip the debug info when generate the rpm +sed -i '43 i%global __os_install_post %{nil}\n%define debug_package %{nil}' dpdk.spec + echo "build the dependence" #sudo yum-builddep -y dpdk.spec -sudo yum install -y libpcap-devel python-sphinx inkscape +sudo yum install -y libpcap-devel python-sphinx inkscape kernel-devel-`uname -r` doxygen libnuma-devel kernel-`uname -r` echo "generate the rpm package" @@ -83,5 +89,6 @@ sudo rpm -ivh dpdk-devel-18.02-1.x86_64.rpm || exit 1 mkdir -p /tmp/dpdk/drivers/ cp -f /usr/lib64/librte_mempool_ring.so /tmp/dpdk/drivers/ +cp -f /usr/share/dpdk/usertools/dpdk-devbind.py /usr/sbin/ cd ${cur_directory} diff --git a/scripts/build_dpdk1805.sh b/scripts/build_dpdk1805.sh index 84f3e48..2727877 100755 --- a/scripts/build_dpdk1805.sh +++ b/scripts/build_dpdk1805.sh @@ -59,7 +59,7 @@ sed -i '58a sed -i '\''s!CONFIG_RTE_LIBRTE_DPAA2_USE_PHYS_IOVA=.*!CONFIG_RTE_LIB echo "build the dependence" #sudo yum-builddep -y dpdk.spec -sudo yum install -y libpcap-devel python-sphinx inkscape +sudo yum install -y libpcap-devel python-sphinx inkscape kernel-devel-`uname -r` doxygen libnuma-devel kernel-`uname -r` echo "generate the rpm package" diff --git a/scripts/compile_dmm.sh b/scripts/compile_dmm.sh index b4bc455..c378bae 100755..100644 --- a/scripts/compile_dmm.sh +++ b/scripts/compile_dmm.sh @@ -22,8 +22,20 @@ fi if [ "$OS_ID" == "centos" ]; then make pkg-rpm + if [ $? -eq 0 ]; then + echo "DMM rpm build is SUCCESS" + else + echo "DMM rpm build has FAILED" + exit 1 + fi elif [ "$OS_ID" == "ubuntu" ]; then make pkg-deb + if [ $? -eq 0 ]; then + echo "DMM deb build is SUCCESS" + else + echo "DMM deb build has FAILED" + exit 1 + fi fi echo "DMM build has FINISHED" diff --git a/scripts/generate_dmm_rpm.sh b/scripts/generate_dmm_rpm.sh index 792c2a3..76d65a1 100755 --- a/scripts/generate_dmm_rpm.sh +++ b/scripts/generate_dmm_rpm.sh @@ -17,7 +17,7 @@ cur_directory=${PWD} name="dmm" -version="18.04" +version="18.07" mkdir -p ~/rpmbuild/SOURCES |