From 9347311ca444c3128653c96f9f2845713c646fa7 Mon Sep 17 00:00:00 2001 From: Robert Yang Date: Mon, 20 Apr 2015 01:09:20 -0700 Subject: cryptodev: 1.6 -> 1.7 * Remove 0002-In-the-3.13-rc1-Linux-kernel-the-INIT_COMPLETION-mac.patch since it was a backported patch. * Updated 0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch. Signed-off-by: Robert Yang Signed-off-by: Richard Purdie --- .../cryptodev/cryptodev-linux_1.6.bb | 15 ---- .../cryptodev/cryptodev-linux_1.7.bb | 13 ++++ .../cryptodev/cryptodev-module_1.6.bb | 19 ----- .../cryptodev/cryptodev-module_1.7.bb | 18 +++++ .../cryptodev/cryptodev-tests_1.6.bb | 23 ------ .../cryptodev/cryptodev-tests_1.7.bb | 23 ++++++ meta/recipes-kernel/cryptodev/cryptodev_1.6.inc | 13 ---- meta/recipes-kernel/cryptodev/cryptodev_1.7.inc | 13 ++++ ...pile-and-install-rules-for-cryptodev-test.patch | 23 +++--- ...-rc1-Linux-kernel-the-INIT_COMPLETION-mac.patch | 86 ---------------------- 10 files changed, 77 insertions(+), 169 deletions(-) delete mode 100644 meta/recipes-kernel/cryptodev/cryptodev-linux_1.6.bb create mode 100644 meta/recipes-kernel/cryptodev/cryptodev-linux_1.7.bb delete mode 100644 meta/recipes-kernel/cryptodev/cryptodev-module_1.6.bb create mode 100644 meta/recipes-kernel/cryptodev/cryptodev-module_1.7.bb delete mode 100644 meta/recipes-kernel/cryptodev/cryptodev-tests_1.6.bb create mode 100644 meta/recipes-kernel/cryptodev/cryptodev-tests_1.7.bb delete mode 100644 meta/recipes-kernel/cryptodev/cryptodev_1.6.inc create mode 100644 meta/recipes-kernel/cryptodev/cryptodev_1.7.inc delete mode 100644 meta/recipes-kernel/cryptodev/files/0002-In-the-3.13-rc1-Linux-kernel-the-INIT_COMPLETION-mac.patch diff --git a/meta/recipes-kernel/cryptodev/cryptodev-linux_1.6.bb b/meta/recipes-kernel/cryptodev/cryptodev-linux_1.6.bb deleted file mode 100644 index 43f58f311c..0000000000 --- a/meta/recipes-kernel/cryptodev/cryptodev-linux_1.6.bb +++ /dev/null @@ -1,15 +0,0 @@ -require cryptodev_${PV}.inc - -SUMMARY = "A /dev/crypto device driver header file" - -do_compile() { - : -} - -# 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" -BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-kernel/cryptodev/cryptodev-linux_1.7.bb b/meta/recipes-kernel/cryptodev/cryptodev-linux_1.7.bb new file mode 100644 index 0000000000..a33841d091 --- /dev/null +++ b/meta/recipes-kernel/cryptodev/cryptodev-linux_1.7.bb @@ -0,0 +1,13 @@ +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" +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-kernel/cryptodev/cryptodev-module_1.6.bb b/meta/recipes-kernel/cryptodev/cryptodev-module_1.6.bb deleted file mode 100644 index e6b10257f0..0000000000 --- a/meta/recipes-kernel/cryptodev/cryptodev-module_1.6.bb +++ /dev/null @@ -1,19 +0,0 @@ -require cryptodev_${PV}.inc - -SUMMARY = "A /dev/crypto device driver kernel module" - -inherit module - -# Header file provided by a separate package -DEPENDS += "cryptodev-linux" - -SRC_URI += " \ -file://0001-Disable-installing-header-file-provided-by-another-p.patch \ -file://0002-In-the-3.13-rc1-Linux-kernel-the-INIT_COMPLETION-mac.patch \ -file://0001-ioctl.c-Fix-build-on-3.19.patch \ -" - -EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"' - -RCONFLICTS_${PN} = "ocf-linux" -RREPLACES_${PN} = "ocf-linux" diff --git a/meta/recipes-kernel/cryptodev/cryptodev-module_1.7.bb b/meta/recipes-kernel/cryptodev/cryptodev-module_1.7.bb new file mode 100644 index 0000000000..5cd52eb871 --- /dev/null +++ b/meta/recipes-kernel/cryptodev/cryptodev-module_1.7.bb @@ -0,0 +1,18 @@ +require cryptodev_${PV}.inc + +SUMMARY = "A /dev/crypto device driver kernel module" + +inherit module + +# Header file provided by a separate package +DEPENDS += "cryptodev-linux" + +SRC_URI += " \ +file://0001-Disable-installing-header-file-provided-by-another-p.patch \ +file://0001-ioctl.c-Fix-build-on-3.19.patch \ +" + +EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"' + +RCONFLICTS_${PN} = "ocf-linux" +RREPLACES_${PN} = "ocf-linux" diff --git a/meta/recipes-kernel/cryptodev/cryptodev-tests_1.6.bb b/meta/recipes-kernel/cryptodev/cryptodev-tests_1.6.bb deleted file mode 100644 index efc41ae427..0000000000 --- a/meta/recipes-kernel/cryptodev/cryptodev-tests_1.6.bb +++ /dev/null @@ -1,23 +0,0 @@ -require cryptodev_${PV}.inc - -SUMMARY = "A test suite for /dev/crypto device driver" - -DEPENDS += "openssl" - -SRC_URI += " \ -file://0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch \ -file://0002-Fix-tests-Makefile-usage-of-LDLIBS-vs.-LDFLAGS.patch \ -" - -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/meta/recipes-kernel/cryptodev/cryptodev-tests_1.7.bb b/meta/recipes-kernel/cryptodev/cryptodev-tests_1.7.bb new file mode 100644 index 0000000000..efc41ae427 --- /dev/null +++ b/meta/recipes-kernel/cryptodev/cryptodev-tests_1.7.bb @@ -0,0 +1,23 @@ +require cryptodev_${PV}.inc + +SUMMARY = "A test suite for /dev/crypto device driver" + +DEPENDS += "openssl" + +SRC_URI += " \ +file://0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch \ +file://0002-Fix-tests-Makefile-usage-of-LDLIBS-vs.-LDFLAGS.patch \ +" + +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/meta/recipes-kernel/cryptodev/cryptodev_1.6.inc b/meta/recipes-kernel/cryptodev/cryptodev_1.6.inc deleted file mode 100644 index 6a93a35a39..0000000000 --- a/meta/recipes-kernel/cryptodev/cryptodev_1.6.inc +++ /dev/null @@ -1,13 +0,0 @@ -HOMEPAGE = "http://cryptodev-linux.org/" - -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] = "eade38998313c25fd7934719cdf8a2ea" -SRC_URI[sha256sum] = "75f1425c8ea1f8cae523905a5a046a35092327a6152800b0b86efc4e56fb3e2f" - -S = "${WORKDIR}/cryptodev-linux-${PV}" - -CLEANBROKEN = "1" diff --git a/meta/recipes-kernel/cryptodev/cryptodev_1.7.inc b/meta/recipes-kernel/cryptodev/cryptodev_1.7.inc new file mode 100644 index 0000000000..cca69254cb --- /dev/null +++ b/meta/recipes-kernel/cryptodev/cryptodev_1.7.inc @@ -0,0 +1,13 @@ +HOMEPAGE = "http://cryptodev-linux.org/" + +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" + +S = "${WORKDIR}/cryptodev-linux-${PV}" + +CLEANBROKEN = "1" diff --git a/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch b/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch index cb871f6b44..3f0298b0b0 100644 --- a/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch +++ b/meta/recipes-kernel/cryptodev/files/0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch @@ -15,12 +15,12 @@ Upstream-Status: Pending 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/Makefile b/Makefile -index 2be8825..4cbb865 100644 +index 31c4b3f..2ecf2a9 100644 --- a/Makefile +++ b/Makefile -@@ -17,6 +17,9 @@ install: - @echo "Installing cryptodev.h in /usr/include/crypto ..." - @install -D crypto/cryptodev.h /usr/include/crypto/cryptodev.h +@@ -34,6 +34,9 @@ modules_install: + @echo "Installing cryptodev.h in $(PREFIX)/usr/include/crypto ..." + @install -D crypto/cryptodev.h $(PREFIX)/usr/include/crypto/cryptodev.h +install_tests: + make -C tests install DESTDIR=$(PREFIX) @@ -28,18 +28,18 @@ index 2be8825..4cbb865 100644 clean: make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean rm -f $(hostprogs) *~ -@@ -25,6 +28,9 @@ clean: +@@ -42,6 +45,9 @@ clean: check: - KERNEL_DIR=$(KERNEL_DIR) make -C tests check + CFLAGS=$(CRYPTODEV_CFLAGS) KERNEL_DIR=$(KERNEL_DIR) make -C tests check +testprogs: + KERNEL_DIR=$(KERNEL_DIR) make -C tests testprogs + - FILEBASE = cryptodev-linux-$(VERSION) - TMPDIR ?= /tmp - OUTPUT = $(FILEBASE).tar.gz + CPOPTS = + ifneq (${SHOW_TYPES},) + CPOPTS += --show-types diff --git a/tests/Makefile b/tests/Makefile -index 87ca3c7..0488cf6 100644 +index c9f04e8..cd202af 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -19,6 +19,12 @@ example-async-hmac-objs := async_hmac.o @@ -64,6 +64,3 @@ index 87ca3c7..0488cf6 100644 clean: rm -f *.o *~ $(hostprogs) --- -1.7.5.4 - diff --git a/meta/recipes-kernel/cryptodev/files/0002-In-the-3.13-rc1-Linux-kernel-the-INIT_COMPLETION-mac.patch b/meta/recipes-kernel/cryptodev/files/0002-In-the-3.13-rc1-Linux-kernel-the-INIT_COMPLETION-mac.patch deleted file mode 100644 index c5c7ec75f9..0000000000 --- a/meta/recipes-kernel/cryptodev/files/0002-In-the-3.13-rc1-Linux-kernel-the-INIT_COMPLETION-mac.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 57b5544de80db85c8955499831fdaa30829db77a Mon Sep 17 00:00:00 2001 -From: Cosmin Paraschiv -Date: Thu, 23 Jan 2014 03:40:00 +0100 -Subject: [PATCH] In the 3.13-rc1 Linux kernel, the INIT_COMPLETION macro has - been replaced with an inline function, reinit_completion [1][2]. We are - currently using the 3.13-rc3 Linux kernel, which leads to the following - error: - -cryptlib.c:279:2: error: implicit declaration of function 'INIT_COMPLETION' [-Werror=implicit-function-declaration] - INIT_COMPLETION(cdata->async.result->completion); - -[1] https://github.com/torvalds/linux/commit/c32f74ab2872994bc8336ed367313da3139350ca -[2] https://github.com/torvalds/linux/commit/62026aedaacedbe1ffe94a3599ad4acd8ecdf587 - -Signed-off-by: Cosmin Paraschiv -Reviewed-by: Cristian Stoica -Tested-by: Cristian Stoica -Signed-off-by: Horia Geanta -Signed-off-by: Phil Sutter - -Upstream-Status: Backport ---- - cryptlib.c | 8 ++++---- - cryptodev_int.h | 6 ++++++ - 2 files changed, 10 insertions(+), 4 deletions(-) - -diff --git a/cryptlib.c b/cryptlib.c -index 54d5d41..a923c14 100644 ---- a/cryptlib.c -+++ b/cryptlib.c -@@ -217,7 +217,7 @@ ssize_t cryptodev_cipher_encrypt(struct cipher_data *cdata, - { - int ret; - -- INIT_COMPLETION(cdata->async.result->completion); -+ reinit_completion(&cdata->async.result->completion); - - if (cdata->aead == 0) { - ablkcipher_request_set_crypt(cdata->async.request, -@@ -240,7 +240,7 @@ ssize_t cryptodev_cipher_decrypt(struct cipher_data *cdata, - { - int ret; - -- INIT_COMPLETION(cdata->async.result->completion); -+ reinit_completion(&cdata->async.result->completion); - if (cdata->aead == 0) { - ablkcipher_request_set_crypt(cdata->async.request, - (struct scatterlist *)src, dst, -@@ -351,7 +351,7 @@ ssize_t cryptodev_hash_update(struct hash_data *hdata, - { - int ret; - -- INIT_COMPLETION(hdata->async.result->completion); -+ reinit_completion(&hdata->async.result->completion); - ahash_request_set_crypt(hdata->async.request, sg, NULL, len); - - ret = crypto_ahash_update(hdata->async.request); -@@ -363,7 +363,7 @@ int cryptodev_hash_final(struct hash_data *hdata, void* output) - { - int ret; - -- INIT_COMPLETION(hdata->async.result->completion); -+ reinit_completion(&hdata->async.result->completion); - ahash_request_set_crypt(hdata->async.request, NULL, output, 0); - - ret = crypto_ahash_final(hdata->async.request); -diff --git a/cryptodev_int.h b/cryptodev_int.h -index 12dd5b1..188063d 100644 ---- a/cryptodev_int.h -+++ b/cryptodev_int.h -@@ -2,6 +2,12 @@ - #ifndef CRYPTODEV_INT_H - # define CRYPTODEV_INT_H - -+#include -+ -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)) -+# define reinit_completion(x) INIT_COMPLETION(*(x)) -+#endif -+ - #include - #include - #include --- -1.9.1 - -- cgit 1.2.3-korg