Added cryptodev-linux 2/head
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Tue, 3 Jun 2014 18:18:34 +0000 (20:18 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Tue, 3 Jun 2014 18:18:34 +0000 (20:18 +0200)
utils/cryptodev-linux/Makefile [new file with mode: 0644]
utils/cryptodev-linux/files/cryptodev.modules [new file with mode: 0644]

diff --git a/utils/cryptodev-linux/Makefile b/utils/cryptodev-linux/Makefile
new file mode 100644 (file)
index 0000000..f559c7e
--- /dev/null
@@ -0,0 +1,74 @@
+#
+# Copyright (C) 2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=cryptodev-linux
+PKG_VERSION:=1.6
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://download.gna.org/cryptodev-linux/
+PKG_MD5SUM:=eade38998313c25fd7934719cdf8a2ea
+
+PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+CRYPTODEV_AUTOLOAD:= \
+       cryptodev
+
+define KernelPackage/cryptodev
+  SUBMENU:=Cryptographic API modules
+  DEFAULT:=m if ALL
+  TITLE:=Driver for cryptographic acceleration
+  URL:=http://cryptodev-linux.org/
+  VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
+  DEPENDS:=+kmod-crypto-core +kmod-crypto-authenc +kmod-crypto-hash
+  FILES:= \
+               $(PKG_BUILD_DIR)/cryptodev.$(LINUX_KMOD_SUFFIX)
+  AUTOLOAD:=$(call AutoLoad,50,$(CRYPTODEV_AUTOLOAD))
+endef
+
+define KernelPackage/cryptodev/description
+  This is a driver for that allows to use the Linux kernel supported
+  hardware ciphers by user-space applications.
+endef
+
+CRYPTODEV_MAKEOPTS= -C $(PKG_BUILD_DIR) \
+               PATH="$(TARGET_PATH)" \
+               ARCH="$(LINUX_KARCH)" \
+               CROSS_COMPILE="$(TARGET_CROSS)" \
+               TOOLPREFIX="$(KERNEL_CROSS)" \
+               TOOLPATH="$(KERNEL_CROSS)" \
+               KERNEL_DIR="$(LINUX_DIR)" \
+               LDOPTS=" " \
+               DOMULTI=1
+
+define Build/Compile/cryptodev
+       $(MAKE) $(CRYPTODEV_MAKEOPTS)
+endef
+
+define Build/Compile
+       $(call Build/Compile/cryptodev)
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(STAGING_DIR)/usr/include/crypto
+       $(CP) $(PKG_BUILD_DIR)/crypto/cryptodev.h $(STAGING_DIR)/usr/include/crypto/
+endef
+
+define KernelPackage/cryptodev/install
+       $(INSTALL_DIR) $(1)/etc/modules.d
+       $(INSTALL_DATA) ./files/cryptodev.modules $(1)/etc/modules.d/80-cryptodev
+       $(INSTALL_DIR) $(1)/lib/modules/$(LINUX_VERSION)
+       $(INSTALL_DIR) $(1)/usr/sbin
+endef
+
+$(eval $(call KernelPackage,cryptodev))
diff --git a/utils/cryptodev-linux/files/cryptodev.modules b/utils/cryptodev-linux/files/cryptodev.modules
new file mode 100644 (file)
index 0000000..fb39fcd
--- /dev/null
@@ -0,0 +1 @@
+cryptodev