ソースを参照

Added cryptodev-linux

Nikos Mavrogiannopoulos 10 年 前
コミット
1aab2a4dee
共有2 個のファイルを変更した75 個の追加0 個の削除を含む
  1. 74
    0
      utils/cryptodev-linux/Makefile
  2. 1
    0
      utils/cryptodev-linux/files/cryptodev.modules

+ 74
- 0
utils/cryptodev-linux/Makefile ファイルの表示

@@ -0,0 +1,74 @@
1
+#
2
+# Copyright (C) 2014 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+# $Id$
8
+
9
+include $(TOPDIR)/rules.mk
10
+include $(INCLUDE_DIR)/kernel.mk
11
+
12
+PKG_NAME:=cryptodev-linux
13
+PKG_VERSION:=1.6
14
+PKG_RELEASE:=1
15
+
16
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17
+PKG_SOURCE_URL:=http://download.gna.org/cryptodev-linux/
18
+PKG_MD5SUM:=eade38998313c25fd7934719cdf8a2ea
19
+
20
+PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21
+
22
+include $(INCLUDE_DIR)/package.mk
23
+
24
+CRYPTODEV_AUTOLOAD:= \
25
+	cryptodev
26
+
27
+define KernelPackage/cryptodev
28
+  SUBMENU:=Cryptographic API modules
29
+  DEFAULT:=m if ALL
30
+  TITLE:=Driver for cryptographic acceleration
31
+  URL:=http://cryptodev-linux.org/
32
+  VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
33
+  DEPENDS:=+kmod-crypto-core +kmod-crypto-authenc +kmod-crypto-hash
34
+  FILES:= \
35
+		$(PKG_BUILD_DIR)/cryptodev.$(LINUX_KMOD_SUFFIX)
36
+  AUTOLOAD:=$(call AutoLoad,50,$(CRYPTODEV_AUTOLOAD))
37
+endef
38
+
39
+define KernelPackage/cryptodev/description
40
+  This is a driver for that allows to use the Linux kernel supported
41
+  hardware ciphers by user-space applications.
42
+endef
43
+
44
+CRYPTODEV_MAKEOPTS= -C $(PKG_BUILD_DIR) \
45
+		PATH="$(TARGET_PATH)" \
46
+		ARCH="$(LINUX_KARCH)" \
47
+		CROSS_COMPILE="$(TARGET_CROSS)" \
48
+		TOOLPREFIX="$(KERNEL_CROSS)" \
49
+		TOOLPATH="$(KERNEL_CROSS)" \
50
+		KERNEL_DIR="$(LINUX_DIR)" \
51
+		LDOPTS=" " \
52
+		DOMULTI=1
53
+
54
+define Build/Compile/cryptodev
55
+	$(MAKE) $(CRYPTODEV_MAKEOPTS)
56
+endef
57
+
58
+define Build/Compile
59
+	$(call Build/Compile/cryptodev)
60
+endef
61
+
62
+define Build/InstallDev
63
+	$(INSTALL_DIR) $(STAGING_DIR)/usr/include/crypto
64
+	$(CP) $(PKG_BUILD_DIR)/crypto/cryptodev.h $(STAGING_DIR)/usr/include/crypto/
65
+endef
66
+
67
+define KernelPackage/cryptodev/install
68
+	$(INSTALL_DIR) $(1)/etc/modules.d
69
+	$(INSTALL_DATA) ./files/cryptodev.modules $(1)/etc/modules.d/80-cryptodev
70
+	$(INSTALL_DIR) $(1)/lib/modules/$(LINUX_VERSION)
71
+	$(INSTALL_DIR) $(1)/usr/sbin
72
+endef
73
+
74
+$(eval $(call KernelPackage,cryptodev))

+ 1
- 0
utils/cryptodev-linux/files/cryptodev.modules ファイルの表示

@@ -0,0 +1 @@
1
+cryptodev