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).

Signed-off-by: Ladislav Michl <la...@linux-mips.org>
---
 rules/cryptodev.in   | 11 ++++++++
 rules/cryptodev.make | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 86 insertions(+)

diff --git a/rules/cryptodev.in b/rules/cryptodev.in
new file mode 100644
index 000000000..7a231340e
--- /dev/null
+++ b/rules/cryptodev.in
@@ -0,0 +1,11 @@
+## SECTION=core
+
+config CRYPTODEV
+       tristate
+       select KERNEL
+       prompt "cryptodev"
+       help
+         Cryptodev-linux is a device that allows access to Linux kernel
+         cryptographic drivers; thus allowing of userspace applications
+         to take advantage of hardware accelerators. Its API is
+         compatible with OpenBSD's cryptodev userspace API (/dev/crypto). 
diff --git a/rules/cryptodev.make b/rules/cryptodev.make
new file mode 100644
index 000000000..0cad936b3
--- /dev/null
+++ b/rules/cryptodev.make
@@ -0,0 +1,75 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Ladislav Michl <la...@linux-mips.org>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_CRYPTODEV) += cryptodev
+
+#
+# Paths and names and versions
+#
+CRYPTODEV_VERSION      := 1.9
+CRYPTODEV_MD5          := cb4e0ed9e5937716c7c8a7be84895b6d
+CRYPTODEV              := cryptodev-linux-$(CRYPTODEV_VERSION)
+CRYPTODEV_SUFFIX       := tar.gz
+CRYPTODEV_URL          := \
+       http://nwl.cc/pub/cryptodev-linux/$(CRYPTODEV).$(CRYPTODEV_SUFFIX) \
+       http://download.gna.org/cryptodev-linux/$(CRYPTODEV).$(CRYPTODEV_SUFFIX)
+CRYPTODEV_SOURCE       := $(SRCDIR)/$(CRYPTODEV).$(CRYPTODEV_SUFFIX)
+CRYPTODEV_DIR          := $(BUILDDIR)/$(CRYPTODEV)
+CRYPTODEV_LICENSE      := GPL-2.0
+
+ifdef PTXCONF_CRYPTODEV
+$(STATEDIR)/kernel.targetinstall.post: $(STATEDIR)/cryptodev.targetinstall
+endif
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/cryptodev.prepare:
+       @$(call targetinfo)
+       @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/cryptodev.compile:
+       @$(call targetinfo)
+       $(KERNEL_PATH) $(KERNEL_ENV) $(MAKE) $(KERNEL_MAKEVARS) \
+               KERNEL_DIR=$(KERNEL_DIR) \
+               -C $(CRYPTODEV_DIR)
+       @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/cryptodev.install:
+       @$(call targetinfo)
+       @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/cryptodev.targetinstall:
+       @$(call targetinfo)
+       $(KERNEL_PATH) $(KERNEL_ENV) $(MAKE) $(KERNEL_MAKEVARS) \
+               KERNEL_DIR=$(KERNEL_DIR) \
+               DESTDIR=$(SYSROOT) \
+               prefix=/usr \
+               -C $(CRYPTODEV_DIR) \
+               install
+       @$(call touch)
+
+# vim: syntax=make
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to