mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Update cryptodev
This commit is contained in:
parent
32cbaf2c1c
commit
0460b9dc5b
2 changed files with 90 additions and 0 deletions
58
cryptodev-linux/Makefile
Normal file
58
cryptodev-linux/Makefile
Normal file
|
@ -0,0 +1,58 @@
|
|||
#
|
||||
# Copyright (C) 2014 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
# $Id$
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=cryptodev-linux
|
||||
PKG_VERSION:=1.12
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/$(PKG_NAME)/$(PKG_NAME)/tar.gz/$(PKG_NAME)-$(PKG_VERSION)?
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_HASH:=f51c2254749233b1b1d7ec9445158bd709f124f88e1c650fe2faac83c3a81938
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_MAINTAINER:=Ansuel Smith <ansuelsmth@gmail.com>
|
||||
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/cryptodev
|
||||
SUBMENU:=Cryptographic API modules
|
||||
TITLE:=Driver for cryptographic acceleration
|
||||
URL:=http://cryptodev-linux.org/
|
||||
VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
|
||||
DEPENDS:=+kmod-crypto-authenc +kmod-crypto-hash
|
||||
FILES:=$(PKG_BUILD_DIR)/cryptodev.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,50,cryptodev)
|
||||
MODPARAMS.cryptodev:=cryptodev_verbosity=-1
|
||||
endef
|
||||
|
||||
define KernelPackage/cryptodev/description
|
||||
This is a driver for that allows to use the Linux kernel supported
|
||||
hardware ciphers by user-space applications.
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
$(KERNEL_MAKE_FLAGS) \
|
||||
KERNEL_DIR="$(LINUX_DIR)"
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/crypto
|
||||
$(CP) $(PKG_BUILD_DIR)/crypto/cryptodev.h $(STAGING_DIR)/usr/include/crypto/
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,cryptodev))
|
|
@ -0,0 +1,32 @@
|
|||
From 2f5e08aebf9229599aae7f25db752f74221cd71d Mon Sep 17 00:00:00 2001
|
||||
From: Joan Bruguera <joanbrugueram@gmail.com>
|
||||
Date: Fri, 14 Aug 2020 00:13:38 +0200
|
||||
Subject: [PATCH] Fix build for Linux 5.9-rc1
|
||||
|
||||
See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=64019a2e467a288a16b65ab55ddcbf58c1b00187
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bce617edecada007aee8610fbe2c14d10b8de2f6
|
||||
https://lore.kernel.org/lkml/CAHk-=wj_V2Tps2QrMn20_W0OJF9xqNh52XSGA42s-ZJ8Y+GyKw@mail.gmail.com/
|
||||
|
||||
Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
|
||||
---
|
||||
zc.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/zc.c
|
||||
+++ b/zc.c
|
||||
@@ -76,10 +76,14 @@ int __get_userbuf(uint8_t __user *addr,
|
||||
ret = get_user_pages_remote(task, mm,
|
||||
(unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
|
||||
pg, NULL);
|
||||
-#else
|
||||
+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 9, 0))
|
||||
ret = get_user_pages_remote(task, mm,
|
||||
(unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
|
||||
pg, NULL, NULL);
|
||||
+#else
|
||||
+ ret = get_user_pages_remote(mm,
|
||||
+ (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
|
||||
+ pg, NULL, NULL);
|
||||
#endif
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0))
|
||||
up_read(&mm->mmap_sem);
|
Loading…
Add table
Add a link
Reference in a new issue