summaryrefslogtreecommitdiff
path: root/packages/linux-kernel/build-intel-qat.sh
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-09-12 23:09:09 +0200
committerChristian Poessinger <christian@poessinger.com>2020-09-12 23:09:09 +0200
commitc9eaf71fe0e4da8ffa9487832d60743a43586b56 (patch)
treea1734afd1ce53ad9e69eb1a2d344df2210daf65b /packages/linux-kernel/build-intel-qat.sh
parent0b69d007405cacb680fc8a6130f2e4f9765ca977 (diff)
downloadvyos-build-c9eaf71fe0e4da8ffa9487832d60743a43586b56.tar.gz
vyos-build-c9eaf71fe0e4da8ffa9487832d60743a43586b56.zip
Revert "Kernel: T2843: upgrade Kernel to v5.8.5"
This reverts commit 78c43c2078e292ac9b53d2d6a41a47466d283914. Unfortunately we must revert the Kernel upgrade as there are two problematic issues. One which is the break of ABI functionality with parted [1] and second the internal cryptop API [2] which removed required literals for the build of Intel QAT acceleration. In the two weeks running 5.8 we still learned a lot - we experienced a performance improvement of ~30% when doing NAT @ > 10GBit/s and also utilizing the build in updated drivers for Intel NICs and WireGuard. We are looking forward to the release of this years LTS kernel and we hope to ship this in the final 1.3 release. 1: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.8.y&id=692d062655 2: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.5.y&id=d63007eb95
Diffstat (limited to 'packages/linux-kernel/build-intel-qat.sh')
-rwxr-xr-xpackages/linux-kernel/build-intel-qat.sh30
1 files changed, 17 insertions, 13 deletions
diff --git a/packages/linux-kernel/build-intel-qat.sh b/packages/linux-kernel/build-intel-qat.sh
index 8edd6940..795c4526 100755
--- a/packages/linux-kernel/build-intel-qat.sh
+++ b/packages/linux-kernel/build-intel-qat.sh
@@ -27,6 +27,7 @@ do
DEBIAN_ARCH=$(dpkg --print-architecture)
DEBIAN_DIR="${CWD}/vyos-intel-${DRIVER_NAME}_${DRIVER_VERSION}${DRIVER_VERSION_EXTRA}_${DEBIAN_ARCH}"
DEBIAN_CONTROL="${DEBIAN_DIR}/DEBIAN/control"
+ DEBIAN_POSTINST="${CWD}/vyos-intel-qat.postinst"
# Fetch Intel driver source from SourceForge
if [ -e ${DRIVER_FILE} ]; then
@@ -50,15 +51,6 @@ do
exit 1
fi
- # Intel QAT drivers are not ported to the latest Linux Kernel API :(
- # this is done by our custom patch.
- PATCH_DIR=${CWD}/patches/intel-qat
- for patch in $(ls ${PATCH_DIR})
- do
- echo "I: Apply Intel QAT patch: ${PATCH_DIR}/${patch}"
- patch -p1 < ${PATCH_DIR}/${patch}
- done
-
echo "I: Compile Kernel module for Intel ${DRIVER_NAME} driver"
mkdir -p ${DEBIAN_DIR}/lib/firmware ${DEBIAN_DIR}/usr/local/bin ${DEBIAN_DIR}/usr/lib/x86_64-linux-gnu ${DEBIAN_DIR}/etc/init.d
KERNEL_SOURCE_ROOT=${KERNEL_DIR} ./configure --enable-kapi --enable-qat-lkcf
@@ -66,6 +58,10 @@ do
make INSTALL_MOD_PATH=${DEBIAN_DIR} INSTALL_FW_PATH=${DEBIAN_DIR} \
qat-driver-install
+ if [ "x$?" != "x0" ]; then
+ exit 1
+ fi
+
cp build/*.bin ${DEBIAN_DIR}/lib/firmware
cp build/*.so ${DEBIAN_DIR}/usr/lib/x86_64-linux-gnu
cp build/qat_service ${DEBIAN_DIR}/etc/init.d
@@ -74,19 +70,27 @@ do
chmod 644 ${DEBIAN_DIR}/lib/firmware/*
chmod 755 ${DEBIAN_DIR}/etc/init.d/* ${DEBIAN_DIR}/usr/local/bin/*
+ if [ -f ${DEBIAN_DIR}.deb ]; then
+ rm ${DEBIAN_DIR}.deb
+ fi
+
# build Debian package
echo "I: Building Debian package vyos-intel-${DRIVER_NAME}"
+ cd ${CWD}
+
# delete non required files which are also present in the kernel package
# und thus lead to duplicated files
find ${DEBIAN_DIR} -name "modules.*" | xargs rm -f
- cd ${CWD}
- echo "#!/bin/sh" > ${DEBIAN_DIR}/vyos-intel-qat.postinst
- echo "/sbin/depmod -a ${KERNEL_VERSION}${KERNEL_SUFFIX}" >> ${DEBIAN_DIR}/vyos-intel-qat.postinst
+ echo "#!/bin/sh" > ${DEBIAN_POSTINST}
+ echo "/sbin/depmod -a ${KERNEL_VERSION}${KERNEL_SUFFIX}" >> ${DEBIAN_POSTINST}
fpm --input-type dir --output-type deb --name vyos-intel-${DRIVER_NAME} \
--version ${DRIVER_VERSION}${DRIVER_VERSION_EXTRA} --deb-compression gz \
- -C ${DEBIAN_DIR} --after-install ${DEBIAN_DIR}/vyos-intel-qat.postinst
+ --maintainer "VyOS Package Maintainers <maintainers@vyos.net>" \
+ --description "Vendor based driver for Intel ${DRIVER_NAME}" \
+ --depends linux-image-${KERNEL_VERSION}${KERNEL_SUFFIX} \
+ --license "GPL2" -C ${DEBIAN_DIR} --after-install ${DEBIAN_POSTINST}
echo "I: Cleanup ${DRIVER_NAME} source"
cd ${CWD}