From 10a7d933f18c3796c431436b028cca844be12180 Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Fri, 18 Sep 2015 15:40:04 +0800 Subject: meta-isg: qat: move common content to qat16.inc * Move common meta-data from version specific recipe to inc. * Remove PV in the recipe. Signed-off-by: Anuj Mittal Signed-off-by: Saul Wold --- .../common/recipes-extended/qat/qat16_2.3.0-34.bb | 117 +-------------------- 1 file changed, 3 insertions(+), 114 deletions(-) (limited to 'meta-isg/common/recipes-extended/qat/qat16_2.3.0-34.bb') diff --git a/meta-isg/common/recipes-extended/qat/qat16_2.3.0-34.bb b/meta-isg/common/recipes-extended/qat/qat16_2.3.0-34.bb index 83ccbfb1..293323dd 100644 --- a/meta-isg/common/recipes-extended/qat/qat16_2.3.0-34.bb +++ b/meta-isg/common/recipes-extended/qat/qat16_2.3.0-34.bb @@ -1,118 +1,7 @@ -DESCRIPTION = "Intel(r) QuickAssist Technology API" -HOMEPAGE = "https://01.org/packet-processing/intel%C2%AE-quickassist-technology-drivers-and-patches" +include qat16.inc -#Dual BSD and GPLv2 License -LICENSE = "BSD & GPLv2" -LIC_FILES_CHKSUM = "\ - file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \ - file://${COMMON_LICENSE_DIR}/BSD;md5=3775480a712fc46a69647678acb234cb \ - " -PV = "2.3.0-34" -DEPENDS += "zlib openssl" -PROVIDES += "virtual/qat" - -SRC_URI="https://01.org/sites/default/files/page/qatmux.l.${PV}.tgz;name=qat \ - file://qat16_2.3.0-34-qat-add-install-target-to-makefiles.patch \ - file://qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch \ - file://qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch \ - " +SRC_URI += "file://qat16_2.3.0-34-qat-add-install-target-to-makefiles.patch \ + " SRC_URI[qat.md5sum] = "9614bf598bc8e7eedc8adb6d29109033" SRC_URI[qat.sha256sum] = "1f9708de3c132258eaa488c82760f374b6b6838c85cafef2e8c61034fe0f7031" - -COMPATIBLE_MACHINE = "crystalforest" - -S = "${WORKDIR}/${ICP_DRIVER_TYPE}" -ICP_TOOLS = "accelcomp" -SAMPLE_CODE_DIR = "${S}/quickassist/lookaside/access_layer/src/sample_code" - -export ICP_DRIVER_TYPE = "QAT1.6" -export ICP_FIRMWARE_DIR="dh895xcc" -export ICP_ROOT = "${S}" -export ICP_ENV_DIR = "${S}/quickassist/build_system/build_files/env_files" -export ICP_BUILDSYSTEM_PATH = "${S}/quickassist/build_system" -export ICP_TOOLS_TARGET = "${ICP_TOOLS}" -export FUNC_PATH = "${ICP_ROOT}/quickassist/lookaside/access_layer/src/sample_code/functional" -export KERNEL_SOURCE_ROOT = "${STAGING_KERNEL_DIR}" -export ICP_BUILD_OUTPUT = "${D}" -export DEST_LIBDIR = "${libdir}" -export DEST_BINDIR = "${bindir}" -export QAT_KERNEL_VER = "${KERNEL_VERSION}" -export SAMPLE_BUILD_OUTPUT = "${D}" -export MODULE_DIR = "${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers" - -inherit module -inherit update-rc.d -INITSCRIPT_NAME = "qat_service" - -PARALLEL_MAKE = "" - -#To get around the double slashes in paths in QAT makefiles -PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src" - -do_unpack2() { - cd ${S}/ - tar xzvf ${ICP_DRIVER_TYPE}.L.${PV}.tar.gz -} - -addtask unpack2 after do_unpack before do_patch - -do_compile () { - export LD="${LD} --hash-style=gnu" - export MACHINE="${TARGET_ARCH}" - cd ${S}/quickassist - oe_runmake EXTRA_OEMAKE="'CFLAGS=${CFLAGS} -fPIC'" - - cd ${SAMPLE_CODE_DIR} - touch ${SAMPLE_CODE_DIR}/performance/compression/calgary - touch ${SAMPLE_CODE_DIR}/performance/compression/canterbury - - #build the whole sample code: fips, functional, performance - oe_runmake 'all' - oe_runmake 'fips_user_code' -} - -do_install() { - cd ${S}/quickassist - oe_runmake install - - cd ${SAMPLE_CODE_DIR} - oe_runmake install - - install -d ${D}/etc/udev/rules.d \ - ${D}${includedir} \ - ${D}${includedir}/dc \ - ${D}${includedir}/lac \ - ${D}${sysconfdir}/dh895xcc \ - ${D}${base_libdir}/firmware - - echo 'KERNEL=="icp_adf_ctl" MODE="0600"' > ${D}/etc/udev/rules.d/00-dh895xcc_qa.rules - echo 'KERNEL=="icp_dev[0-9]*" MODE="0600"' >> ${D}/etc/udev/rules.d/00-dh895xcc_qa.rules - echo 'KERNEL=="icp_dev_mem?" MODE="0600"' >> ${D}/etc/udev/rules.d/00-dh895xcc_qa.rules - - install -m 640 ${S}/quickassist/include/*.h ${D}${includedir} - install -m 640 ${S}/quickassist/include/dc/*.h ${D}${includedir}/dc/ - install -m 640 ${S}/quickassist/include/lac/*.h ${D}${includedir}/lac/ - install -m 640 ${S}/quickassist/lookaside/access_layer/include/*.h ${D}${includedir} - - install -m 0755 ${SAMPLE_CODE_DIR}/performance/compression/calgary ${D}${base_libdir}/firmware - install -m 0755 ${SAMPLE_CODE_DIR}/performance/compression/canterbury ${D}${base_libdir}/firmware - - install -m 660 ${S}/quickassist/config/dh* ${D}${sysconfdir}/dh895xcc -} - -PACKAGES += "${PN}-app" - -FILES_${PN}-dev = "${includedir}" - -FILES_${PN} += "\ - ${base_libdir}/firmware/ \ - ${sysconfdir}/ \ - ${sysconfdir}/udev/rules.d/ \ - ${sysconfdir}/init.d/ \ - ${libdir}/ \ - " - -FILES_${PN}-dbg += "${sysconfdir}/init.d/.debug" - -FILES_${PN}-app += "${bindir}/*" -- cgit v1.2.3-54-g00ecf From 88a5f5857d56e4a8952a7cd7d215178a78161871 Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Fri, 18 Sep 2015 15:40:06 +0800 Subject: meta-isg: qat: fix strict_str* compile errors Defines strict_str* have become obsolete and removed entirely starting from kernel v3.18. This results in errors like: error: implicit declaration of function 'strict_strtoull' [-Werror=implicit-function-declaration] Replace strict_strtoull with kstrtoull to ensure qat 2.3.0-34 compiles. Signed-off-by: Anuj Mittal Signed-off-by: Saul Wold --- ...at-replace-strict_strtoull-with-kstrtoull.patch | 40 ++++++++++++++++++++++ .../common/recipes-extended/qat/qat16_2.3.0-34.bb | 1 + 2 files changed, 41 insertions(+) create mode 100644 meta-isg/common/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-replace-strict_strtoull-with-kstrtoull.patch (limited to 'meta-isg/common/recipes-extended/qat/qat16_2.3.0-34.bb') diff --git a/meta-isg/common/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-replace-strict_strtoull-with-kstrtoull.patch b/meta-isg/common/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-replace-strict_strtoull-with-kstrtoull.patch new file mode 100644 index 00000000..dee1f71a --- /dev/null +++ b/meta-isg/common/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-replace-strict_strtoull-with-kstrtoull.patch @@ -0,0 +1,40 @@ +From 4ef0e0124f73b3bc24b2f2a772d83176aaa9fb3f Mon Sep 17 00:00:00 2001 +From: Anuj Mittal +Date: Tue, 8 Sep 2015 11:53:36 +0800 +Subject: [PATCH] qat: replace strict_strtoull with kstrtoull + +Upstream-Status: Backport + +strict_strtoull() has been removed starting kernel v3.18. +Hence, replace the usage with kstrtoull(). + +Signed-off-by: Anuj Mittal +--- + .../uclo/include/linux/uclo_platform.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/quickassist/utilities/downloader/Target_CoreLibs/uclo/include/linux/uclo_platform.h b/quickassist/utilities/downloader/Target_CoreLibs/uclo/include/linux/uclo_platform.h +index a4bf903..ee3e2d8 100755 +--- a/quickassist/utilities/downloader/Target_CoreLibs/uclo/include/linux/uclo_platform.h ++++ b/quickassist/utilities/downloader/Target_CoreLibs/uclo/include/linux/uclo_platform.h +@@ -116,6 +116,9 @@ + /* 32-bit/64-bit 2.6.29 kernel does not export simple_strtoll */ + #define STR_TO_32(str, base, num, endPtr) {*(num) = (int)simple_strtol((str), &(endPtr), (base));} + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0) ++#define STR_TO_64(str, base, num, endPtr) {endPtr=NULL; if (kstrtoull((str), (base), (num))) printk("Error strtoull convert %s\n", str); } ++#else + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38) + #define STR_TO_64(str, base, num, endPtr) {endPtr=NULL; if (strict_strtoull((str), (base), (num))) printk("Error strtoull convert %s\n", str); } + #else +@@ -133,6 +136,7 @@ + } while(0) + #endif + #endif ++#endif + + int aToi(const char *pStr); + +-- +1.7.9.5 + diff --git a/meta-isg/common/recipes-extended/qat/qat16_2.3.0-34.bb b/meta-isg/common/recipes-extended/qat/qat16_2.3.0-34.bb index 293323dd..d6e9af40 100644 --- a/meta-isg/common/recipes-extended/qat/qat16_2.3.0-34.bb +++ b/meta-isg/common/recipes-extended/qat/qat16_2.3.0-34.bb @@ -1,6 +1,7 @@ include qat16.inc SRC_URI += "file://qat16_2.3.0-34-qat-add-install-target-to-makefiles.patch \ + file://qat16_2.3.0-34-qat-replace-strict_strtoull-with-kstrtoull.patch \ " SRC_URI[qat.md5sum] = "9614bf598bc8e7eedc8adb6d29109033" -- cgit v1.2.3-54-g00ecf