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.

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