diff options
author | 2018-09-17 11:44:29 +0000 | |
---|---|---|
committer | 2018-09-17 11:44:29 +0000 | |
commit | caadf032661d01f77f043336aac308b458e372db (patch) | |
tree | 57b1d87783e893f01a96e3a13664dbe44c1ec910 /scripts | |
parent | 76d209198e0f392baca28e2cf15624799b851ace (diff) | |
parent | 2cd6092cc0cbbaa21f688bb8cdbef64944c8399b (diff) |
Merge "Fix: add dpdk building dependency"
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 |
3 files changed, 14 insertions, 2 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" |