[OpenWrt-Devel] [PATCH] mpc85xx: revert enabling the crypto acceleration driver in the kernel config instead of packaging it

Achim Gottinger achim at ag-web.biz
Fri Jun 1 03:32:00 EDT 2018



Am 01.06.2018 um 08:30 schrieb John Crispin:
>
>
> On 01/06/18 02:04, Achim Gottinger wrote:
>>
>>
>> Am 31.05.2018 um 20:12 schrieb Achim Gottinger:
>>>
>>>
>>> Am 31.05.2018 um 19:12 schrieb Achim Gottinger:
>>>> Hello List,
>>>>
>>>> Since the commit 
>>>> https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=c00e5a4f09115ec976fac7dc380f576ef6a24fab 
>>>> strongswan is broken on WDR4900v1.
>>>> An bug report can be seen here: 
>>>> https://bugs.openwrt.org/index.php?do=details&task_id=1262.
>>>> To get strongswan working again i made an patch which reverts the 
>>>> changes from above commit.
>>>> Now if the caam modules are loaded strongswan still fails but 
>>>> without the caam modules loades it works as expected.
>>>> With the caam modules build in caam can not be disabled by the 
>>>> openwrt user.
>>>>
>
>
> Hi Achim,
> please resend the series adding your Signed-off-by: line right here
>     John
Hello John,


Signed-off-by: Achim Gottinger <achim at ag-web.biz>

diff --git a/package/kernel/linux/modules/crypto.mk 
b/package/kernel/linux/modules/crypto.mk
index 2ea2d2c0e7..dbb0d59012 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -271,6 +271,33 @@ endef

  $(eval $(call KernelPackage,crypto-hmac))

+define KernelPackage/crypto-hw-caam
+  TITLE:=Freescale CAAM driver (SEC4)
+  DEPENDS:=@TARGET_mpc85xx +kmod-crypto-aead +kmod-crypto-authenc 
+kmod-crypto-hash +kmod-random-core
+  KCONFIG:= \
+       CONFIG_CRYPTO_HW=y \
+       CONFIG_CRYPTO_DEV_FSL_CAAM \
+       CONFIG_CRYPTO_DEV_FSL_CAAM_JR \
+       CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API \
+       CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API \
+       CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API \
+       CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API \
+       CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9 \
+       CONFIG_CRYPTO_DEV_FSL_CAAM_IMX=n \
+       CONFIG_CRYPTO_DEV_FSL_CAAM_INTC=n \
+       CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG=n
+  FILES:= \
+       $(LINUX_DIR)/drivers/crypto/caam/caam.ko \
+       $(LINUX_DIR)/drivers/crypto/caam/caamalg.ko \
+       $(LINUX_DIR)/drivers/crypto/caam/caamhash.ko \
+       $(LINUX_DIR)/drivers/crypto/caam/caam_pkc.ko \
+       $(LINUX_DIR)/drivers/crypto/caam/caam_jr.ko \
+       $(LINUX_DIR)/drivers/crypto/caam/caamrng.ko
+  AUTOLOAD:=$(call AutoLoad,09,caam caamalg caamhash caam_jr caam_pkc 
caamrng)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-hw-caam))

  define KernelPackage/crypto-hw-ccp
    TITLE:=AMD Cryptographic Coprocessor
diff --git a/target/linux/mpc85xx/config-4.9 
b/target/linux/mpc85xx/config-4.9
index 68568c4a62..dc2e5a8820 100644
--- a/target/linux/mpc85xx/config-4.9
+++ b/target/linux/mpc85xx/config-4.9
@@ -47,16 +47,16 @@ CONFIG_CRYPTO_AEAD2=y
  CONFIG_CRYPTO_AKCIPHER=y
  CONFIG_CRYPTO_AKCIPHER2=y
  CONFIG_CRYPTO_AUTHENC=y
-CONFIG_CRYPTO_DEV_FSL_CAAM=y
-CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API=y
-CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=y
  # CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG is not set
  # CONFIG_CRYPTO_DEV_FSL_CAAM_IMX is not set
  # CONFIG_CRYPTO_DEV_FSL_CAAM_INTC is not set
-CONFIG_CRYPTO_DEV_FSL_CAAM_JR=y
-CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API=y
-CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9
-CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_JR=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API=y
+#CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9
+#CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y
  CONFIG_CRYPTO_HASH=y
  CONFIG_CRYPTO_HASH2=y
  CONFIG_CRYPTO_HW=y


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


More information about the openwrt-devel mailing list