Skip to contentSkip to conversation

package/cryptodev-linux: ensure <pkg>_LINUX_CONFIG_FIXUPS has an effect

PATCH In review Thomas Petazzoni via buildroot 3 participants 5 messages Jan 4, 2025 – Jan 8, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/cryptodev-linux: ensure <pkg>_LINUX_CONFIG_FIXUPS has an effect

The variable <pkg>_LINUX_CONFIG_FIXUPS defined in the cryptodev-linux... has no effect. Indeed, the variable is only named CRYPTODEV_LINUX_CONFIG_FIXUPS.

But the variable name being <pkg>_LINUX_CONFIG_FIXUPS and the package name being CRYPTODEV_LINUX, the correct variable name is CRYPTODEV_LINUX_LINUX_CONFIG_FIXUPS.

Prior to this commit, a configuration with cryptodev-linux enabled would result in:

$ make VARS=PACKAGES_LINUX_CONFIG_FIXUPS printvars
$

Aka, empty, while PACKAGES_LINUX_CONFIG_FIXUPS collects in package/pkg-generic.mk the value of the <pkg>_LINUX_CONFIG_FIXUPS variables from all enabled packages.

With this patch applied:

$ make VARS=PACKAGES_LINUX_CONFIG_FIXUPS printvars
PACKAGES_LINUX_CONFIG_FIXUPS=		@if ! grep -q '^CONFIG_CRYPTO=[my]' /; then 	/usr/bin/sed -i -e '/^\(# \)\?CONFIG_CRYPTO\>/d' / && echo 'CONFIG_CRYPTO=y' >> /; fi
		@if ! grep -q '^CONFIG_CRYPTO_USER_API_AEAD=[my]' /; then 	/usr/bin/sed -i -e '/^\(# \)\?CONFIG_CRYPTO_USER_API_AEAD\>/d' / && echo 'CONFIG_CRYPTO_USER_API_AEAD=y' >> /; fi
$

As one would expect.

Fixes 4b12336d1fad12fbb82b4d9144e6cb5636a12256 ("package/cryptodev-linux: needs CONFIG_CRYPTO_USER_API_AEAD")
---
 package/cryptodev-linux/cryptodev-linux.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/cryptodev-linux/cryptodev-linux.mk +1 -1
index 580ea89520..550a248a27 100644
@@ -21,7 +21,7 @@ define CRYPTODEV_LINUX_INSTALL_STAGING_CMDS
 		$(STAGING_DIR)/usr/include/crypto/cryptodev.h
 endef
 
-define CRYPTODEV_LINUX_CONFIG_FIXUPS
+define CRYPTODEV_LINUX_LINUX_CONFIG_FIXUPS
 	$(call KCONFIG_ENABLE_OPT,CONFIG_CRYPTO)
 	$(call KCONFIG_ENABLE_OPT,CONFIG_CRYPTO_USER_API_AEAD)
 endef
Signature · 6 lines
2.47.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/2 package/pkg-kernel-module: disable CONFIG_TRIM_UNUSED_KSYMS

The kernel option CONFIG_TRIM_UNUSED_KSYMS=y allows to trim unused kernel symbols... which basically prevents building external modules. This option has been enabled in the default MIPS architecture kernel defconfig since pretty much forever, and it causes build failures of all our external modules on MIPS in the autobuilders.

To fix this in a global manner, we handle the problem in the kernel-module infrastructure, by appending to the <pkg>_LINUX_CONFIG_FIXUPS variable provided by the package.

Fixes:

http://autobuild.buildroot.net/results/c26abec4e24d06557079654b12825efb2211996f/ (cryptodev-linux)
http://autobuild.buildroot.net/results/699c618730cb33f0ccf54f90e4b722198fd3d3bc/ (emlog)
http://autobuild.buildroot.net/results/f1d5626f5698a955bf378217528fbf4f8f741435/ (rtl8812au-aircrack-ng)
http://autobuild.buildroot.net/results/c9a507757ce3a01cd08d596cb519ee9f19caf77c/ (mdio-tools)

---
 package/pkg-kernel-module.mk | 3 +++
 1 file changed, 3 insertions(+)
package/pkg-kernel-module.mk +3 -0
index 4f64a73f11..032874c3ca 100644
@@ -62,6 +62,9 @@ $(2)_MAKE ?= $$(BR2_MAKE)
 # the root of the package.
 $(2)_MODULE_SUBDIRS ?= .
 
+$(2)_LINUX_CONFIG_FIXUPS += \
+	$$(sep)$$(call KCONFIG_DISABLE_OPT,CONFIG_TRIM_UNUSED_KSYMS)
+
 # Build the kernel module(s)
 # Force PWD for those packages that want to use it to find their
 # includes and other support files (Booo!)
Signature · 6 lines
2.47.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Re: [Buildroot] [PATCH 2/2] package/pkg-kernel-module: disable CONFIG_TRIM_UNUSED_KSYMS

Quoted 10 lines · Thomas Petazzoni via buildroot

The kernel option CONFIG_TRIM_UNUSED_KSYMS=y allows to trim unused kernel symbols... which basically prevents building external modules. This option has been enabled in the default MIPS architecture kernel defconfig since pretty much forever, and it causes build failures of all our external modules on MIPS in the autobuilders.

To fix this in a global manner, we handle the problem in the kernel-module infrastructure, by appending to the <pkg>_LINUX_CONFIG_FIXUPS variable provided by the package.

Quoted 8 lines

Fixes:

   http://autobuild.buildroot.net/results/c26abec4e24d06557079654b12825efb2211996f/ (cryptodev-linux)
   http://autobuild.buildroot.net/results/699c618730cb33f0ccf54f90e4b722198fd3d3bc/ (emlog)
   http://autobuild.buildroot.net/results/f1d5626f5698a955bf378217528fbf4f8f741435/ (rtl8812au-aircrack-ng)
   http://autobuild.buildroot.net/results/c9a507757ce3a01cd08d596cb519ee9f19caf77c/ (mdio-tools)

Committed to 2024.02.x and 2024.11.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw
In reply to Thomas Petazzoni via buildroot
Quoted 27 lines · Thomas Petazzoni via buildroot

The variable <pkg>_LINUX_CONFIG_FIXUPS defined in the cryptodev-linux... has no effect. Indeed, the variable is only named CRYPTODEV_LINUX_CONFIG_FIXUPS.

But the variable name being <pkg>_LINUX_CONFIG_FIXUPS and the package name being CRYPTODEV_LINUX, the correct variable name is CRYPTODEV_LINUX_LINUX_CONFIG_FIXUPS.

Prior to this commit, a configuration with cryptodev-linux enabled would result in:

$ make VARS=PACKAGES_LINUX_CONFIG_FIXUPS printvars
$

Aka, empty, while PACKAGES_LINUX_CONFIG_FIXUPS collects in package/pkg-generic.mk the value of the <pkg>_LINUX_CONFIG_FIXUPS variables from all enabled packages.

With this patch applied:

$ make VARS=PACKAGES_LINUX_CONFIG_FIXUPS printvars
PACKAGES_LINUX_CONFIG_FIXUPS=		@if ! grep -q '^CONFIG_CRYPTO=[my]' /; then 	/usr/bin/sed -i -e '/^\(# \)\?CONFIG_CRYPTO\>/d' / && echo 'CONFIG_CRYPTO=y' >> /; fi
		@if ! grep -q '^CONFIG_CRYPTO_USER_API_AEAD=[my]' /; then 
	/usr/bin/sed -i -e '/^\(# \)\?CONFIG_CRYPTO_USER_API_AEAD\>/d' / && 
echo 'CONFIG_CRYPTO_USER_API_AEAD=y' >> /; fi
$
Quoted 4 lines

As one would expect.

Fixes 4b12336d1fad12fbb82b4d9144e6cb5636a12256 ("package/cryptodev-linux: needs CONFIG_CRYPTO_USER_API_AEAD")

Series applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#4 lore raw
In reply to Thomas Petazzoni via buildroot
Quoted 25 lines · Thomas Petazzoni via buildroot

The variable <pkg>_LINUX_CONFIG_FIXUPS defined in the cryptodev-linux... has no effect. Indeed, the variable is only named CRYPTODEV_LINUX_CONFIG_FIXUPS.

But the variable name being <pkg>_LINUX_CONFIG_FIXUPS and the package name being CRYPTODEV_LINUX, the correct variable name is CRYPTODEV_LINUX_LINUX_CONFIG_FIXUPS.

Prior to this commit, a configuration with cryptodev-linux enabled would result in:

$ make VARS=PACKAGES_LINUX_CONFIG_FIXUPS printvars
$

Aka, empty, while PACKAGES_LINUX_CONFIG_FIXUPS collects in package/pkg-generic.mk the value of the <pkg>_LINUX_CONFIG_FIXUPS variables from all enabled packages.

With this patch applied:

$ make VARS=PACKAGES_LINUX_CONFIG_FIXUPS printvars
PACKAGES_LINUX_CONFIG_FIXUPS=		@if ! grep -q '^CONFIG_CRYPTO=[my]' /; then 	/usr/bin/sed -i -e '/^\(# \)\?CONFIG_CRYPTO\>/d' / && echo 'CONFIG_CRYPTO=y' >> /; fi
		@if ! grep -q '^CONFIG_CRYPTO_USER_API_AEAD=[my]' /; then 	/usr/bin/sed -i -e '/^\(# \)\?CONFIG_CRYPTO_USER_API_AEAD\>/d' / && echo 'CONFIG_CRYPTO_USER_API_AEAD=y' >> /; fi
$
Quoted 4 lines

As one would expect.

Fixes 4b12336d1fad12fbb82b4d9144e6cb5636a12256 ("package/cryptodev-linux: needs CONFIG_CRYPTO_USER_API_AEAD")

Committed to 2024.02.x and 2024.11.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot