diff options
Diffstat (limited to 'meta/recipes-kernel/cryptodev')
12 files changed, 109 insertions, 146 deletions
diff --git a/meta/recipes-kernel/cryptodev/cryptodev-linux_1.7.bb b/meta/recipes-kernel/cryptodev/cryptodev-linux_1.12.bb index a33841d091..d5ea9d8529 100644 --- a/meta/recipes-kernel/cryptodev/cryptodev-linux_1.7.bb +++ b/meta/recipes-kernel/cryptodev/cryptodev-linux_1.12.bb @@ -1,4 +1,4 @@ -require cryptodev_${PV}.inc +require cryptodev.inc SUMMARY = "A /dev/crypto device driver header file" @@ -9,5 +9,5 @@ do_install() { install -D ${S}/crypto/cryptodev.h ${D}${includedir}/crypto/cryptodev.h } -ALLOW_EMPTY_${PN} = "1" +ALLOW_EMPTY:${PN} = "1" BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-kernel/cryptodev/cryptodev-module_1.12.bb b/meta/recipes-kernel/cryptodev/cryptodev-module_1.12.bb new file mode 100644 index 0000000000..5192cf03ed --- /dev/null +++ b/meta/recipes-kernel/cryptodev/cryptodev-module_1.12.bb @@ -0,0 +1,16 @@ +require cryptodev.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 \ + " + +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 deleted file mode 100644 index 5cd52eb871..0000000000 --- a/meta/recipes-kernel/cryptodev/cryptodev-module_1.7.bb +++ /dev/null @@ -1,18 +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://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.12.bb b/meta/recipes-kernel/cryptodev/cryptodev-tests_1.12.bb new file mode 100644 index 0000000000..c541478796 --- /dev/null +++ b/meta/recipes-kernel/cryptodev/cryptodev-tests_1.12.bb @@ -0,0 +1,22 @@ +require cryptodev.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://0001-tests-Makefile-do-not-use-Werror.patch \ +" + +EXTRA_OEMAKE='KERNEL_DIR="${STAGING_EXECPREFIXDIR}" PREFIX="${D}"' + +do_compile() { + oe_runmake testprogs +} + +do_install() { + oe_runmake install_tests +} + +FILES:${PN} = "${bindir}/*" diff --git a/meta/recipes-kernel/cryptodev/cryptodev-tests_1.7.bb b/meta/recipes-kernel/cryptodev/cryptodev-tests_1.7.bb deleted file mode 100644 index efc41ae427..0000000000 --- a/meta/recipes-kernel/cryptodev/cryptodev-tests_1.7.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.inc b/meta/recipes-kernel/cryptodev/cryptodev.inc new file mode 100644 index 0000000000..e4a7922ad1 --- /dev/null +++ b/meta/recipes-kernel/cryptodev/cryptodev.inc @@ -0,0 +1,17 @@ +HOMEPAGE = "http://cryptodev-linux.org/" +DESCRIPTION = "Cryptodev-linux is a device that allows access to Linux kernel \ +cryptographic drivers; thus allowing of userspace applications to take advantage \ +of hardware accelerators. Cryptodev-linux is implemented as a standalone \ +module that requires no dependencies other than a stock linux kernel. Its \ +API is compatible with OpenBSD's cryptodev userspace API (/dev/crypto)." + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRC_URI = "git://github.com/cryptodev-linux/cryptodev-linux;branch=master \ + " +SRCREV = "e0c25e289d6baf1d83c2b9cb523d3bc237d0c0c9" + +S = "${WORKDIR}/git" + +CLEANBROKEN = "1" diff --git a/meta/recipes-kernel/cryptodev/cryptodev_1.7.inc b/meta/recipes-kernel/cryptodev/cryptodev_1.7.inc deleted file mode 100644 index cca69254cb..0000000000 --- a/meta/recipes-kernel/cryptodev/cryptodev_1.7.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] = "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 3f0298b0b0..84fd27e681 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 @@ -14,37 +14,37 @@ Upstream-Status: Pending tests/Makefile | 8 ++++++++ 2 files changed, 14 insertions(+), 0 deletions(-) -diff --git a/Makefile b/Makefile -index 31c4b3f..2ecf2a9 100644 ---- a/Makefile -+++ b/Makefile -@@ -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 +Index: git/Makefile +=================================================================== +--- git.orig/Makefile ++++ git/Makefile +@@ -35,6 +35,9 @@ modules_install: + $(MAKE) $(KERNEL_MAKE_OPTS) modules_install + install -m 644 -D crypto/cryptodev.h $(DESTDIR)/$(includedir)/crypto/cryptodev.h +install_tests: + make -C tests install DESTDIR=$(PREFIX) + clean: - make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean + $(MAKE) $(KERNEL_MAKE_OPTS) clean rm -f $(hostprogs) *~ -@@ -42,6 +45,9 @@ clean: +@@ -43,6 +46,9 @@ clean: check: - CFLAGS=$(CRYPTODEV_CFLAGS) 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 + CPOPTS = - ifneq (${SHOW_TYPES},) + ifneq ($(SHOW_TYPES),) CPOPTS += --show-types -diff --git a/tests/Makefile b/tests/Makefile -index c9f04e8..cd202af 100644 ---- a/tests/Makefile -+++ b/tests/Makefile -@@ -19,6 +19,12 @@ example-async-hmac-objs := async_hmac.o - example-async-speed-objs := async_speed.o - example-hashcrypt-speed-objs := hashcrypt_speed.c +Index: git/tests/Makefile +=================================================================== +--- git.orig/tests/Makefile ++++ git/tests/Makefile +@@ -23,6 +23,12 @@ bindir = $(execprefix)/bin + + all: $(hostprogs) +install: + install -d $(DESTDIR)/usr/bin/tests_cryptodev @@ -55,9 +55,9 @@ index c9f04e8..cd202af 100644 check: $(hostprogs) ./cipher ./hmac -@@ -28,6 +34,8 @@ check: $(hostprogs) - ./cipher-gcm - ./cipher-aead +@@ -38,6 +44,8 @@ install: + install -m 755 $$prog $(DESTDIR)/$(bindir); \ + done +testprogs: $(hostprogs) + diff --git a/meta/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch b/meta/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch index a580fc68e1..885b5823e4 100644 --- a/meta/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch +++ b/meta/recipes-kernel/cryptodev/files/0001-Disable-installing-header-file-provided-by-another-p.patch @@ -7,22 +7,18 @@ Signed-off-by: Denys Dmytriyenko <denys@ti.com> Upstream-Status: Inappropriate [ OE specific ] --- - Makefile | 2 -- - 1 file changed, 2 deletions(-) + Makefile | 1 - + 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile -index d66ef26..8e97c6a 100644 +index 5a080e0..bf02396 100644 --- a/Makefile +++ b/Makefile -@@ -23,8 +23,6 @@ install: modules_install +@@ -33,7 +33,6 @@ install: modules_install modules_install: - make -C $(KERNEL_DIR) SUBDIRS=`pwd` modules_install -- @echo "Installing cryptodev.h in $(PREFIX)/usr/include/crypto ..." -- @install -D crypto/cryptodev.h $(PREFIX)/usr/include/crypto/cryptodev.h + $(MAKE) $(KERNEL_MAKE_OPTS) modules_install +- install -m 644 -D crypto/cryptodev.h $(DESTDIR)/$(includedir)/crypto/cryptodev.h clean: - make -C $(KERNEL_DIR) SUBDIRS=`pwd` clean --- -1.9.1 - + $(MAKE) $(KERNEL_MAKE_OPTS) clean diff --git a/meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-on-3.19.patch b/meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-on-3.19.patch deleted file mode 100644 index 74c8972536..0000000000 --- a/meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-on-3.19.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 7d71124991030f99965e6e6aaed421115f185adb Mon Sep 17 00:00:00 2001 -From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> -Date: Mon, 9 Feb 2015 13:51:56 +0100 -Subject: [PATCH] ioctl.c: Fix build on 3.19 - -get_unused_fd() MACRO has been removed on kernel 3.19. Replace by the -actual output of the macro. - -Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> ---- - ioctl.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ioctl.c b/ioctl.c -index f26cf93..cf8cc17 100644 ---- a/ioctl.c -+++ b/ioctl.c -@@ -529,7 +529,7 @@ static int - clonefd(struct file *filp) - { - int ret; -- ret = get_unused_fd(); -+ ret = get_unused_fd_flags(0); - if (ret >= 0) { - get_file(filp); - fd_install(ret, filp); --- -2.1.4 - diff --git a/meta/recipes-kernel/cryptodev/files/0001-tests-Makefile-do-not-use-Werror.patch b/meta/recipes-kernel/cryptodev/files/0001-tests-Makefile-do-not-use-Werror.patch new file mode 100644 index 0000000000..347a4aef0f --- /dev/null +++ b/meta/recipes-kernel/cryptodev/files/0001-tests-Makefile-do-not-use-Werror.patch @@ -0,0 +1,24 @@ +From e2c2895d52761ddc6384a31364236dd13f677c34 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex@linutronix.de> +Date: Fri, 10 Sep 2021 10:44:42 +0200 +Subject: [PATCH] tests/Makefile: do not use -Werror + +Otherwise, openssl 3 deprecation warnings become errors. +Reported at https://github.com/cryptodev-linux/cryptodev-linux/issues/67 + +Upstream-Status: Inappropriate [upstream needs to update the code] +Signed-off-by: Alexander Kanavin <alex@linutronix.de> +--- + tests/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/Makefile b/tests/Makefile +index 2fb7a9a..e94f80e 100644 +--- a/tests/Makefile ++++ b/tests/Makefile +@@ -1,4 +1,4 @@ +-CFLAGS += -I.. $(CRYPTODEV_CFLAGS) -Wall -Werror ++CFLAGS += -I.. $(CRYPTODEV_CFLAGS) -Wall + + comp_progs := cipher_comp hash_comp hmac_comp + diff --git a/meta/recipes-kernel/cryptodev/files/0002-Fix-tests-Makefile-usage-of-LDLIBS-vs.-LDFLAGS.patch b/meta/recipes-kernel/cryptodev/files/0002-Fix-tests-Makefile-usage-of-LDLIBS-vs.-LDFLAGS.patch deleted file mode 100644 index f5ab8b4f96..0000000000 --- a/meta/recipes-kernel/cryptodev/files/0002-Fix-tests-Makefile-usage-of-LDLIBS-vs.-LDFLAGS.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 47ff1eb9bb4f872c1d731b93d334ee5865bf3439 Mon Sep 17 00:00:00 2001 -From: Denys Dmytriyenko <denys@ti.com> -Date: Sun, 6 Apr 2014 22:16:30 -0400 -Subject: [PATCH] Fix tests Makefile usage of LDLIBS vs. LDFLAGS - -Libraries must come after objects, as link order matters, especially -when using linker flags like -Wl,--as-needed. - -Signed-off-by: Denys Dmytriyenko <denys@ti.com> - -Upstream-Status: Pending ---- - tests/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/Makefile b/tests/Makefile -index cd202af..67c3c83 100644 ---- a/tests/Makefile -+++ b/tests/Makefile -@@ -39,5 +39,5 @@ testprogs: $(hostprogs) - clean: - rm -f *.o *~ $(hostprogs) - --${comp_progs}: LDFLAGS += -lssl -lcrypto -+${comp_progs}: LDLIBS += -lssl -lcrypto - ${comp_progs}: %: %.o openssl_wrapper.o --- -1.9.1 - |