[openwrt/openwrt] uml: fix CONFIG_ALL_KMODS
LEDE Commits
lede-commits at lists.infradead.org
Mon Jun 9 02:11:59 PDT 2025
chunkeey pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/eab2b2769915b3f6dbf8f19339bf3b51d7b955a7
commit eab2b2769915b3f6dbf8f19339bf3b51d7b955a7
Author: Christian Lamparter <chunkeey at gmail.com>
AuthorDate: Sat May 31 13:40:21 2025 +0200
uml: fix CONFIG_ALL_KMODS
building with CONFIG_ALL_KMODS unearthed all sorts of interesting
failures
ERROR: module 'crypto/chacha-x86_64.ko' is missing.
ERROR: module 'crypto/poly1305-x86_64.ko' is missing.
ERROR: module 'crypto/curve25519-x86_64.ko' is missing.
ERROR: module 'crypto/camellia-x86_64.ko' is missing.
These stem from the main UML Makefile.
|# UML only makes sense on linux
|ifeq ($(HOST_OS),Linux)
| ifeq ($(HOST_ARCH),x86_64)
|
|ARCH:=x86_64
|BOARD:=uml
The modules in question define x86_64 optimized version and
the OpenWrt's buildsystem expects that these modules will be present.
SPI is not available due to the UML Architecture not setting HAS_IOMEM.
In the future, UML could get (virtualized) IOMEM and/or SPI could drop
the HAS_IOMEM dependency. A patch for the latter has been sent:
<https://lore.kernel.org/linux-spi/20250530234941.950431-1-chunkeey@gmail.com/T/#u>
mt76: Unfortunately, the firmware packages are picked up, but the
associated drivers can't be build because iowrite32+ioread32 are
not defined.
Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
package/kernel/linux/modules/crypto.mk | 8 ++++++++
package/kernel/linux/modules/other.mk | 2 +-
package/kernel/mt76/Makefile | 3 ++-
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk
index 2e6ee14572..d518917ea8 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -577,10 +577,12 @@ define KernelPackage/crypto-lib-chacha20
$(call AddDepends/crypto)
endef
+ifndef CONFIG_TARGET_uml
define KernelPackage/crypto-lib-chacha20/x86_64
KCONFIG+=CONFIG_CRYPTO_CHACHA20_X86_64
FILES+=$(LINUX_DIR)/arch/x86/crypto/chacha-x86_64.ko
endef
+endif
# Note that a non-neon fallback implementation is available on arm32 when
# NEON is not supported, hence all arm targets can utilize lib-chacha20/arm
@@ -639,10 +641,12 @@ define KernelPackage/crypto-lib-curve25519/config
imply PACKAGE_kmod-crypto-kpp
endef
+ifndef CONFIG_TARGET_uml
define KernelPackage/crypto-lib-curve25519/x86_64
KCONFIG+=CONFIG_CRYPTO_CURVE25519_X86
FILES+=$(LINUX_DIR)/arch/x86/crypto/curve25519-x86_64.ko
endef
+endif
define KernelPackage/crypto-lib-curve25519/arm-neon
KCONFIG+=CONFIG_CRYPTO_CURVE25519_NEON
@@ -674,10 +678,12 @@ define KernelPackage/crypto-lib-poly1305/config
imply PACKAGE_kmod-crypto-hash
endef
+ifndef CONFIG_TARGET_uml
define KernelPackage/crypto-lib-poly1305/x86_64
KCONFIG+=CONFIG_CRYPTO_POLY1305_X86_64
FILES+=$(LINUX_DIR)/arch/x86/crypto/poly1305-x86_64.ko
endef
+endif
define KernelPackage/crypto-lib-poly1305/arm
KCONFIG+=CONFIG_CRYPTO_POLY1305_ARM
@@ -841,6 +847,7 @@ ifndef CONFIG_TARGET_x86_64
endef
endif
+ifndef CONFIG_TARGET_uml
define KernelPackage/crypto-misc/x86_64
FILES+= \
$(LINUX_DIR)/arch/x86/crypto/camellia-x86_64.ko \
@@ -860,6 +867,7 @@ define KernelPackage/crypto-misc/x86_64
cast6-avx-x86_64 twofish-x86_64 twofish-x86_64-3way \
twofish-avx-x86_64 blowfish-x86_64 serpent-avx-x86_64 serpent-avx2)
endef
+endif
ifdef KernelPackage/crypto-misc/$(ARCH)
KernelPackage/crypto-misc/$(CRYPTO_TARGET)=\
diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk
index f703cbb816..b33a6241d9 100644
--- a/package/kernel/linux/modules/other.mk
+++ b/package/kernel/linux/modules/other.mk
@@ -624,7 +624,7 @@ $(eval $(call KernelPackage,regmap-core))
define KernelPackage/regmap-spi
SUBMENU:=$(OTHER_MENU)
TITLE:=SPI register map support
- DEPENDS:=+kmod-regmap-core
+ DEPENDS:=+kmod-regmap-core @!TARGET_uml
HIDDEN:=1
KCONFIG:=CONFIG_REGMAP_SPI \
CONFIG_SPI=y
diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index 1ce166e956..f4e740329b 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -41,7 +41,8 @@ define KernelPackage/mt76-default
DEPENDS:= \
+kmod-mac80211 \
+ at DRIVER_11AC_SUPPORT \
- + at KERNEL_PAGE_POOL
+ + at KERNEL_PAGE_POOL \
+ @!TARGET_uml
endef
define KernelPackage/mt76
More information about the lede-commits
mailing list