Commit Graph

153 Commits

Author SHA1 Message Date
Tim Harvey
ae8bf1a26e imx: add imx8m support
Add imx8m support:
 - add a cortexa53 subtarget to imx
 - move ARCH and KERNELNAME to subtargets
 - account for kernel modules that are not used for cortexa53

No device-specific targets or firmware images are created yet but all
imx8m* dtbs will be built.

enabling CONFIG_TARGET_ROOTFS_INITRAMFS results in
openwrt-imx-cortexa53-imx8m-initramfs-kernel.bin which has been
successfully booted on an imx8mm-evk using the following:

u-boot=> tftpboot $fdt_addr_r image-imx8mm-evk.dtb && \
tftpboot $kernel_addr_r openwrt-imx-cortexa53-imx8m-initramfs-kernel.bin && \
booti $kernel_addr_r - $fdt_addr_r

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2024-03-24 21:19:10 +01:00
Hauke Mehrtens
c00fbba57c kernel: kmod-crypto-gf128: Fix build with kernel 6.6
The gf128mul.ko module was moved in kernel 6.2:
https://git.kernel.org/linus/61c581a46a9668747d355436bd4b2505594539bd

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-03-14 20:53:34 +01:00
Hauke Mehrtens
091897fad2 kernel: kmod-crypto-user: Add missing dependency
The algif_rng.ko kernel module depends on the rng.ko kernel module with
kernel 6.6 when compiling for MIPS malta.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-03-14 20:53:34 +01:00
Robert Marko
729ad2feb3 kernel: crypto: add kmod-crypto-geniv as dependency to modules that use it
Now that geniv is packaged separately for kernel 6.6, we need to add it
as a dependency to kmod-crypto-seqiv and kmod-crypto-echainiv that require
it under kernel 6.6.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-11 20:17:26 +01:00
Robert Marko
e129450321 kernel: crypto: remove geniv from aead with kernel 6.6
geniv was separated intentionally from aead in kernel 6.5, and since
we now have it packaged separately as well remove it from kmod-aead
in 6.6.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-11 20:17:26 +01:00
Robert Marko
b065981e15 kernel: crypto: package geniv as a separate module for 6.6
In kernel 6.5 geniv was split from AEAD config symbol, in order to manage
its dependencies on other code.

So, lets do the same in OpenWrt and split it from aead module so others
can depend on geniv directly.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-11 20:17:26 +01:00
Weijie Gao
35b04bafa1 kernel: modules: crypto: adapt for kernel 6.6
Adapt crypto kmods for building under kernel 6.6:
* mpi.ko moved from lib/mpi/mpi.ko to lib/crypto/mpi/mpi.ko
* jitterentropy_rng requires SHA3 support for kernel 6.6

Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Tan Zien <nabsdh9@gmail.com>
Signed-off-by: Weijie Gao <hackpascal@gmail.com>
2024-03-11 20:17:26 +01:00
Robert Marko
ce2b302ca4 kernel: crypto: use ARM64 SHA256 CE optimized module for more targets
At start I only set qualcommax to use the Crypto Extensions optimized
version of SHA256 as I knew it supports the optional Crypto Extensions.

However, after looking into the tree there are more targets/subtargets
that I could find at least a specification sheet that says the support
Cryptographic Extensions, so lets add them.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-08 17:16:18 +01:00
Robert Marko
90c09ede93 kernel: crypto: use ARM64 SHA1 CE optimized module for more targets
At start I only set qualcommax to use the Crypto Extensions optimized
version of SHA1 as I knew it supports the optional Crypto Extensions.

However, after looking into the tree there are more targets/subtargets
that I could find at least a specification sheet that says the support
Cryptographic Extensions, so lets add them.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-08 17:16:18 +01:00
Robert Marko
5b1d6d4607 kernel: crypto: add SHA512 ARM64 ASM optimized module
Kernel has an ASM optimized version of SHA512 that was ported from
OpenSSL, so lets package it as it provides significant perfomance
improvement compared to the generic implementation.

There is a Cryptographic Extension based version as well, but that relies
on ARMv8.2 ISA which I am not aware any of the OpenWrt supported SoC-s use.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-06 22:00:58 +01:00
Robert Marko
4443470a57 kernel: crypto: add SHA2(224 and 256) ARM64 CE optimized module
Kernel has optimized version of SHA2(224 and 256) using the ARMv8 Crypto
Extensions, so lets package it.

Use it by default for qualcommax as it uses Cortex-A53 core and has ARMv8
CE extensions present.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-06 18:38:28 +01:00
Robert Marko
09207c0348 kernel: crypto: add SHA256 ARM64 ASM optimized module
Kernel has an ASM optimized version of SHA256 that was ported from
OpenSSL, so lets package it as it provides significant perfomance
improvement compared to the generic implementation.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-06 18:30:21 +01:00
Robert Marko
9425064bdb kernel: crypto: add SHA1 ARM64 CE optimized module
Kernel has optimized version of SHA1 using the ARMv8 Crypto Extensions,
so lets package it.

Use it by default for qualcommax as it uses Cortex-A53 core and has ARMv8
CE extensions present.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-06 12:16:11 +01:00
Robert Marko
3e6f64d443 kernel: crypto: package SHA3
SHA3 is now required by jitterentropy_rng in kernel 6.6, so lets start
preparing by packaging SHA3 support as its supported in 5.15 and 6.1
kernels as well.

AFAIK, only ARMv8.2 has a crypto extension for SHA3, however I am not aware
of any SoC we support that uses ARMv8.2 ISA so its not enabled currently.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-03-05 20:23:46 +01:00
Linus Walleij
c1318bc73e
ixp4xx: Add a ixp4xx hardware crypto kernel module
The IXP4xx crypto module must be loaded after the rootfs is
up as it depends on loading some NPE microcode from the file
system.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2023-10-25 11:29:05 +02:00
Linus Walleij
743dc8dd15
kernel: crypto: armeb build rules for lib-chacha20
The lib-chacha20 library is missing build rules for big endian
ARM, and since IXP4xx is big endian ARM we need those rules to
build for IXP4xx.

Suggested-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2023-10-20 13:27:07 +02:00
Aviana Cruz
46d673033b
ramips: add support for mtk eip93 crypto engine
Mediatek EIP93 Crypto engine is a crypto accelerator which
is available in the Mediatek MT7621 SoC.

Signed-off-by: Aviana Cruz <gwencroft@proton.me>
Co-authored-by: Richard van Schagen <vschagen@icloud.com>
Co-authored-by: Chukun Pan <amadeus@jmu.edu.cn>
2023-09-12 14:57:54 +02:00
Christian Lamparter
959563fb81 uml: exclude some /arch/x86 optimizations
The x86_64 UML target wants to include SSSE3 optimized
crypto code which lives under /arch/x86/crypto.

However, these are not built and this causes an error.
| ERROR: module '[...]/arch/x86/crypto/sha512-ssse3.ko' is missing.
| make[3]: *** [modules/crypto.mk:990: [...]/kmod-crypto-sha512_5.15.112-1_x86_64.ipk] Error 1

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-05-22 14:45:03 +02:00
Nick Hainke
047361dee4
treewide: cleanup kernel symbol references
We only use 5.15 kernel. So remove all those unnecessary symbols
referencing 5.10 or 5.15 kernel.

Can be found with:
  git grep -E 'LINUX_5_1(0|5)'

Note that we remove the dependency from "sound-soc-chipdip-dac" instead
of removing the complete kernel package. The 5.15 version bump forgot to
delete the "@LINUX_5_10" dependency. The kernel package is still needed
in 5.15 kernel.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-05-12 13:02:44 +02:00
Nick Hainke
d798617d4a
treewide: remove all @{lt,gt,ge,le} appearances affecting 5.10 kernel
We only use 5.15 kernel. So remove all those unnecessary appearances.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-05-12 13:02:43 +02:00
Glen Huang
e1c0bda3fc kernel: crypto: crypto-rng: select SHA512 for >= 5.14.0
drbg swtiched to use HMAC(SHA-512) since 5.14.0
5261cdf457

Signed-off-by: Glen Huang <me@glenhuang.com>
2023-04-29 12:30:30 +02:00
Petr Štetiar
57392d6377 kernel: crypto: fix missing dependecies for CRYPTO_USER_API_ENABLE_OBSOLETE
CRYPTO_USER_API_ENABLE_OBSOLETE config symbol depends on CRYPTO_USER so
lets add this dependency to relevant modules.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2023-04-10 07:36:33 +02:00
Petr Štetiar
8a554a2878 kernel: crypto: fix architecture specific modules
While tracking one bug report related to wrong package dependencies I've
noticed, that a bunch of the crypto modules are actually not
architecture specific, but either board/subtarget (x86/64) or board
(mpc85xx) specific.

So lets fix it, by making those modules architecture specific:

 x86/64  -> x86_64
 mpc85xx -> powerpc

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2023-04-10 07:36:33 +02:00
Hauke Mehrtens
b9b0407901 kernel: x86: Add glue_helper.ko only on kernel < 5.12
This module was removed with kernel 5.12.
This fixes the build of the x86 target.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-10-22 02:31:57 +02:00
Daniel Golle
4133102898 kernel: modules: package kmod-crypto-essiv
Package kernel module providing ESSIV support for block encryption.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-11 19:04:44 +01:00
Josef Schlehofer
3a702f8733 kernel: build crypto md5/sha1/sha256 modules for powerpc
This builds and enables kernel optimized modules for mpc85xx target:
- CONFIG_CRYPTO_MD5_PPC [1]
- CONFIG_CRYPTO_SHA1_PPC_SPE [2]
- CONFIG_CRYPTO_SHA256_PPC_SPE [3]

Where it was possible, then use Signal Processing Engine, because
CONFIG_SPE is already enabled in mpc85xx config.

[1] https://cateee.net/lkddb/web-lkddb/CRYPTO_MD5_PPC.html
[2] https://cateee.net/lkddb/web-lkddb/CRYPTO_SHA1_PPC.html
[3] https://cateee.net/lkddb/web-lkddb/CRYPTO_SHA256_PPC_SPE.html

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2022-09-02 23:13:53 +02:00
Josef Schlehofer
f8f9d6901c kernel: fix typo for tegra crypto-sha1 module
Fixes: e889489bed ("kernel: build
arm/neon-optimized sha1/512 modules")

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2022-08-31 23:25:39 +02:00
Daniel Golle
06c4fc6d5e kernel: enable inside secure driver for MediaTek platforms
Older MT7623 ARMv7 SoC as well as new Filogic platforms come with
inside-secure,safexcel-eip97 units. Enable them in DTS and select the
driver kernel module by default on those platforms.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-08-28 20:33:15 +01:00
Hauke Mehrtens
42db0ee13b kernel: kmod-crypto-authenc: Add authencesn.ko
The kernel configuration option CONFIG_CRYPTO_AUTHENC builds authenc.ko
and authencesn.ko, pack both kernel modules.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-08-10 21:36:17 +02:00
Tomasz Maciej Nowak
9bad3451b6 kernel: clean-up after kernel 5.4 removal
These narrowments are no longer useful, since there's no lower version
than 5.10 supported in tree.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2022-06-24 17:10:24 +02:00
John Audia
cd634afe6c kernel: bump 5.10 to 5.10.119
Delete the crypto-lib-blake2s kmod package, as BLAKE2s is now built-in.
Patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800, x86/64

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-06-06 19:20:02 +02:00
Xu Wang
197b672c40 kernel: crypto: add kmod-crypto-chacha20poly1305
Needed by strongSwan IPsec VPN for strongswan-mod-chapoly. Not to be confused with
kmod-crypto-LIB-chacha20poly1305, which is an 8-byte nonce version used
by wireguard.

Signed-off-by: Xu Wang <xwang1498@gmx.com>
2022-06-03 12:26:59 +03:00
Ansuel Smith
bd0db6017b kernel: 5.15: add new module
Add new module require in 5.15
- Changes in block module
- Changes in netfilter module (log module unified)
- Changes in fs module (mainly new depends for cifs and new ntfs3 module)
- Changes in lib add shared lib now used by more than 1 kmod
- Changes in crypto, dropped one crypto algo added arm crypto accellerator
- Changes in other, add zram default compressor choice and missing lib
  by tpm module

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2022-03-27 02:17:24 +01:00
Piotr Dymacz
b769bf553d kernel: update dependencies after 'imx6' -> 'imx' rename
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2021-11-03 12:45:40 +01:00
Aleksander Jan Bajkowski
c1927f4108 kernel: crypto: limit crypto-hw-hifn-795x to devices with pci support
CONFIG_CRYPTO_DEV_HIFN_795X depends on PCI. This driver only makes sense on
devices with pci support.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
2021-06-22 23:23:00 +02:00
Aleksander Jan Bajkowski
08664f9bf3 kernel: limit crypto-hw-talitos to the mpc85xx and layerscape
CONFIG_CRYPTO_DEV_TALITOS depends on FSL_SOC. This driver only makes sense
on Freescale(NXP) SoCs.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
2021-05-23 15:11:38 +02:00
Aleksander Jan Bajkowski
8f80b9b8f6 kernel: limit crypto-hw-geode to the x86/geode
CONFIG_CRYPTO_DEV_GEODE depends on X86_32. This driver only makes sense
on X86\geode.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
2021-05-23 15:11:38 +02:00
Aleksander Jan Bajkowski
577ba5a3a9 kernel: crypto: drop kmod-crypto-pcompress
CONFIG_CRYPTO_PCOMP and CONFIG_CRYPTO_PCOMP2 have been removed in upstream commit[1].
This symbol doesn't exist since kernel 4.6 and this package is empty.

1. [ crypto: compress - remove unused pcomp interface ]
(110492183c)

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
2021-05-23 15:11:38 +02:00
Aleksander Jan Bajkowski
f298d5b810 kernel: crypto: drop kmod-crypto-wq
CONFIG_CRYPTO_WORKQUEUE was removed in upstream commit[1]. This symbol doesn't
exist since kernel 5.3 and this package is empty.

1. [ crypto: cryptd - move kcrypto_wq into cryptd ]
(3e56e16863)

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
2021-05-23 15:11:38 +02:00
Rafał Miłecki
cb3fb45ed1 kernel: limit crypto-hw-ccp to the x86
CRYPTO_DEV_CCP depends on X86 or ARM64
CRYPTO_DEV_CCP_DD depends on CPU_SUP_AMD or ARM64

Compiling this driver makes sense for x86 mainly. If one day support for
ARM64 board with AMD Secure Processor gets added this package may be
updated.

Trying to build this package on bcm4908 was causing:
ERROR: module 'build_dir/target-aarch64_cortex-a53_musl/linux-bcm4908_generic/linux-5.4.110/drivers/crypto/ccp/ccp-crypto.ko' is missing.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-04-13 17:20:55 +02:00
Rafał Miłecki
107111adbb kernel: crypto: format "crypto-hw-ccp" dependencies
Use multiples lines for better readability and sort lines.

Suggested-by: Stijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-04-13 17:19:09 +02:00
Ilya Lipnitskiy
464451d9ab kernel: no chacha-mips.ko on mips32 r1 targets
CHACHA_MIPS depends on CPU_MIPS32_R2. Therefore,
kmod-crypto-lib-chacha20 should not contain chacha-mips.ko on MIPS32 R1
targets. Enforce that in the target-specific definition.

Fixes bcm47xx, bcm63xx, lantiq/ase, ath25 builds.

Fixes: 06351f1 ("kernel: migrate wireguard into the kernel tree")
Cc: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-02-27 10:14:23 +01:00
Ilya Lipnitskiy
06351f1bd0 kernel: migrate wireguard into the kernel tree
On Linux 5.4, build WireGuard from backports. Linux 5.10 contains
wireguard in-tree.

Add in-kernel crypto libraries required by WireGuard along with
arch-specific optimizations.

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-02-26 20:41:01 +01:00
Ilya Lipnitskiy
30b482551d kernel: 5.10: fix kmod build failures
Modify existing modules to reflect their new location in Linux 5.10. Add
missing dependenices.

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
[enable CRYPTO_USER_API_ENABLE_OBSOLETE; add kmod-crypto-hash dependency
to usb-net-rtl8152]
Signed-off-by: David Bauer <mail@david-bauer.net>
2021-02-23 20:13:22 +01:00
Adrian Schmutzler
ac5671f46c kernel: remove obsolete kernel version switches for 4.19
This removes switches dependent on kernel version 4.19 as well as
several packages/modules selected only for that version.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-10-30 19:44:41 +01:00
Adrian Schmutzler
6362a04725 kernel: remove obsolete kernel version switches for 4.14
This removes switches dependent on kernel version 4.14 as well as
several packages/modules selected only for that version.

This also removes sched-cake-virtual, which is not required anymore
now that we have only one variant of cake.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-02 16:29:23 +02:00
Tomasz Maciej Nowak
4d92a558f2 linux-firmware: package EIP197 mini firmware
Quoting part of original message from eefb5f741015 commit in
linux-firmware repository:

This adds the "minifw" version of the EIP197 firmware, which the inside-
secure driver will use as a fallback if the original full-featured
firmware cannot be found. This allows for using the inside-secure driver
and hardware without access to "official" firmware only available under
NDA.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
2020-07-11 13:33:28 +02:00
Christian Lamparter
632a7b2997 mvebu: fix build regression due to neon-asm ghash module
This patch fixes the regression caused by adding the NEON
variant of the ghash as the default ghash package package:

> ERROR: module '[...]/arch/arm/crypto/ghash-arm-ce.ko' is missing.
> modules/crypto.mk:286: recipe for target
>  '[...]/kmod-crypto-ghash_4.19.106-1_aarch64_cortex-a53.ipk' failed

This patch limits the scope to the ARM32/cortexa9 target of mvebu.

Fixes: 285df63efc ("kernel: build neon-asm version of ghash module")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2020-02-29 14:14:08 +01:00
Eneas U de Queiroz
e889489bed kernel: build arm/neon-optimized sha1/512 modules
This builds the regular arm and arm-neon asm optmized modules for sha1
and sha512, for targets that set CONFIG_ARM_CRYPTO.

On ip40xx, the arm-asm version of sha1 improves performance by 5% over
the generic C implementation; sha1-neon is 25% faster than generic,
and sha512-neon, 259%.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2020-02-28 22:46:09 +01:00
Eneas U de Queiroz
285df63efc kernel: build neon-asm version of ghash module
This alone improves AES-GCM performance by up to 50% on ipq40xx.  This
is enabled for targets that support neon and set CONFIG_ARM_CRYPTO:
imx6, ipq40xx, and mvebu.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2020-02-28 22:46:09 +01:00