summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build_dpdk1802.sh8
-rwxr-xr-xscripts/git/commit-msg-hook.py2
-rwxr-xr-xscripts/git/pre-commit14
3 files changed, 22 insertions, 2 deletions
diff --git a/scripts/build_dpdk1802.sh b/scripts/build_dpdk1802.sh
index 01379d6..1ed84bb 100755
--- a/scripts/build_dpdk1802.sh
+++ b/scripts/build_dpdk1802.sh
@@ -17,7 +17,7 @@
echo "check whether dpdk installed"
cur_directory=${PWD}
-check_dpdk=$(rpm -qa | grep dpdk)
+check_dpdk=$(rpm -qa | grep dpdk-devel)
if [ -z "$check_dpdk" ]; then
echo "system will install the dpdk"
else
@@ -56,6 +56,12 @@ sed -i '83a sed -i '\''s!CONFIG_RTE_BUILD_SHARED_LIB=.*!CONFIG_RTE_BUILD_SHARED_
sed -i '84a sed -i '\''s!CONFIG_RTE_LIBRTE_EAL=.*!CONFIG_RTE_LIBRTE_EAL=y!1'\'' config/common_base' dpdk.spec
sed -i '85a sed -i '\''s!CONFIG_RTE_EAL_PMD_PATH=.*!CONFIG_RTE_EAL_PMD_PATH="/tmp/dpdk/drivers/"!1'\'' config/common_base' dpdk.spec
+#disable KNI mode by default
+sed -i '93a sed -ri '\''s!CONFIG_RTE_LIBRARY_KNI=.*!CONFIG_RTE_LIBRARY_KNI=n!1'\'' %{target}/.config' dpdk.spec
+sed -i '94a sed -ri '\''s!CONFIG_RTE_LIBRARY_PMD_KNI=.*!CONFIG_RTE_LIBRARY_PMD_KNI=n!1'\'' %{target}/.config' dpdk.spec
+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
+
echo "build the dependence"
#sudo yum-builddep -y dpdk.spec
sudo yum install -y libpcap-devel python-sphinx inkscape
diff --git a/scripts/git/commit-msg-hook.py b/scripts/git/commit-msg-hook.py
index 719ff22..9c397ed 100755
--- a/scripts/git/commit-msg-hook.py
+++ b/scripts/git/commit-msg-hook.py
@@ -123,7 +123,7 @@ with open(sys.argv[1], 'r') as commit_msg:
for line in contents:
dup = line.lstrip()
- if dup.startswith('#'):
+ if dup.startswith('#') or dup.startswith("Change-Id") or dup.startswith("Signed-of-by"):
continue
if subject is True:
ret = check_subject(line)
diff --git a/scripts/git/pre-commit b/scripts/git/pre-commit
new file mode 100755
index 0000000..58cd14f
--- /dev/null
+++ b/scripts/git/pre-commit
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+if git rev-parse --verify HEAD >/dev/null 2>&1
+then
+ against=HEAD
+else
+ # Initial commit: diff against an empty tree object
+ against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
+fi
+
+# autoremove trailing whitespace
+for file in `git diff-index --check --cached $against -- | sed '/^[-+]/d' | sed -r 's/:[0-9]+:.*//' | uniq` ; do
+ sed -i 's/[ \t]*$//g' $file
+done