b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 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.12 |
| 14 | PKG_RELEASE:=$(AUTORELEASE) |
| 15 | |
| 16 | PKG_SOURCE_URL:=https://codeload.github.com/$(PKG_NAME)/$(PKG_NAME)/tar.gz/$(PKG_NAME)-$(PKG_VERSION)? |
| 17 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz |
| 18 | PKG_HASH:=f51c2254749233b1b1d7ec9445158bd709f124f88e1c650fe2faac83c3a81938 |
| 19 | PKG_LICENSE:=GPL-2.0 |
| 20 | PKG_LICENSE_FILES:=COPYING |
| 21 | |
| 22 | PKG_MAINTAINER:=Ansuel Smith <ansuelsmth@gmail.com> |
| 23 | |
| 24 | PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION) |
| 25 | |
| 26 | include $(INCLUDE_DIR)/package.mk |
| 27 | |
| 28 | define KernelPackage/cryptodev |
| 29 | SUBMENU:=Cryptographic API modules |
| 30 | TITLE:=Driver for cryptographic acceleration |
| 31 | URL:=https://github.com/cryptodev-linux/cryptodev-linux |
| 32 | VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE) |
| 33 | DEPENDS:=+kmod-crypto-authenc +kmod-crypto-hash |
| 34 | FILES:=$(PKG_BUILD_DIR)/cryptodev.$(LINUX_KMOD_SUFFIX) |
| 35 | AUTOLOAD:=$(call AutoLoad,50,cryptodev) |
| 36 | MODPARAMS.cryptodev:=cryptodev_verbosity=-1 |
| 37 | endef |
| 38 | |
| 39 | define KernelPackage/cryptodev/description |
| 40 | This driver allows use of the Linux kernel supported hardware-based |
| 41 | cryptographic and hash accelerators by user-space applications, |
| 42 | via a "/dev/crypto" device. |
| 43 | endef |
| 44 | |
| 45 | define Build/Configure |
| 46 | endef |
| 47 | |
| 48 | define Build/Compile |
| 49 | $(MAKE) -C $(PKG_BUILD_DIR) \ |
| 50 | $(KERNEL_MAKE_FLAGS) \ |
| 51 | KERNEL_DIR="$(LINUX_DIR)" |
| 52 | endef |
| 53 | |
| 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 | |
| 59 | $(eval $(call KernelPackage,cryptodev)) |