You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.2 KiB

  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. include $(TOPDIR)/rules.mk
  9. include $(INCLUDE_DIR)/kernel.mk
  10. PKG_NAME:=cryptodev-linux
  11. PKG_VERSION:=1.8.git-2017-02-09
  12. PKG_RELEASE:=2
  13. PKG_SOURCE_PROTO:=git
  14. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  16. PKG_MIRROR_HASH:=627ce96e3ba66ca9c8e14f5d80193061fbe9d45cd8d4b69a1bf4dd5a2d50eed8
  17. PKG_SOURCE_URL:=https://github.com/cryptodev-linux/cryptodev-linux.git
  18. PKG_SOURCE_VERSION:=6818263667ca488f9b1c86e36ea624c4ea1c309f
  19. PKG_MAINTAINER:=Ansuel Smith ansuelsmth@gmail.com
  20. PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  21. include $(INCLUDE_DIR)/package.mk
  22. CRYPTODEV_AUTOLOAD:= \
  23. cryptodev
  24. define KernelPackage/cryptodev
  25. SUBMENU:=Cryptographic API modules
  26. DEFAULT:=m if ALL
  27. TITLE:=Driver for cryptographic acceleration
  28. URL:=http://cryptodev-linux.org/
  29. MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
  30. VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
  31. DEPENDS:=+kmod-crypto-authenc +kmod-crypto-hash
  32. FILES:= \
  33. $(PKG_BUILD_DIR)/cryptodev.$(LINUX_KMOD_SUFFIX)
  34. AUTOLOAD:=$(call AutoLoad,50,$(CRYPTODEV_AUTOLOAD))
  35. endef
  36. define KernelPackage/cryptodev/description
  37. This is a driver for that allows to use the Linux kernel supported
  38. hardware ciphers by user-space applications.
  39. endef
  40. CRYPTODEV_MAKEOPTS= -C $(PKG_BUILD_DIR) \
  41. PATH="$(TARGET_PATH)" \
  42. ARCH="$(LINUX_KARCH)" \
  43. CROSS_COMPILE="$(TARGET_CROSS)" \
  44. TOOLPREFIX="$(KERNEL_CROSS)" \
  45. TOOLPATH="$(KERNEL_CROSS)" \
  46. KERNEL_DIR="$(LINUX_DIR)" \
  47. LDOPTS=" " \
  48. DOMULTI=1
  49. define Build/Compile/cryptodev
  50. $(MAKE) $(CRYPTODEV_MAKEOPTS)
  51. endef
  52. define Build/Compile
  53. $(call Build/Compile/cryptodev)
  54. endef
  55. define Build/InstallDev
  56. $(INSTALL_DIR) $(STAGING_DIR)/usr/include/crypto
  57. $(CP) $(PKG_BUILD_DIR)/crypto/cryptodev.h $(STAGING_DIR)/usr/include/crypto/
  58. endef
  59. define KernelPackage/cryptodev/install
  60. $(INSTALL_DIR) $(1)/etc/modules.d
  61. $(INSTALL_DATA) ./files/cryptodev.modules $(1)/etc/modules.d/50-cryptodev
  62. $(INSTALL_DIR) $(1)/lib/modules/$(LINUX_VERSION)
  63. $(INSTALL_DIR) $(1)/usr/sbin
  64. endef
  65. $(eval $(call KernelPackage,cryptodev))