Upversion QAT to hardware version 2.2 (release QAT22.L.1.0.0-00001). This version adds support for QAT 420xx devices and is public available at [1]. The following patches were dropped as the new source version incorporates these changes: - 0003-qat-rename-invalidate_range-notifier.patch - 0004-qat-Adapt-qat-drivers-with-linux-6.12.x.patch Test Plan: PASS: Fresh install PASS: cpa_sample_code can run successfully [1] https://www.intel.com.br/content/www/us/en/download/861192/intel-quickassist-technology-driver-for-linux-hw-version-2-2.html Story: 2011471 Task: 52274 Change-Id: I69cdd96970df6c267f895be3733665f6f79e22b2 Signed-off-by: Alyson Deives Pereira <alyson.deivespereira@windriver.com>
160 lines
6.8 KiB
Makefile
Executable File
160 lines
6.8 KiB
Makefile
Executable File
#!/usr/bin/make -f
|
|
#
|
|
# Copyright (c) 2022-2025 Wind River Systems, Inc.
|
|
#
|
|
# Licensed to the Apache Software Foundation (ASF) under one
|
|
# or more contributor license agreements. The ASF licenses this
|
|
# file to you under the Apache License, Version 2.0 (the
|
|
# "License"); you may not use this file except in compliance
|
|
# with the License. You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing,
|
|
# software distributed under the License is distributed on an
|
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
# KIND, either express or implied. See the License for the
|
|
# specific language governing permissions and limitations
|
|
# under the License.
|
|
#
|
|
|
|
# output every command that modifies files on the build system.
|
|
#export DH_VERBOSE = 1
|
|
|
|
%:
|
|
dh $@
|
|
|
|
WITH_MOD_SIGN ?= 1
|
|
export DEB_BUILD_OPTIONS=noddebs
|
|
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
|
|
|
|
kheaders_name=$(shell ls /usr/src | grep linux@KERNEL_TYPE@-headers | grep amd64)
|
|
export KERNEL_SOURCE_ROOT=/usr/src/$(kheaders_name)
|
|
kernel_version=$(shell echo $(kheaders_name) | sed 's/linux@KERNEL_TYPE@-headers-//g')
|
|
pkg_name=qat2.2.l@KERNEL_TYPE@
|
|
pkg_name_common=qat2.2.l-common
|
|
pkg_name_dev=qat2.2.l-dev
|
|
|
|
qat_src_dir=./
|
|
_sysconfdir=/etc/
|
|
_sbindir=/usr/sbin
|
|
_libdir=/usr/lib/$(DEB_HOST_MULTIARCH)
|
|
_qatsrcdir=/usr/src/qat/quickassist
|
|
buildroot=./debian/$(pkg_name)/
|
|
_qatcryptodir=/lookaside/access_layer/src/common/crypto/kpt/crypto
|
|
_qatdatadir=/usr/local/share/qat
|
|
export SAMPLE_CODE_CORPUS_PATH=$(_qatdatadir)
|
|
|
|
ifeq ($(WITH_MOD_SIGN),1)
|
|
_keydir ?= /usr/src/kernels/$(kernel_version)/
|
|
privkey ?= $(_keydir)/signing_key.pem
|
|
pubkey ?= $(_keydir)/signing_key.x509
|
|
endif
|
|
|
|
override_dh_auto_configure:
|
|
# The ./configure script parameters were acquired via the use of
|
|
# dh_auto_configure -- --enable-icp-sriov=host
|
|
# and looking at the build logs.
|
|
#
|
|
# dh_auto_configure passes to ./configure the --runstatedir=/run
|
|
# argument, but this is not supported by QAT's ./configure script.
|
|
# Hence, use a manually prepared ./configure command line.
|
|
./configure \
|
|
--build=$(DEB_HOST_MULTIARCH) --prefix=/usr --includedir="\$${prefix}/include" --mandir="\$${prefix}/share/man" \
|
|
--infodir="\$${prefix}/share/info" --sysconfdir=/etc --localstatedir=/var --libdir="\$${prefix}/lib/$(DEB_HOST_MULTIARCH)" \
|
|
--enable-icp-sriov=host --enable-legacy-algorithms
|
|
|
|
override_dh_auto_build:
|
|
$(MAKE)
|
|
$(MAKE) sample-all
|
|
|
|
override_dh_auto_install:
|
|
dh_installdirs -p$(pkg_name_common) $(_sysconfdir)default
|
|
install -m 750 ./debian/extra/qat debian/$(pkg_name_common)$(_sysconfdir)default
|
|
|
|
dh_installdirs -p$(pkg_name_common) $(_sysconfdir)qat/conf_files
|
|
install -m 640 $(qat_src_dir)build/*.conf debian/$(pkg_name_common)$(_sysconfdir)qat/conf_files
|
|
install -m 640 $(qat_src_dir)build/*.vm debian/$(pkg_name_common)$(_sysconfdir)qat/conf_files
|
|
|
|
dh_installdirs -p$(pkg_name_common) $(_sysconfdir)qat/script_files
|
|
install -m 750 $(qat_src_dir)*.sh debian/$(pkg_name_common)$(_sysconfdir)qat/script_files
|
|
|
|
dh_installdirs -p$(pkg_name_common) $(_sbindir)
|
|
install -m 750 $(qat_src_dir)build/adf_ctl debian/$(pkg_name_common)$(_sbindir)
|
|
|
|
dh_installdirs -p$(pkg_name_common) $(_sysconfdir)init.d/
|
|
install -m 750 $(qat_src_dir)quickassist/build_system/build_files/qat_service debian/$(pkg_name_common)$(_sysconfdir)init.d/
|
|
|
|
dh_installdirs -p$(pkg_name_common) $(_libdir)
|
|
install -m 750 $(qat_src_dir)build/*.so debian/$(pkg_name_common)$(_libdir)
|
|
|
|
set -e; for lib in debian/$(pkg_name_common)$(_libdir)/*.so; do \
|
|
test -f "$${lib}" || continue; \
|
|
lib_base="$$(basename -- "$${lib}")"; \
|
|
\
|
|
mv -v "$${lib}" "$${lib}.0"; \
|
|
ln -vs "$${lib_base}.0" "$${lib}"; \
|
|
done
|
|
|
|
dh_installdirs -p$(pkg_name) lib/modules/$(kernel_version)/kernel/drivers/crypto/qat/
|
|
install -m 750 $(qat_src_dir)build/*qat*.ko $(buildroot)lib/modules/$(kernel_version)/kernel/drivers/crypto/qat/
|
|
install -m 750 $(qat_src_dir)build/usdm_drv.ko $(buildroot)lib/modules/$(kernel_version)/kernel/drivers/crypto/qat
|
|
|
|
# intel test sample
|
|
dh_installdirs -p$(pkg_name_common) $(_sbindir)
|
|
install -m 750 $(qat_src_dir)quickassist/lookaside/access_layer/src/sample_code/build/cpa_sample_code debian/$(pkg_name_common)$(_sbindir)/
|
|
|
|
# test sample data files
|
|
dh_installdirs -p$(pkg_name_common) $(_qatdatadir)
|
|
install -m 750 $(qat_src_dir)quickassist/lookaside/access_layer/src/sample_code/performance/compression/calgary debian/$(pkg_name_common)$(_qatdatadir)/
|
|
install -m 750 $(qat_src_dir)quickassist/lookaside/access_layer/src/sample_code/performance/compression/calgary32 debian/$(pkg_name_common)$(_qatdatadir)/
|
|
install -m 750 $(qat_src_dir)quickassist/lookaside/access_layer/src/sample_code/performance/compression/canterbury debian/$(pkg_name_common)$(_qatdatadir)/
|
|
|
|
# device firmware
|
|
# install to the updates directory so this firmware will get grabbed ahead of
|
|
# anything supplied by the linux-firmware package
|
|
dh_installdirs -p$(pkg_name_common) /usr/lib/firmware/updates
|
|
install -m 640 $(qat_src_dir)build/*.bin debian/$(pkg_name_common)/usr/lib/firmware/updates
|
|
|
|
# Add the driver's header files for qatzip's configuration. We use
|
|
# /usr/src/qat/quickassist (i.e., _qatsrcdir) instead of /usr/include,
|
|
# because qatlib also installs similar headers to /usr/include, and we
|
|
# would like to avoid conflicts. Note that the qatzip build uses the
|
|
# headers in /usr/src/qat/quickassist (_qatsrcdir).
|
|
dh_installdirs -p$(pkg_name_dev) $(_qatsrcdir)/include
|
|
install -m 640 $(qat_src_dir)quickassist/include/*.h debian/$(pkg_name_dev)$(_qatsrcdir)/include
|
|
|
|
dh_installdirs -p$(pkg_name_dev) $(_qatsrcdir)/include/dc
|
|
install -m 640 $(qat_src_dir)quickassist/include/dc/*.h debian/$(pkg_name_dev)$(_qatsrcdir)/include/dc
|
|
|
|
dh_installdirs -p$(pkg_name_dev) $(_qatsrcdir)/include/lac
|
|
install -m 640 $(qat_src_dir)quickassist/include/lac/*.h debian/$(pkg_name_dev)$(_qatsrcdir)/include/lac
|
|
|
|
dh_installdirs -p$(pkg_name_dev) $(_qatsrcdir)/utilities/libusdm_drv
|
|
install -m 640 $(qat_src_dir)quickassist/utilities/libusdm_drv/*.h debian/$(pkg_name_dev)$(_qatsrcdir)/utilities/libusdm_drv
|
|
|
|
dh_installdirs -p$(pkg_name_dev) $(_qatsrcdir)/lookaside/access_layer/include
|
|
install -m 640 $(qat_src_dir)quickassist/lookaside/access_layer/include/icp_sal_versions.h debian/$(pkg_name_dev)$(_qatsrcdir)/include/qat
|
|
install -m 640 $(qat_src_dir)quickassist/lookaside/access_layer/include/*.h debian/$(pkg_name_dev)$(_qatsrcdir)/lookaside/access_layer/include
|
|
|
|
dh_installdirs -p$(pkg_name_dev) $(_qatsrcdir)${_qatcryptodir}
|
|
install -m 640 $(qat_src_dir)quickassist${_qatcryptodir}/*.c debian/$(pkg_name_dev)$(_qatsrcdir)${_qatcryptodir}
|
|
|
|
override_dh_strip:
|
|
dh_strip
|
|
find debian -name '*.ko' | xargs strip -g
|
|
ifeq ($(WITH_MOD_SIGN),1)
|
|
@echo "Sign the modules!"
|
|
./debian/sign_modules $(buildroot) $(privkey) $(pubkey)
|
|
endif
|
|
|
|
override_dh_auto_test:
|
|
true
|
|
|
|
override_dh_dwz:
|
|
true
|
|
|
|
override_dh_usrlocal:
|
|
true
|
|
|