From e3956ffbc217e468e26c9ce2e8932d3720fabca4 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Mon, 20 Jun 2016 14:36:49 +0800 Subject: cryptodev: rename to cryptodev-qoriq The QorIQ version of cryptodev needs to use another recipe name and have a common provider, which is than choosen for QorIQ-based machines. Signed-off-by: Ting Liu --- conf/machine/include/qoriq.inc | 6 +-- recipes-kernel/cryptodev/cryptodev-linux_1.7.bb | 12 ----- recipes-kernel/cryptodev/cryptodev-module_1.7.bb | 10 ---- .../cryptodev/cryptodev-qoriq-linux_1.7.bb | 16 ++++++ .../cryptodev/cryptodev-qoriq-module_1.7.bb | 14 +++++ .../cryptodev/cryptodev-qoriq-tests_1.7.bb | 21 ++++++++ recipes-kernel/cryptodev/cryptodev-qoriq_1.7.inc | 62 ++++++++++++++++++++++ recipes-kernel/cryptodev/cryptodev-tests_1.7.bb | 17 ------ recipes-kernel/cryptodev/cryptodev_1.7.inc | 53 ------------------ 9 files changed, 116 insertions(+), 95 deletions(-) delete mode 100644 recipes-kernel/cryptodev/cryptodev-linux_1.7.bb delete mode 100644 recipes-kernel/cryptodev/cryptodev-module_1.7.bb create mode 100644 recipes-kernel/cryptodev/cryptodev-qoriq-linux_1.7.bb create mode 100644 recipes-kernel/cryptodev/cryptodev-qoriq-module_1.7.bb create mode 100644 recipes-kernel/cryptodev/cryptodev-qoriq-tests_1.7.bb create mode 100644 recipes-kernel/cryptodev/cryptodev-qoriq_1.7.inc delete mode 100644 recipes-kernel/cryptodev/cryptodev-tests_1.7.bb delete mode 100644 recipes-kernel/cryptodev/cryptodev_1.7.inc diff --git a/conf/machine/include/qoriq.inc b/conf/machine/include/qoriq.inc index f99f4e7..84b5abb 100644 --- a/conf/machine/include/qoriq.inc +++ b/conf/machine/include/qoriq.inc @@ -3,12 +3,12 @@ PREFERRED_PROVIDER_virtual/kernel ?= "linux-qoriq" PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-qoriq" PREFERRED_PROVIDER_u-boot ?= "u-boot-qoriq" +PREFERRED_PROVIDER_cryptodev-linux = "cryptodev-qoriq-linux" +PREFERRED_PROVIDER_cryptodev-module = "cryptodev-qoriq-module" +PREFERRED_PROVIDER_cryptodev-tests = "cryptodev-qoriq-tests" PREFERRED_VERSION_qemu = "2.4.0+fsl" PREFERRED_VERSION_openssl = "1.0.1i" -PREFERRED_VERSION_cryptodev-linux = "1.7" -PREFERRED_VERSION_cryptodev-module = "1.7" -PREFERRED_VERSION_cryptodev-tests = "1.7" MACHINE_FEATURES = "keyboard pci ext2 ext3 serial" MACHINE_EXTRA_RRECOMMENDS += "udev-rules-qoriq kernel-modules" diff --git a/recipes-kernel/cryptodev/cryptodev-linux_1.7.bb b/recipes-kernel/cryptodev/cryptodev-linux_1.7.bb deleted file mode 100644 index 92ccd71..0000000 --- a/recipes-kernel/cryptodev/cryptodev-linux_1.7.bb +++ /dev/null @@ -1,12 +0,0 @@ -require cryptodev_${PV}.inc - -SUMMARY = "A /dev/crypto device driver header file" - -do_compile[noexec] = "1" - -# Just install cryptodev.h which is the only header file needed to be exported -do_install() { - install -D ${S}/crypto/cryptodev.h ${D}${includedir}/crypto/cryptodev.h -} - -ALLOW_EMPTY_${PN} = "1" diff --git a/recipes-kernel/cryptodev/cryptodev-module_1.7.bb b/recipes-kernel/cryptodev/cryptodev-module_1.7.bb deleted file mode 100644 index e6b1f27..0000000 --- a/recipes-kernel/cryptodev/cryptodev-module_1.7.bb +++ /dev/null @@ -1,10 +0,0 @@ -require cryptodev_${PV}.inc - -SUMMARY = "A /dev/crypto device driver kernel module" - -inherit module qoriq_build_64bit_kernel - -# Header file provided by a separate package -DEPENDS += "cryptodev-linux" - -EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"' diff --git a/recipes-kernel/cryptodev/cryptodev-qoriq-linux_1.7.bb b/recipes-kernel/cryptodev/cryptodev-qoriq-linux_1.7.bb new file mode 100644 index 0000000..58db505 --- /dev/null +++ b/recipes-kernel/cryptodev/cryptodev-qoriq-linux_1.7.bb @@ -0,0 +1,16 @@ +require cryptodev-qoriq_${PV}.inc + +SUMMARY = "A /dev/crypto device driver header file" + +PROVIDES = "cryptodev-linux" + +do_compile[noexec] = "1" + +# Just install cryptodev.h which is the only header file needed to be exported +do_install() { + install -D ${S}/crypto/cryptodev.h ${D}${includedir}/crypto/cryptodev.h +} + +ALLOW_EMPTY_${PN} = "1" + +COMPATIBLE_MACHINE = "(qoriq)" diff --git a/recipes-kernel/cryptodev/cryptodev-qoriq-module_1.7.bb b/recipes-kernel/cryptodev/cryptodev-qoriq-module_1.7.bb new file mode 100644 index 0000000..383b482 --- /dev/null +++ b/recipes-kernel/cryptodev/cryptodev-qoriq-module_1.7.bb @@ -0,0 +1,14 @@ +require cryptodev-qoriq_${PV}.inc + +SUMMARY = "A /dev/crypto device driver kernel module" + +PROVIDES = "cryptodev-module" + +inherit module qoriq_build_64bit_kernel + +# Header file provided by a separate package +DEPENDS += "cryptodev-linux" + +EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"' + +COMPATIBLE_MACHINE = "(qoriq)" diff --git a/recipes-kernel/cryptodev/cryptodev-qoriq-tests_1.7.bb b/recipes-kernel/cryptodev/cryptodev-qoriq-tests_1.7.bb new file mode 100644 index 0000000..a60ea98 --- /dev/null +++ b/recipes-kernel/cryptodev/cryptodev-qoriq-tests_1.7.bb @@ -0,0 +1,21 @@ +require cryptodev-qoriq_${PV}.inc + +SUMMARY = "A test suite for /dev/crypto device driver" +DEPENDS = "openssl" + +PROVIDES = "cryptodev-tests" + +EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"' + +do_compile() { + oe_runmake testprogs +} + +do_install() { + oe_runmake install_tests +} + +FILES_${PN}-dbg += "${bindir}/tests_cryptodev/.debug" +FILES_${PN} = "${bindir}/tests_cryptodev/*" + +COMPATIBLE_MACHINE = "(qoriq)" diff --git a/recipes-kernel/cryptodev/cryptodev-qoriq_1.7.inc b/recipes-kernel/cryptodev/cryptodev-qoriq_1.7.inc new file mode 100644 index 0000000..e4700db --- /dev/null +++ b/recipes-kernel/cryptodev/cryptodev-qoriq_1.7.inc @@ -0,0 +1,62 @@ +HOMEPAGE = "http://cryptodev-linux.org/" + +RCONFLICTS_${PN} = "ocf-linux" +RREPLACES_${PN} = "ocf-linux" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +python() { + pkgs = d.getVar('PACKAGES', True).split() + for p in pkgs: + if 'cryptodev-qoriq' in p: + d.appendVar("RPROVIDES_%s" % p, p.replace('cryptodev-qoriq', 'cryptodev')) + d.appendVar("RCONFLICTS_%s" % p, p.replace('cryptodev-qoriq', 'cryptodev')) + d.appendVar("RREPLACES_%s" % p, p.replace('cryptodev-qoriq', 'cryptodev')) +} + +SRC_URI = "http://download.gna.org/cryptodev-linux/cryptodev-linux-${PV}.tar.gz" +SRC_URI[md5sum] = "0b63b3481cf2c90386b35f057481d36b" +SRC_URI[sha256sum] = "41880533b53de4d7b3f054e230f576988dafb8eed7bef5ebcf6422bb2e3a3b25" + +# Upstream hotfixes and yocto specific patches +SRC_URI_append = " \ +file://0001-fix-compilation-against-linux-3.19.patch \ +file://0002-tests-Makefile-fix-arg-passing-to-CC-in-implicit-rul.patch \ +file://0003-Disable-installing-header-file-provided-by-another-p.patch \ +file://0004-Add-the-compile-and-install-rules-for-cryptodev-test.patch \ +" +# SDK patches +SRC_URI_append = " file://0001-add-support-for-composite-TLS10-SHA1-AES-algorithm-o.patch \ +file://0002-add-support-for-COMPAT_CIOCAUTHCRYPT-ioctl.patch \ +file://0003-PKC-support-added-in-cryptodev-module.patch \ +file://0004-Compat-versions-of-PKC-IOCTLs.patch \ +file://0005-Asynchronous-interface-changes-in-cryptodev.patch \ +file://0006-ECC_KEYGEN-and-DLC_KEYGEN-supported-in-cryptodev-mod.patch \ +file://0007-RCU-stall-fixed-in-PKC-asynchronous-interface.patch \ +file://0008-Add-RSA-Key-generation-offloading.patch \ +file://0009-Fixed-compilation-error-of-openssl-with-fsl-cryptode.patch \ +file://0010-add-support-for-composite-TLS10-SHA1-3DES-algorithm-.patch \ +file://0011-add-support-for-TLSv1.1-record-offload.patch \ +file://0012-add-support-for-TLSv1.2-record-offload.patch \ +file://0013-clean-up-code-layout.patch \ +file://0014-remove-redundant-data-copy-for-pkc-operations.patch \ +file://0015-fix-pkc-request-deallocation.patch \ +file://0016-add-basic-detection-of-asym-features.patch \ +file://0017-remove-dead-code.patch \ +file://0018-fix-compat-warnings.patch \ +file://0019-fix-size_t-print-format.patch \ +file://0020-fix-uninitialized-variable-compiler-warning.patch \ +file://0021-check-return-codes-for-copy-to-from-user-functions.patch \ +file://0022-fix-double-free-pkc-req-on-error.patch \ +file://0023-remove-MAY_BACKLOG-flag-from-requests.patch \ +file://0024-fix-COMPAT_CIOCKEY-ioctl-command-number.patch \ +" + +# NOTE: remove this patch and all traces of DISTRO_FEATURE c29x_pkc +# if pkc-host does not need customized cryptodev patches anymore +SRC_URI_append = "${@bb.utils.contains('DISTRO_FEATURES', 'c29x_pkc', ' file://0001-don-t-advertise-RSA-keygen.patch', '', d)}" + +S = "${WORKDIR}/cryptodev-linux-${PV}" + +CLEANBROKEN = "1" diff --git a/recipes-kernel/cryptodev/cryptodev-tests_1.7.bb b/recipes-kernel/cryptodev/cryptodev-tests_1.7.bb deleted file mode 100644 index 128ccc9..0000000 --- a/recipes-kernel/cryptodev/cryptodev-tests_1.7.bb +++ /dev/null @@ -1,17 +0,0 @@ -require cryptodev_${PV}.inc - -SUMMARY = "A test suite for /dev/crypto device driver" -DEPENDS = "openssl" - -EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"' - -do_compile() { - oe_runmake testprogs -} - -do_install() { - oe_runmake install_tests -} - -FILES_${PN}-dbg += "${bindir}/tests_cryptodev/.debug" -FILES_${PN} = "${bindir}/tests_cryptodev/*" diff --git a/recipes-kernel/cryptodev/cryptodev_1.7.inc b/recipes-kernel/cryptodev/cryptodev_1.7.inc deleted file mode 100644 index 2060ce3..0000000 --- a/recipes-kernel/cryptodev/cryptodev_1.7.inc +++ /dev/null @@ -1,53 +0,0 @@ -HOMEPAGE = "http://cryptodev-linux.org/" - -RCONFLICTS_${PN} = "ocf-linux" -RREPLACES_${PN} = "ocf-linux" - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -SRC_URI = "http://download.gna.org/cryptodev-linux/cryptodev-linux-${PV}.tar.gz" -SRC_URI[md5sum] = "0b63b3481cf2c90386b35f057481d36b" -SRC_URI[sha256sum] = "41880533b53de4d7b3f054e230f576988dafb8eed7bef5ebcf6422bb2e3a3b25" - -# Upstream hotfixes and yocto specific patches -SRC_URI_append = " \ -file://0001-fix-compilation-against-linux-3.19.patch \ -file://0002-tests-Makefile-fix-arg-passing-to-CC-in-implicit-rul.patch \ -file://0003-Disable-installing-header-file-provided-by-another-p.patch \ -file://0004-Add-the-compile-and-install-rules-for-cryptodev-test.patch \ -" -# SDK patches -SRC_URI_append = " file://0001-add-support-for-composite-TLS10-SHA1-AES-algorithm-o.patch \ -file://0002-add-support-for-COMPAT_CIOCAUTHCRYPT-ioctl.patch \ -file://0003-PKC-support-added-in-cryptodev-module.patch \ -file://0004-Compat-versions-of-PKC-IOCTLs.patch \ -file://0005-Asynchronous-interface-changes-in-cryptodev.patch \ -file://0006-ECC_KEYGEN-and-DLC_KEYGEN-supported-in-cryptodev-mod.patch \ -file://0007-RCU-stall-fixed-in-PKC-asynchronous-interface.patch \ -file://0008-Add-RSA-Key-generation-offloading.patch \ -file://0009-Fixed-compilation-error-of-openssl-with-fsl-cryptode.patch \ -file://0010-add-support-for-composite-TLS10-SHA1-3DES-algorithm-.patch \ -file://0011-add-support-for-TLSv1.1-record-offload.patch \ -file://0012-add-support-for-TLSv1.2-record-offload.patch \ -file://0013-clean-up-code-layout.patch \ -file://0014-remove-redundant-data-copy-for-pkc-operations.patch \ -file://0015-fix-pkc-request-deallocation.patch \ -file://0016-add-basic-detection-of-asym-features.patch \ -file://0017-remove-dead-code.patch \ -file://0018-fix-compat-warnings.patch \ -file://0019-fix-size_t-print-format.patch \ -file://0020-fix-uninitialized-variable-compiler-warning.patch \ -file://0021-check-return-codes-for-copy-to-from-user-functions.patch \ -file://0022-fix-double-free-pkc-req-on-error.patch \ -file://0023-remove-MAY_BACKLOG-flag-from-requests.patch \ -file://0024-fix-COMPAT_CIOCKEY-ioctl-command-number.patch \ -" - -# NOTE: remove this patch and all traces of DISTRO_FEATURE c29x_pkc -# if pkc-host does not need customized cryptodev patches anymore -SRC_URI_append = "${@bb.utils.contains('DISTRO_FEATURES', 'c29x_pkc', ' file://0001-don-t-advertise-RSA-keygen.patch', '' ,d)}" - -S = "${WORKDIR}/cryptodev-linux-${PV}" - -CLEANBROKEN = "1" -- cgit v1.2.3-54-g00ecf