On Fri, 2023-12-08 at 00:34 +0800, Yongxin Liu wrote:
> QATlib provides user space libraries that allow access to Intel
> QuickAssist
> devices and expose the Intel QuickAssist APIs and samples.
>
> Supported hardware:
> 4xxx (QAT gen 4 devices)
>
> Usage of QATlib:
> 1) Enable Intel IOMMU with intel_iommu=on in kernel boot cmdline.
> 2) Driver qat_4xxx and vfio-pci from kernel.
> 3) Firmware qat_4xxx.bin and qat_4xxx_mmp.bin in /lib/firmware from
> upstream.
> 4) Installed qatlib, qatlib-dev and qatlib-samples in your target
> image.
> 4) Enabled /lib/systemd/system/qat.service.
> 5) Run samples, such as cpa_sample_code.
>
> Tested with kernel v6.1.62 and systemd installed on target.
>
> Signed-off-by: Yongxin Liu <[email protected]>
> ---
> recipes-extended/qatlib/qatlib_git.bb | 64
> +++++++++++++++++++++++++++
> 1 file changed, 64 insertions(+)
> create mode 100644 recipes-extended/qatlib/qatlib_git.bb
>
> diff --git a/recipes-extended/qatlib/qatlib_git.bb b/recipes-
> extended/qatlib/qatlib_git.bb
> new file mode 100644
> index 0000000..1b7dca3
> --- /dev/null
> +++ b/recipes-extended/qatlib/qatlib_git.bb
> @@ -0,0 +1,64 @@
> +DESCRIPTION = "Intel QuickAssist Technology Library (QATlib)"
> +HOMEPAGE = "https://github.com/intel/qatlib"
> +
> +LICENSE = "BSD-3-Clause"
> +LIC_FILES_CHKSUM =
> "file://LICENSE;md5=64dc5eee9d532c8a1633bb63ed0d1aac"
> +
> +COMPATIBLE_MACHINE = "null"
> +COMPATIBLE_HOST:x86-x32 = 'null'
> +COMPATIBLE_HOST:libc-musl:class-target = 'null'
> +
> +SRC_URI =
> "git://github.com/intel/qatlib.git;protocol=https;branch=main"
> +SRCREV = "142e305970ec66a860945d20bb7c330f99ed900b"
> +
> +PV = "23.11.0+git${SRCPV}"
This is exactly the 23.11.0 version so this should go in recipe name.
> +
> +S = "${WORKDIR}/git"
> +
> +inherit autotools-brokensep systemd useradd
> +
> +DEPENDS = "openssl zlib nasm-native"
> +
> +USERADD_PACKAGES = "${PN}"
> +GROUPADD_PARAM:${PN} = "qat"
> +
> +SYSTEMD_SERVICE:${PN} = "qat.service"
> +SYSTEMD_AUTO_ENABLE = "enable"
This is default so can be skipped.
> +
> +# The systemd unit path "/lib/systemd/system" cannot be correctly
> passed to build system of QATlib. So hardcode here.
> +# Checking "cross_compiling" is not smart and sometimes causes fatal
> error due to wrong path of ELF file interpreter.
> +EXTRA_OECONF += "--enable-service
> systemdsystemunitdir=${systemd_unitdir}/system cross_compiling=yes"
This can be systemd_system_unitdir. Also, --enable-service should be
removed to ensure systemctl is not invoked at build time.
> +
> +do_compile:append () {
> + oe_runmake samples
> +}
> +
> +do_install () {
> + export DESTDIR=${D}
> + oe_runmake install-exec
> + oe_runmake install-dist_systemd_scriptsSCRIPTS
> + oe_runmake install-man
> + oe_runmake install-pkgincludeHEADERS
> + oe_runmake samples-install
> +
> + install -d ${D}${systemd_unitdir}/system
> + install -m 0644 quickassist/utilities/service/qat.service
> ${D}${systemd_unitdir}/system
I dont think any of this should be required.
> +}
> +
> +FILES:${PN}-dbg = "${bindir}/.debug/* \
> + ${libdir}/.debug/* \
> + ${sbindir}/.debug/* \
> + "
> +
> +FILES:${PN}-doc = "${datadir}/man"
> +
> +FILES:${PN}-staticdev = "${includedir}/qat/* \
Headers should go in -dev.
> + ${libdir}/*.a \
> + "
> +
> +FILES:${PN} = "${sbindir} \
> + ${libdir}/*.so* \
> + ${datadir}/qat \
> + ${systemd_unitdir}/system \
> + ${bindir}/*sample* \
> + "
Almost all this is default so can be removed.
I have made all these changes and compared the build output. It looked
same so I have merged the patch with these changes.
If you see any issue, please send a separate change.
Thanks,
Anuj
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#8189):
https://lists.yoctoproject.org/g/meta-intel/message/8189
Mute This Topic: https://lists.yoctoproject.org/mt/103037555/21656
Group Owner: [email protected]
Unsubscribe:
https://lists.yoctoproject.org/g/meta-intel/leave/6694807/21656/1869269227/xyzzy
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-