[OpenWrt-Devel] [PATCH] cryptodev-linux: move from packages feed

Hauke Mehrtens hauke at hauke-m.de
Sat Nov 24 08:33:42 EST 2018


On 11/9/18 6:06 PM, Eneas U de Queiroz wrote:
> This is actually a build dependency for /dev/crypto support in openssl.
> Since it is a kernel module, it belongs here anyway.
> 
> Acked-by: Ansuel Smith <ansuelsmth at gmail.com>
> Signed-off-by: Eneas U de Queiroz <cote2004-github at yahoo.com>
> 
> diff --git a/package/kernel/cryptodev-linux/Makefile b/package/kernel/cryptodev-linux/Makefile
> new file mode 100644
> index 0000000000..8e9c7ed8b0
> --- /dev/null
> +++ b/package/kernel/cryptodev-linux/Makefile
> @@ -0,0 +1,74 @@
> +#
> +# 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.9.git-2018-11-02
> +PKG_RELEASE:=1
> +
> +PKG_SOURCE_URL:=https://github.com/cryptodev-linux/cryptodev-linux
> +PKG_SOURCE_PROTO:=git
> +PKG_SOURCE_VERSION:=f1a693000d116718379f8b53ed7bc6b9c0f7de27
> +PKG_MIRROR_HASH:=340d314e2a88bf2449ccee906b141e085d376f6e2a94a64e36254e8376323169
> +PKG_LICENSE:=GPL-2.0
> +PKG_LICENSE_FILES:=COPYING
> +
> +PKG_MAINTAINER:=Ansuel Smith <ansuelsmth at gmail.com>
> +
> +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
> +
> +include $(INCLUDE_DIR)/package.mk
> +
> +CRYPTODEV_AUTOLOAD:= \
> +	cryptodev

Please inline this, this extra variable is unneeded.

> +
> +define KernelPackage/cryptodev
> +  SUBMENU:=Cryptographic API modules
> +  DEFAULT:=m if ALL
> +  TITLE:=Driver for cryptographic acceleration
> +  URL:=http://cryptodev-linux.org/
> +  MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos at gmail.com>

Why are there two different maintainers in this file?

> +  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_AUTOLOAD))
> +  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
> +
> +CRYPTODEV_MAKEOPTS= -C $(PKG_BUILD_DIR) \
> +		PATH="$(TARGET_PATH)" \
> +		ARCH="$(LINUX_KARCH)" \
> +		CROSS_COMPILE="$(TARGET_CROSS)" \
> +		TOOLPREFIX="$(KERNEL_CROSS)" \
> +		TOOLPATH="$(KERNEL_CROSS)" \
> +		KERNEL_DIR="$(LINUX_DIR)" \
> +		LDOPTS=" " \
> +		DOMULTI=1

Most of these options are already defined in KERNEL_MAKE_FLAGS, please
use that as a base.

> +
> +define Build/Compile/cryptodev
> +	$(MAKE) $(CRYPTODEV_MAKEOPTS)
> +endef

Why is Build/Compile/cryptodev needed?

> +
> +define Build/Compile
> +	$(call Build/Compile/cryptodev)
> +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))
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20181124/876cda76/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list