pkgdep/git: Use $kernel_ver in global scope
Preparation for incoming patches in the series. Signed-off-by: Michal Berger <michal.berger@intel.com> Change-Id: I46a9c68b89034793083f536b8d3b20f68ad1482e Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13640 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
c61554bb68
commit
f4e0fc096e
@ -102,10 +102,6 @@ function install_refspdk() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function install_qat() {
|
function install_qat() {
|
||||||
# Dissect the kernel version into maj, min, release and local version
|
|
||||||
local kernel_maj kernel_min kernel_rel kernel_loc
|
|
||||||
local kernel_ver
|
|
||||||
|
|
||||||
if ! hash yasm; then
|
if ! hash yasm; then
|
||||||
install yasm
|
install yasm
|
||||||
fi
|
fi
|
||||||
@ -114,8 +110,8 @@ function install_qat() {
|
|||||||
local syms
|
local syms
|
||||||
if [[ -e /proc/kallsyms ]]; then
|
if [[ -e /proc/kallsyms ]]; then
|
||||||
syms=/proc/kallsyms
|
syms=/proc/kallsyms
|
||||||
elif [[ -e /boot/System.map-$(< /proc/sys/kernel/osrelease) ]]; then
|
elif [[ -e /boot/System.map-$kernel_ver ]]; then
|
||||||
syms=/boot/System.map-$(< /proc/sys/kernel/osrelease)
|
syms=/boot/System.map-$kernel_ver
|
||||||
else
|
else
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
@ -123,9 +119,6 @@ function install_qat() {
|
|||||||
grep -q "$1" "$syms"
|
grep -q "$1" "$syms"
|
||||||
}
|
}
|
||||||
|
|
||||||
IFS=".-" read -r kernel_{maj,min,rel,loc} < /proc/sys/kernel/osrelease
|
|
||||||
kernel_ver=$((kernel_maj << 16 | kernel_min << 8 | kernel_rel))
|
|
||||||
|
|
||||||
if [[ -e /sys/module/qat_c62x ]]; then
|
if [[ -e /sys/module/qat_c62x ]]; then
|
||||||
sudo modprobe -r qat_c62x || :
|
sudo modprobe -r qat_c62x || :
|
||||||
fi
|
fi
|
||||||
@ -447,7 +440,7 @@ function install_ice() {
|
|||||||
curl -L -o- "$ICE_DRIVER" | tar -C "$GIT_REPOS" -xzf -
|
curl -L -o- "$ICE_DRIVER" | tar -C "$GIT_REPOS" -xzf -
|
||||||
|
|
||||||
if [[ $OSID == ubuntu && $OSVERSION == 18.04 ]]; then
|
if [[ $OSID == ubuntu && $OSVERSION == 18.04 ]]; then
|
||||||
if ge "$(< /proc/sys/kernel/osrelease)" 4.15.0-159; then
|
if ge "$kernel_ver" 4.15.0-159; then
|
||||||
patch --dir="$GIT_REPOS/ice-$ICE_VERSION" -p1
|
patch --dir="$GIT_REPOS/ice-$ICE_VERSION" -p1
|
||||||
fi < "$rootdir/test/common/config/pkgdep/patches/ice/0001-undef-skb-frag-off.patch"
|
fi < "$rootdir/test/common/config/pkgdep/patches/ice/0001-undef-skb-frag-off.patch"
|
||||||
fi
|
fi
|
||||||
@ -586,3 +579,6 @@ export GIT_REPO_BPFTRACE
|
|||||||
GIT_REPOS=${GIT_REPOS:-$HOME}
|
GIT_REPOS=${GIT_REPOS:-$HOME}
|
||||||
|
|
||||||
gcc_version=$(gcc -dumpversion) gcc_version=${gcc_version%%.*}
|
gcc_version=$(gcc -dumpversion) gcc_version=${gcc_version%%.*}
|
||||||
|
if [[ -e /proc/sys/kernel/osrelease ]]; then
|
||||||
|
kernel_ver=$(< /proc/sys/kernel/osrelease)
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user