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