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.

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