All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 01/22] core/pkg-utils: rationalise kconfig option mangling
  2020-04-04 12:10 [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts) Yann E. MORIN
@ 2020-04-04 12:10 ` Yann E. MORIN
  2020-08-30  7:54   ` Peter Korsgaard
  2020-04-04 12:10 ` [Buildroot] [PATCH 02/22] core/pkg-utils: kconfig mangling defaults to current package's .config Yann E. MORIN
                   ` (21 subsequent siblings)
  22 siblings, 1 reply; 32+ messages in thread
From: Yann E. MORIN @ 2020-04-04 12:10 UTC (permalink / raw)
  To: buildroot

Currently, we have three macros that may mangle a .config file. All
three are modeled after the same pattern: removing the existing option
from the .config file, then adding the new definition for that option;
all three also implement that pattern with the same commands: sed and
echo.

This is all good so far, because it was simple enough, and the always
worked on a file passed in parameter.

However, we're soon going to change this file parameter to make it
optional, so that the file will then be auto-deduced for the current
package. In that case, the file to sed adn echo into will be a more
complex structure than just the parameter.

As such, move the actual mangling down to a helper macro, that is called
from the three existing ones.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
---
 package/pkg-utils.mk | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
index d324934dba..91a492588e 100644
--- a/package/pkg-utils.mk
+++ b/package/pkg-utils.mk
@@ -11,20 +11,18 @@
 # package, and more.
 #
 
-define KCONFIG_ENABLE_OPT # (option, file)
-	$(SED) "/\\<$(1)\\>/d" $(2)
-	echo '$(1)=y' >> $(2)
+# KCONFIG_MUNGE_DOT_CONFIG (option, newline, file)
+define KCONFIG_MUNGE_DOT_CONFIG
+	$(SED) "/\\<$(strip $(1))\\>/d" $(strip $(3))
+	echo '$(strip $(2))' >> $(strip $(3))
 endef
 
-define KCONFIG_SET_OPT # (option, value, file)
-	$(SED) "/\\<$(1)\\>/d" $(3)
-	echo '$(1)=$(2)' >> $(3)
-endef
-
-define KCONFIG_DISABLE_OPT # (option, file)
-	$(SED) "/\\<$(1)\\>/d" $(2)
-	echo '# $(1) is not set' >> $(2)
-endef
+# KCONFIG_ENABLE_OPT (option, file)
+KCONFIG_ENABLE_OPT  = $(call KCONFIG_MUNGE_DOT_CONFIG, $(1), $(1)=y, $(2))
+# KCONFIG_SET_OPT (option, value, file)
+KCONFIG_SET_OPT     = $(call KCONFIG_MUNGE_DOT_CONFIG, $(1), $(1)=$(2), $(3))
+# KCONFIG_DISABLE_OPT  (option, file)
+KCONFIG_DISABLE_OPT = $(call KCONFIG_MUNGE_DOT_CONFIG, $(1), $(SHARP_SIGN) $(1) is not set, $(2))
 
 # Helper functions to determine the name of a package and its
 # directory from its makefile directory, using the $(MAKEFILE_LIST)
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 02/22] core/pkg-utils: kconfig mangling defaults to current package's .config
  2020-04-04 12:10 [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts) Yann E. MORIN
  2020-04-04 12:10 ` [Buildroot] [PATCH 01/22] core/pkg-utils: rationalise kconfig option mangling Yann E. MORIN
@ 2020-04-04 12:10 ` Yann E. MORIN
  2020-05-01 13:55   ` Thomas Petazzoni
  2020-08-30  7:54   ` Peter Korsgaard
  2020-04-04 12:10 ` [Buildroot] [PATCH 03/22] boot/barebox: don't specify .config to munge Yann E. MORIN
                   ` (20 subsequent siblings)
  22 siblings, 2 replies; 32+ messages in thread
From: Yann E. MORIN @ 2020-04-04 12:10 UTC (permalink / raw)
  To: buildroot

The kconfig mangling macros currently operate on the caller-supplied
.config file, on the assumption that the caller will always know what
file to mangle.

This was correct so far, as packages would indeed only mangle their own
.config files.

However, the linux kernel does its mangling based on whether some
packages are enabled or not. That list of conditional mangling is
getting bigger and bigger with each new package that needs such
mangling, culminating with the pending firewalld one [0]. Furthermore,
this mangling is not accessible to packages in br2-external trees. So
we'll want to have packages provide the mangling commands.

So we'll want the mangling to be done on the linux' .config file,,i.e.
and the expanding package context, not in the package calling the
macros.

But packages do not, and should not have knowledge about where the
.config file is, nor how it is named.

So we make the parameter to specify the .config file to mangle optional.
If it is set, this is what the macros will mangle; if it is not set, the
expanding packge's .config file will be used.

This has the added benefit that we do not have to repeat in the
exp[anding package context the knowledge of how the .config file is
named:

    FOO_KCONFIG_DOTCONFIG = .config
    define FOO_KCONFIG_FIXUPS_CMDS
        $(call KCONFIG_ENABLE_OPT,BLA,$(@D)/.config)
    endef

[0] http://lists.busybox.net/pipermail/buildroot/2020-March/278683.html

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
---
 package/pkg-kconfig.mk |  2 ++
 package/pkg-utils.mk   | 19 +++++++++++++------
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/package/pkg-kconfig.mk b/package/pkg-kconfig.mk
index e2d52ee8ed..9d65b21ec5 100644
--- a/package/pkg-kconfig.mk
+++ b/package/pkg-kconfig.mk
@@ -166,6 +166,7 @@ define $(2)_FIXUP_DOT_CONFIG
 	$$(Q)touch $$($(2)_DIR)/.stamp_kconfig_fixup_done
 endef
 
+$$($(2)_DIR)/.stamp_kconfig_fixup_done: PKG=$(2)
 $$($(2)_DIR)/.stamp_kconfig_fixup_done: $$($(2)_DIR)/$$($(2)_KCONFIG_STAMP_DOTCONFIG)
 	$$($(2)_FIXUP_DOT_CONFIG)
 
@@ -223,6 +224,7 @@ $(2)_CONFIGURATOR_MAKE_ENV = \
 # end up having a valid @D.
 #
 $$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)): $(1)-%: $$($(2)_DIR)/.kconfig_editor_%
+$$($(2)_DIR)/.kconfig_editor_%: PKG=$(2)
 $$($(2)_DIR)/.kconfig_editor_%: $$($(2)_DIR)/.stamp_kconfig_fixup_done
 	$$($(2)_CONFIGURATOR_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \
 		$$(PKG_KCONFIG_COMMON_OPTS) $$($(2)_KCONFIG_OPTS) $$(*)
diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
index 91a492588e..6b254235ec 100644
--- a/package/pkg-utils.mk
+++ b/package/pkg-utils.mk
@@ -11,17 +11,24 @@
 # package, and more.
 #
 
-# KCONFIG_MUNGE_DOT_CONFIG (option, newline, file)
+# KCONFIG_DOT_CONFIG ([file])
+KCONFIG_DOT_CONFIG = $(strip \
+	$(if $(strip $(1)), $(1), \
+		$($(PKG)_BUILDDIR)/$($(PKG)_KCONFIG_DOTCONFIG) \
+	) \
+)
+
+# KCONFIG_MUNGE_DOT_CONFIG (option, newline [, file])
 define KCONFIG_MUNGE_DOT_CONFIG
-	$(SED) "/\\<$(strip $(1))\\>/d" $(strip $(3))
-	echo '$(strip $(2))' >> $(strip $(3))
+	$(SED) "/\\<$(strip $(1))\\>/d" $(call KCONFIG_DOT_CONFIG,$(3))
+	echo '$(strip $(2))' >> $(call KCONFIG_DOT_CONFIG,$(3))
 endef
 
-# KCONFIG_ENABLE_OPT (option, file)
+# KCONFIG_ENABLE_OPT (option [, file])
 KCONFIG_ENABLE_OPT  = $(call KCONFIG_MUNGE_DOT_CONFIG, $(1), $(1)=y, $(2))
-# KCONFIG_SET_OPT (option, value, file)
+# KCONFIG_SET_OPT (option, value [, file])
 KCONFIG_SET_OPT     = $(call KCONFIG_MUNGE_DOT_CONFIG, $(1), $(1)=$(2), $(3))
-# KCONFIG_DISABLE_OPT  (option, file)
+# KCONFIG_DISABLE_OPT  (option [, file])
 KCONFIG_DISABLE_OPT = $(call KCONFIG_MUNGE_DOT_CONFIG, $(1), $(SHARP_SIGN) $(1) is not set, $(2))
 
 # Helper functions to determine the name of a package and its
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 03/22] boot/barebox: don't specify .config to munge
  2020-04-04 12:10 [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts) Yann E. MORIN
  2020-04-04 12:10 ` [Buildroot] [PATCH 01/22] core/pkg-utils: rationalise kconfig option mangling Yann E. MORIN
  2020-04-04 12:10 ` [Buildroot] [PATCH 02/22] core/pkg-utils: kconfig mangling defaults to current package's .config Yann E. MORIN
@ 2020-04-04 12:10 ` Yann E. MORIN
  2020-04-04 12:10 ` [Buildroot] [PATCH 04/22] boot/uboot: " Yann E. MORIN
                   ` (19 subsequent siblings)
  22 siblings, 0 replies; 32+ messages in thread
From: Yann E. MORIN @ 2020-04-04 12:10 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
 boot/barebox/barebox.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk
index 1efe5665de..422f27312d 100644
--- a/boot/barebox/barebox.mk
+++ b/boot/barebox/barebox.mk
@@ -110,8 +110,8 @@ endif
 
 ifneq ($$($(1)_CUSTOM_EMBEDDED_ENV_PATH),)
 define $(1)_KCONFIG_FIXUP_CMDS
-	$$(call KCONFIG_ENABLE_OPT,CONFIG_DEFAULT_ENVIRONMENT,$$(@D)/.config)
-	$$(call KCONFIG_SET_OPT,CONFIG_DEFAULT_ENVIRONMENT_PATH,"$$($(1)_CUSTOM_EMBEDDED_ENV_PATH)",$$(@D)/.config)
+	$$(call KCONFIG_ENABLE_OPT,CONFIG_DEFAULT_ENVIRONMENT)
+	$$(call KCONFIG_SET_OPT,CONFIG_DEFAULT_ENVIRONMENT_PATH,"$$($(1)_CUSTOM_EMBEDDED_ENV_PATH)")
 endef
 endif
 
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 04/22] boot/uboot: don't specify .config to munge
  2020-04-04 12:10 [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts) Yann E. MORIN
                   ` (2 preceding siblings ...)
  2020-04-04 12:10 ` [Buildroot] [PATCH 03/22] boot/barebox: don't specify .config to munge Yann E. MORIN
@ 2020-04-04 12:10 ` Yann E. MORIN
  2020-04-04 12:10 ` [Buildroot] [PATCH 05/22] boot/busybox: " Yann E. MORIN
                   ` (18 subsequent siblings)
  22 siblings, 0 replies; 32+ messages in thread
From: Yann E. MORIN @ 2020-04-04 12:10 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
 boot/uboot/uboot.mk | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index 2bfa50779b..7bd9cbae52 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -347,8 +347,7 @@ UBOOT_ZYNQMP_PMUFW_PATH = $(shell readlink -f $(UBOOT_ZYNQMP_PMUFW))
 endif
 
 define UBOOT_ZYNQMP_KCONFIG_PMUFW
-	$(call KCONFIG_SET_OPT,CONFIG_PMUFW_INIT_FILE,"$(UBOOT_ZYNQMP_PMUFW_PATH)", \
-	       $(@D)/.config)
+	$(call KCONFIG_SET_OPT,CONFIG_PMUFW_INIT_FILE,"$(UBOOT_ZYNQMP_PMUFW_PATH)")
 endef
 
 UBOOT_ZYNQMP_PSU_INIT = $(call qstrip,$(BR2_TARGET_UBOOT_ZYNQMP_PSU_INIT_FILE))
@@ -356,8 +355,7 @@ UBOOT_ZYNQMP_PSU_INIT_PATH = $(shell readlink -f $(UBOOT_ZYNQMP_PSU_INIT))
 
 ifneq ($(UBOOT_ZYNQMP_PSU_INIT),)
 define UBOOT_ZYNQMP_KCONFIG_PSU_INIT
-	$(call KCONFIG_SET_OPT,CONFIG_XILINX_PS_INIT_FILE,"$(UBOOT_ZYNQMP_PSU_INIT_PATH)", \
-		$(@D)/.config)
+	$(call KCONFIG_SET_OPT,CONFIG_XILINX_PS_INIT_FILE,"$(UBOOT_ZYNQMP_PSU_INIT_PATH)")
 endef
 endif
 
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 05/22] boot/busybox: don't specify .config to munge
  2020-04-04 12:10 [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts) Yann E. MORIN
                   ` (3 preceding siblings ...)
  2020-04-04 12:10 ` [Buildroot] [PATCH 04/22] boot/uboot: " Yann E. MORIN
@ 2020-04-04 12:10 ` Yann E. MORIN
  2020-04-04 12:10 ` [Buildroot] [PATCH 06/22] boot/swupdate: " Yann E. MORIN
                   ` (17 subsequent siblings)
  22 siblings, 0 replies; 32+ messages in thread
From: Yann E. MORIN @ 2020-04-04 12:10 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Adam Duskett <aduskett@gmail.com>
Cc: Carlos Santos <unixmania@gmail.com>
---
 package/busybox/busybox.mk | 71 +++++++++++++++++++-------------------
 1 file changed, 35 insertions(+), 36 deletions(-)

diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index b9d82ed71e..de5c8cbe8c 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -80,7 +80,6 @@ BUSYBOX_CFLAGS += "`$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`"
 BUSYBOX_CFLAGS_busybox += "`$(PKG_CONFIG_HOST_BINARY) --libs libtirpc`"
 endif
 
-BUSYBOX_BUILD_CONFIG = $(BUSYBOX_DIR)/.config
 # Allows the build system to tweak CFLAGS
 BUSYBOX_MAKE_ENV = \
 	$(TARGET_MAKE_ENV) \
@@ -148,53 +147,53 @@ define BUSYBOX_INSTALL_MDEV_CONF
 		$(TARGET_DIR)/etc/mdev.conf
 endef
 define BUSYBOX_SET_MDEV
-	$(call KCONFIG_ENABLE_OPT,CONFIG_MDEV,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_MDEV_CONF,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_MDEV_EXEC,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_MDEV_LOAD_FIRMWARE,$(BUSYBOX_BUILD_CONFIG))
+	$(call KCONFIG_ENABLE_OPT,CONFIG_MDEV)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_MDEV_CONF)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_MDEV_EXEC)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_MDEV_LOAD_FIRMWARE)
 endef
 endif
 
 # sha passwords need USE_BB_CRYPT_SHA
 ifeq ($(BR2_TARGET_GENERIC_PASSWD_SHA256)$(BR2_TARGET_GENERIC_PASSWD_SHA512),y)
 define BUSYBOX_SET_CRYPT_SHA
-	$(call KCONFIG_ENABLE_OPT,CONFIG_USE_BB_CRYPT_SHA,$(BUSYBOX_BUILD_CONFIG))
+	$(call KCONFIG_ENABLE_OPT,CONFIG_USE_BB_CRYPT_SHA)
 endef
 endif
 
 ifeq ($(BR2_USE_MMU),y)
 define BUSYBOX_SET_MMU
-	$(call KCONFIG_DISABLE_OPT,CONFIG_NOMMU,$(BUSYBOX_BUILD_CONFIG))
+	$(call KCONFIG_DISABLE_OPT,CONFIG_NOMMU)
 endef
 else
 define BUSYBOX_SET_MMU
-	$(call KCONFIG_ENABLE_OPT,CONFIG_NOMMU,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_DISABLE_OPT,CONFIG_SWAPON,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_DISABLE_OPT,CONFIG_SWAPOFF,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_DISABLE_OPT,CONFIG_ASH,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_BASH_COMPAT,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_BRACE_EXPANSION,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_HELP,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_INTERACTIVE,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_SAVEHISTORY,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_JOB,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_TICK,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_IF,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_LOOPS,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_CASE,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_FUNCTIONS,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_LOCAL,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_RANDOM_SUPPORT,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_EXPORT_N,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_MODE_X,$(BUSYBOX_BUILD_CONFIG))
+	$(call KCONFIG_ENABLE_OPT,CONFIG_NOMMU)
+	$(call KCONFIG_DISABLE_OPT,CONFIG_SWAPON)
+	$(call KCONFIG_DISABLE_OPT,CONFIG_SWAPOFF)
+	$(call KCONFIG_DISABLE_OPT,CONFIG_ASH)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_BASH_COMPAT)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_BRACE_EXPANSION)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_HELP)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_INTERACTIVE)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_SAVEHISTORY)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_JOB)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_TICK)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_IF)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_LOOPS)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_CASE)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_FUNCTIONS)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_LOCAL)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_RANDOM_SUPPORT)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_EXPORT_N)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_MODE_X)
 endef
 endif
 
 # If we're using static libs do the same for busybox
 ifeq ($(BR2_STATIC_LIBS),y)
 define BUSYBOX_PREFER_STATIC
-	$(call KCONFIG_ENABLE_OPT,CONFIG_STATIC,$(BUSYBOX_BUILD_CONFIG))
+	$(call KCONFIG_ENABLE_OPT,CONFIG_STATIC)
 endef
 endif
 
@@ -210,7 +209,7 @@ endef
 ifeq ($(BR2_INIT_BUSYBOX),y)
 
 define BUSYBOX_SET_INIT
-	$(call KCONFIG_ENABLE_OPT,CONFIG_INIT,$(BUSYBOX_BUILD_CONFIG))
+	$(call KCONFIG_ENABLE_OPT,CONFIG_INIT)
 endef
 
 ifeq ($(BR2_TARGET_GENERIC_GETTY),y)
@@ -232,15 +231,15 @@ endif # BR2_INIT_BUSYBOX
 ifeq ($(BR2_PACKAGE_BUSYBOX_SELINUX),y)
 BUSYBOX_DEPENDENCIES += host-pkgconf libselinux libsepol
 define BUSYBOX_SET_SELINUX
-	$(call KCONFIG_ENABLE_OPT,CONFIG_SELINUX,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_ENABLE_OPT,CONFIG_SELINUXENABLED,$(BUSYBOX_BUILD_CONFIG))
+	$(call KCONFIG_ENABLE_OPT,CONFIG_SELINUX)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_SELINUXENABLED)
 endef
 endif
 
 ifeq ($(BR2_PACKAGE_BUSYBOX_INDIVIDUAL_BINARIES),y)
 define BUSYBOX_SET_INDIVIDUAL_BINARIES
-	$(call KCONFIG_ENABLE_OPT,CONFIG_BUILD_LIBBUSYBOX,$(BUSYBOX_BUILD_CONFIG))
-	$(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_INDIVIDUAL,$(BUSYBOX_BUILD_CONFIG))
+	$(call KCONFIG_ENABLE_OPT,CONFIG_BUILD_LIBBUSYBOX)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_INDIVIDUAL)
 endef
 
 define BUSYBOX_INSTALL_INDIVIDUAL_BINARIES
@@ -285,7 +284,7 @@ endif
 
 ifeq ($(BR2_PACKAGE_BUSYBOX_WATCHDOG),y)
 define BUSYBOX_SET_WATCHDOG
-	$(call KCONFIG_ENABLE_OPT,CONFIG_WATCHDOG,$(BUSYBOX_BUILD_CONFIG))
+	$(call KCONFIG_ENABLE_OPT,CONFIG_WATCHDOG)
 endef
 define BUSYBOX_INSTALL_WATCHDOG_SCRIPT
 	$(INSTALL) -D -m 0755 package/busybox/S15watchdog \
@@ -298,12 +297,12 @@ endif
 # PAM support requires thread support in the toolchain
 ifeq ($(BR2_PACKAGE_LINUX_PAM)$(BR2_TOOLCHAIN_HAS_THREADS),yy)
 define BUSYBOX_LINUX_PAM
-	$(call KCONFIG_ENABLE_OPT,CONFIG_PAM,$(BUSYBOX_BUILD_CONFIG))
+	$(call KCONFIG_ENABLE_OPT,CONFIG_PAM)
 endef
 BUSYBOX_DEPENDENCIES += linux-pam
 else
 define BUSYBOX_LINUX_PAM
-	$(call KCONFIG_DISABLE_OPT,CONFIG_PAM,$(BUSYBOX_BUILD_CONFIG))
+	$(call KCONFIG_DISABLE_OPT,CONFIG_PAM)
 endef
 endif
 
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 06/22] boot/swupdate: don't specify .config to munge
  2020-04-04 12:10 [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts) Yann E. MORIN
                   ` (4 preceding siblings ...)
  2020-04-04 12:10 ` [Buildroot] [PATCH 05/22] boot/busybox: " Yann E. MORIN
@ 2020-04-04 12:10 ` Yann E. MORIN
  2020-04-04 12:10 ` [Buildroot] [PATCH 07/22] boot/uclibc: " Yann E. MORIN
                   ` (16 subsequent siblings)
  22 siblings, 0 replies; 32+ messages in thread
From: Yann E. MORIN @ 2020-04-04 12:10 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: J?rg Krause <joerg.krause@embedded.rocks>
---
 package/swupdate/swupdate.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/swupdate/swupdate.mk b/package/swupdate/swupdate.mk
index 237a44e233..a472232470 100644
--- a/package/swupdate/swupdate.mk
+++ b/package/swupdate/swupdate.mk
@@ -77,7 +77,7 @@ ifeq ($(BR2_PACKAGE_HAS_LUAINTERPRETER):$(BR2_STATIC_LIBS),y:)
 SWUPDATE_DEPENDENCIES += luainterpreter host-pkgconf
 # defines the base name for the pkg-config file ("lua" or "luajit")
 define SWUPDATE_SET_LUA_VERSION
-	$(call KCONFIG_SET_OPT,CONFIG_LUAPKG,$(BR2_PACKAGE_PROVIDES_LUAINTERPRETER),$(SWUPDATE_BUILD_CONFIG))
+	$(call KCONFIG_SET_OPT,CONFIG_LUAPKG,$(BR2_PACKAGE_PROVIDES_LUAINTERPRETER))
 endef
 SWUPDATE_MAKE_ENV += HAVE_LUA=y
 else
@@ -152,7 +152,7 @@ SWUPDATE_KCONFIG_EDITORS = menuconfig xconfig gconfig nconfig
 
 ifeq ($(BR2_STATIC_LIBS),y)
 define SWUPDATE_PREFER_STATIC
-	$(call KCONFIG_ENABLE_OPT,CONFIG_STATIC,$(SWUPDATE_BUILD_CONFIG))
+	$(call KCONFIG_ENABLE_OPT,CONFIG_STATIC)
 endef
 endif
 
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 07/22] boot/uclibc: don't specify .config to munge
  2020-04-04 12:10 [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts) Yann E. MORIN
                   ` (5 preceding siblings ...)
  2020-04-04 12:10 ` [Buildroot] [PATCH 06/22] boot/swupdate: " Yann E. MORIN
@ 2020-04-04 12:10 ` Yann E. MORIN
  2020-04-04 12:10 ` [Buildroot] [PATCH 08/22] linux: " Yann E. MORIN
                   ` (15 subsequent siblings)
  22 siblings, 0 replies; 32+ messages in thread
From: Yann E. MORIN @ 2020-04-04 12:10 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Waldemar Brodkorb <wbx@openadk.org>
---
 package/uclibc/uclibc.mk | 152 +++++++++++++++++++--------------------
 1 file changed, 76 insertions(+), 76 deletions(-)

diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk
index 2af666c208..cdbafe6231 100644
--- a/package/uclibc/uclibc.mk
+++ b/package/uclibc/uclibc.mk
@@ -54,18 +54,18 @@ endif
 # noMMU binary formats
 ifeq ($(BR2_BINFMT_FLAT_ONE),y)
 define UCLIBC_BINFMT_CONFIG
-	$(call KCONFIG_ENABLE_OPT,UCLIBC_FORMAT_FLAT,$(@D)/.config)
-	$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FLAT_SEP_DATA,$(@D)/.config)
-	$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_SHARED_FLAT,$(@D)/.config)
-	$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FDPIC_ELF,$(@D)/.config)
+	$(call KCONFIG_ENABLE_OPT,UCLIBC_FORMAT_FLAT)
+	$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FLAT_SEP_DATA)
+	$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_SHARED_FLAT)
+	$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FDPIC_ELF)
 endef
 endif
 ifeq ($(BR2_BINFMT_FLAT_SHARED),y)
 define UCLIBC_BINFMT_CONFIG
-	$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FLAT,$(@D)/.config)
-	$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FLAT_SEP_DATA,$(@D)/.config)
-	$(call KCONFIG_ENABLE_OPT,UCLIBC_FORMAT_SHARED_FLAT,$(@D)/.config)
-	$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FDPIC_ELF,$(@D)/.config)
+	$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FLAT)
+	$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FLAT_SEP_DATA)
+	$(call KCONFIG_ENABLE_OPT,UCLIBC_FORMAT_SHARED_FLAT)
+	$(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FDPIC_ELF)
 endef
 endif
 
@@ -77,12 +77,12 @@ ifeq ($(UCLIBC_TARGET_ARCH),arc)
 UCLIBC_ARC_PAGE_SIZE = CONFIG_ARC_PAGE_SIZE_$(call qstrip,$(BR2_ARC_PAGE_SIZE))
 define UCLIBC_ARC_PAGE_SIZE_CONFIG
 	$(SED) '/CONFIG_ARC_PAGE_SIZE_*/d' $(@D)/.config
-	$(call KCONFIG_ENABLE_OPT,$(UCLIBC_ARC_PAGE_SIZE),$(@D)/.config)
+	$(call KCONFIG_ENABLE_OPT,$(UCLIBC_ARC_PAGE_SIZE))
 endef
 
 ifeq ($(BR2_ARC_ATOMIC_EXT),)
 define UCLIBC_ARC_ATOMICS_CONFIG
-	$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_HAS_ATOMICS,$(@D)/.config)
+	$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_HAS_ATOMICS)
 endef
 endif
 
@@ -95,12 +95,12 @@ endif # arc
 ifeq ($(UCLIBC_TARGET_ARCH),arm)
 define UCLIBC_ARM_ABI_CONFIG
 	$(SED) '/CONFIG_ARM_.ABI/d' $(@D)/.config
-	$(call KCONFIG_ENABLE_OPT,CONFIG_ARM_EABI,$(@D)/.config)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_ARM_EABI)
 endef
 
 ifeq ($(BR2_BINFMT_FLAT),y)
 define UCLIBC_ARM_BINFMT_FLAT
-	$(call KCONFIG_DISABLE_OPT,DOPIC,$(@D)/.config)
+	$(call KCONFIG_DISABLE_OPT,DOPIC)
 endef
 endif
 
@@ -110,7 +110,7 @@ endif
 # support the ARM instructions.
 ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB2):$(BR2_ARM_CPU_HAS_ARM),y:)
 define UCLIBC_ARM_NO_CONTEXT_FUNCS
-	$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_CONTEXT_FUNCS,$(@D)/.config)
+	$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_CONTEXT_FUNCS)
 endef
 endif
 
@@ -125,7 +125,7 @@ ifeq ($(UCLIBC_TARGET_ARCH),m68k)
 # disable DOPIC for flat without separate data
 ifeq ($(BR2_BINFMT_FLAT_ONE),y)
 define UCLIBC_M68K_BINFMT_FLAT
-	$(call KCONFIG_DISABLE_OPT,DOPIC,$(@D)/.config)
+	$(call KCONFIG_DISABLE_OPT,DOPIC)
 endef
 endif
 
@@ -139,13 +139,13 @@ ifeq ($(UCLIBC_TARGET_ARCH),mips)
 UCLIBC_MIPS_ABI = CONFIG_MIPS_$(call qstrip,$(BR2_UCLIBC_MIPS_ABI))_ABI
 define UCLIBC_MIPS_ABI_CONFIG
 	$(SED) '/CONFIG_MIPS_[NO].._ABI/d' $(@D)/.config
-	$(call KCONFIG_ENABLE_OPT,$(UCLIBC_MIPS_ABI),$(@D)/.config)
+	$(call KCONFIG_ENABLE_OPT,$(UCLIBC_MIPS_ABI))
 endef
 
 UCLIBC_MIPS_NAN = CONFIG_MIPS_NAN_$(call qstrip,$(BR2_UCLIBC_MIPS_NAN))
 define UCLIBC_MIPS_NAN_CONFIG
 	$(SED) '/CONFIG_MIPS_NAN_.*/d' $(@D)/.config
-	$(call KCONFIG_ENABLE_OPT,$(UCLIBC_MIPS_NAN),$(@D)/.config)
+	$(call KCONFIG_ENABLE_OPT,$(UCLIBC_MIPS_NAN))
 endef
 endif # mips
 
@@ -157,7 +157,7 @@ ifeq ($(UCLIBC_TARGET_ARCH),sh)
 UCLIBC_SH_TYPE = CONFIG_$(call qstrip,$(BR2_UCLIBC_SH_TYPE))
 define UCLIBC_SH_TYPE_CONFIG
 	$(SED) '/CONFIG_SH[234A]*/d' $(@D)/.config
-	$(call KCONFIG_ENABLE_OPT,$(UCLIBC_SH_TYPE),$(@D)/.config)
+	$(call KCONFIG_ENABLE_OPT,$(UCLIBC_SH_TYPE))
 endef
 endif # sh
 
@@ -170,7 +170,7 @@ UCLIBC_SPARC_TYPE = CONFIG_SPARC_$(call qstrip,$(BR2_UCLIBC_SPARC_TYPE))
 define UCLIBC_SPARC_TYPE_CONFIG
 	$(SED) 's/^\(CONFIG_[^_]*[_]*SPARC[^=]*\)=.*/# \1 is not set/g' \
 		$(@D)/.config
-	$(call KCONFIG_ENABLE_OPT,$(UCLIBC_SPARC_TYPE),$(@D)/.config)
+	$(call KCONFIG_ENABLE_OPT,$(UCLIBC_SPARC_TYPE))
 endef
 endif # sparc
 
@@ -181,9 +181,9 @@ endif # sparc
 ifeq ($(UCLIBC_TARGET_ARCH),powerpc)
 UCLIBC_POWERPC_TYPE = CONFIG_$(call qstrip,$(BR2_UCLIBC_POWERPC_TYPE))
 define UCLIBC_POWERPC_TYPE_CONFIG
-	$(call KCONFIG_DISABLE_OPT,CONFIG_GENERIC,$(@D)/.config)
-	$(call KCONFIG_DISABLE_OPT,CONFIG_E500,$(@D)/.config)
-	$(call KCONFIG_ENABLE_OPT,$(UCLIBC_POWERPC_TYPE),$(@D)/.config)
+	$(call KCONFIG_DISABLE_OPT,CONFIG_GENERIC)
+	$(call KCONFIG_DISABLE_OPT,CONFIG_E500)
+	$(call KCONFIG_ENABLE_OPT,$(UCLIBC_POWERPC_TYPE))
 endef
 endif # powerpc
 
@@ -193,7 +193,7 @@ endif # powerpc
 ifeq ($(UCLIBC_TARGET_ARCH),i386)
 UCLIBC_X86_TYPE = CONFIG_$(call qstrip,$(BR2_UCLIBC_X86_TYPE))
 define UCLIBC_X86_TYPE_CONFIG
-	$(call KCONFIG_ENABLE_OPT,$(UCLIBC_X86_TYPE),$(@D)/.config)
+	$(call KCONFIG_ENABLE_OPT,$(UCLIBC_X86_TYPE))
 endef
 endif
 
@@ -202,7 +202,7 @@ endif
 #
 ifeq ($(BR2_ENABLE_DEBUG),y)
 define UCLIBC_DEBUG_CONFIG
-	$(call KCONFIG_ENABLE_OPT,DODEBUG,$(@D)/.config)
+	$(call KCONFIG_ENABLE_OPT,DODEBUG)
 endef
 endif
 
@@ -212,17 +212,17 @@ endif
 
 ifeq ($(call qstrip,$(BR2_ENDIAN)),BIG)
 define UCLIBC_ENDIAN_CONFIG
-	$(call KCONFIG_ENABLE_OPT,ARCH_BIG_ENDIAN,$(@D)/.config)
-	$(call KCONFIG_ENABLE_OPT,ARCH_WANTS_BIG_ENDIAN,$(@D)/.config)
-	$(call KCONFIG_DISABLE_OPT,ARCH_LITTLE_ENDIAN,$(@D)/.config)
-	$(call KCONFIG_DISABLE_OPT,ARCH_WANTS_LITTLE_ENDIAN,$(@D)/.config)
+	$(call KCONFIG_ENABLE_OPT,ARCH_BIG_ENDIAN)
+	$(call KCONFIG_ENABLE_OPT,ARCH_WANTS_BIG_ENDIAN)
+	$(call KCONFIG_DISABLE_OPT,ARCH_LITTLE_ENDIAN)
+	$(call KCONFIG_DISABLE_OPT,ARCH_WANTS_LITTLE_ENDIAN)
 endef
 else
 define UCLIBC_ENDIAN_CONFIG
-	$(call KCONFIG_ENABLE_OPT,ARCH_LITTLE_ENDIAN,$(@D)/.config)
-	$(call KCONFIG_ENABLE_OPT,ARCH_WANTS_LITTLE_ENDIAN,$(@D)/.config)
-	$(call KCONFIG_DISABLE_OPT,ARCH_BIG_ENDIAN,$(@D)/.config)
-	$(call KCONFIG_DISABLE_OPT,ARCH_WANTS_BIG_ENDIAN,$(@D)/.config)
+	$(call KCONFIG_ENABLE_OPT,ARCH_LITTLE_ENDIAN)
+	$(call KCONFIG_ENABLE_OPT,ARCH_WANTS_LITTLE_ENDIAN)
+	$(call KCONFIG_DISABLE_OPT,ARCH_BIG_ENDIAN)
+	$(call KCONFIG_DISABLE_OPT,ARCH_WANTS_BIG_ENDIAN)
 endef
 endif
 
@@ -232,13 +232,13 @@ endif
 
 ifeq ($(BR2_USE_MMU),y)
 define UCLIBC_MMU_CONFIG
-	$(call KCONFIG_ENABLE_OPT,ARCH_HAS_MMU,$(@D)/.config)
-	$(call KCONFIG_ENABLE_OPT,ARCH_USE_MMU,$(@D)/.config)
+	$(call KCONFIG_ENABLE_OPT,ARCH_HAS_MMU)
+	$(call KCONFIG_ENABLE_OPT,ARCH_USE_MMU)
 endef
 else
 define UCLIBC_MMU_CONFIG
-	$(call KCONFIG_DISABLE_OPT,ARCH_HAS_MMU,$(@D)/.config)
-	$(call KCONFIG_DISABLE_OPT,ARCH_USE_MMU,$(@D)/.config)
+	$(call KCONFIG_DISABLE_OPT,ARCH_HAS_MMU)
+	$(call KCONFIG_DISABLE_OPT,ARCH_USE_MMU)
 endef
 endif
 
@@ -246,7 +246,7 @@ endif
 # IPv6
 #
 
-UCLIBC_IPV6_CONFIG = $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_IPV6,$(@D)/.config)
+UCLIBC_IPV6_CONFIG = $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_IPV6)
 
 #
 # soft-float
@@ -254,14 +254,14 @@ UCLIBC_IPV6_CONFIG = $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_IPV6,$(@D)/.config)
 
 ifeq ($(BR2_SOFT_FLOAT),y)
 define UCLIBC_FLOAT_CONFIG
-	$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_FPU,$(@D)/.config)
-	$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_FLOATS,$(@D)/.config)
-	$(call KCONFIG_ENABLE_OPT,DO_C99_MATH,$(@D)/.config)
+	$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_FPU)
+	$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_FLOATS)
+	$(call KCONFIG_ENABLE_OPT,DO_C99_MATH)
 endef
 else
 define UCLIBC_FLOAT_CONFIG
-	$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_FPU,$(@D)/.config)
-	$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_FLOATS,$(@D)/.config)
+	$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_FPU)
+	$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_FLOATS)
 endef
 endif
 
@@ -270,13 +270,13 @@ endif
 #
 ifeq ($(BR2_TOOLCHAIN_BUILDROOT_USE_SSP),y)
 define UCLIBC_SSP_CONFIG
-	$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_SSP,$(@D)/.config)
-	$(call KCONFIG_ENABLE_OPT,UCLIBC_BUILD_SSP,$(@D)/.config)
+	$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_SSP)
+	$(call KCONFIG_ENABLE_OPT,UCLIBC_BUILD_SSP)
 endef
 else
 define UCLIBC_SSP_CONFIG
-	$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_SSP,$(@D)/.config)
-	$(call KCONFIG_DISABLE_OPT,UCLIBC_BUILD_SSP,$(@D)/.config)
+	$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_SSP)
+	$(call KCONFIG_DISABLE_OPT,UCLIBC_BUILD_SSP)
 endef
 endif
 
@@ -285,21 +285,21 @@ endif
 #
 ifeq ($(BR2_PTHREADS_NONE),y)
 define UCLIBC_THREAD_CONFIG
-	$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_THREADS,$(@D)/.config)
-	$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_LINUXTHREADS,$(@D)/.config)
-	$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_THREADS_NATIVE,$(@D)/.config)
+	$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_THREADS)
+	$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_LINUXTHREADS)
+	$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_THREADS_NATIVE)
 endef
 else ifeq ($(BR2_PTHREADS),y)
 define UCLIBC_THREAD_CONFIG
-	$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_THREADS,$(@D)/.config)
-	$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_LINUXTHREADS,$(@D)/.config)
-	$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_THREADS_NATIVE,$(@D)/.config)
+	$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_THREADS)
+	$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_LINUXTHREADS)
+	$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_THREADS_NATIVE)
 endef
 else ifeq ($(BR2_PTHREADS_NATIVE),y)
 define UCLIBC_THREAD_CONFIG
-	$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_THREADS,$(@D)/.config)
-	$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_LINUXTHREADS,$(@D)/.config)
-	$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_THREADS_NATIVE,$(@D)/.config)
+	$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_THREADS)
+	$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_LINUXTHREADS)
+	$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_THREADS_NATIVE)
 endef
 endif
 
@@ -308,9 +308,9 @@ endif
 #
 
 ifeq ($(BR2_PTHREAD_DEBUG),y)
-UCLIBC_THREAD_DEBUG_CONFIG = $(call KCONFIG_ENABLE_OPT,PTHREADS_DEBUG_SUPPORT,$(@D)/.config)
+UCLIBC_THREAD_DEBUG_CONFIG = $(call KCONFIG_ENABLE_OPT,PTHREADS_DEBUG_SUPPORT)
 else
-UCLIBC_THREAD_DEBUG_CONFIG = $(call KCONFIG_DISABLE_OPT,PTHREADS_DEBUG_SUPPORT,$(@D)/.config)
+UCLIBC_THREAD_DEBUG_CONFIG = $(call KCONFIG_DISABLE_OPT,PTHREADS_DEBUG_SUPPORT)
 endif
 
 #
@@ -319,18 +319,18 @@ endif
 
 ifeq ($(BR2_TOOLCHAIN_BUILDROOT_LOCALE),y)
 define UCLIBC_LOCALE_CONFIG
-	$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_LOCALE,$(@D)/.config)
-	$(call KCONFIG_DISABLE_OPT,UCLIBC_BUILD_ALL_LOCALE,$(@D)/.config)
-	$(call KCONFIG_ENABLE_OPT,UCLIBC_BUILD_MINIMAL_LOCALE,$(@D)/.config)
-	$(call KCONFIG_SET_OPT,UCLIBC_BUILD_MINIMAL_LOCALES,"$(UCLIBC_LOCALES)",$(@D)/.config)
-	$(call KCONFIG_DISABLE_OPT,UCLIBC_PREGENERATED_LOCALE_DATA,$(@D)/.config)
-	$(call KCONFIG_DISABLE_OPT,DOWNLOAD_PREGENERATED_LOCALE_DATA,$(@D)/.config)
-	$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_XLOCALE,$(@D)/.config)
-	$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_GLIBC_DIGIT_GROUPING,$(@D)/.config)
+	$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_LOCALE)
+	$(call KCONFIG_DISABLE_OPT,UCLIBC_BUILD_ALL_LOCALE)
+	$(call KCONFIG_ENABLE_OPT,UCLIBC_BUILD_MINIMAL_LOCALE)
+	$(call KCONFIG_SET_OPT,UCLIBC_BUILD_MINIMAL_LOCALES,"$(UCLIBC_LOCALES)")
+	$(call KCONFIG_DISABLE_OPT,UCLIBC_PREGENERATED_LOCALE_DATA)
+	$(call KCONFIG_DISABLE_OPT,DOWNLOAD_PREGENERATED_LOCALE_DATA)
+	$(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_XLOCALE)
+	$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_GLIBC_DIGIT_GROUPING)
 endef
 else
 define UCLIBC_LOCALE_CONFIG
-	$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_LOCALE,$(@D)/.config)
+	$(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_LOCALE)
 endef
 endif
 
@@ -339,9 +339,9 @@ endif
 #
 
 ifeq ($(BR2_TOOLCHAIN_BUILDROOT_WCHAR),y)
-UCLIBC_WCHAR_CONFIG = $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_WCHAR,$(@D)/.config)
+UCLIBC_WCHAR_CONFIG = $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_WCHAR)
 else
-UCLIBC_WCHAR_CONFIG = $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_WCHAR,$(@D)/.config)
+UCLIBC_WCHAR_CONFIG = $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_WCHAR)
 endif
 
 #
@@ -349,9 +349,9 @@ endif
 #
 
 ifeq ($(BR2_STATIC_LIBS),y)
-UCLIBC_SHARED_LIBS_CONFIG = $(call KCONFIG_DISABLE_OPT,HAVE_SHARED,$(@D)/.config)
+UCLIBC_SHARED_LIBS_CONFIG = $(call KCONFIG_DISABLE_OPT,HAVE_SHARED)
 else
-UCLIBC_SHARED_LIBS_CONFIG = $(call KCONFIG_ENABLE_OPT,HAVE_SHARED,$(@D)/.config)
+UCLIBC_SHARED_LIBS_CONFIG = $(call KCONFIG_ENABLE_OPT,HAVE_SHARED)
 endif
 
 #
@@ -365,13 +365,13 @@ UCLIBC_MAKE_FLAGS = \
 	HOSTCC="$(HOSTCC)"
 
 define UCLIBC_KCONFIG_FIXUP_CMDS
-	$(call KCONFIG_SET_OPT,CROSS_COMPILER_PREFIX,"$(TARGET_CROSS)",$(@D)/.config)
-	$(call KCONFIG_ENABLE_OPT,TARGET_$(UCLIBC_TARGET_ARCH),$(@D)/.config)
-	$(call KCONFIG_SET_OPT,TARGET_ARCH,"$(UCLIBC_TARGET_ARCH)",$(@D)/.config)
-	$(call KCONFIG_SET_OPT,KERNEL_HEADERS,"$(LINUX_HEADERS_DIR)/usr/include",$(@D)/.config)
-	$(call KCONFIG_SET_OPT,RUNTIME_PREFIX,"/",$(@D)/.config)
-	$(call KCONFIG_SET_OPT,DEVEL_PREFIX,"/usr",$(@D)/.config)
-	$(call KCONFIG_SET_OPT,SHARED_LIB_LOADER_PREFIX,"/lib",$(@D)/.config)
+	$(call KCONFIG_SET_OPT,CROSS_COMPILER_PREFIX,"$(TARGET_CROSS)")
+	$(call KCONFIG_ENABLE_OPT,TARGET_$(UCLIBC_TARGET_ARCH))
+	$(call KCONFIG_SET_OPT,TARGET_ARCH,"$(UCLIBC_TARGET_ARCH)")
+	$(call KCONFIG_SET_OPT,KERNEL_HEADERS,"$(LINUX_HEADERS_DIR)/usr/include")
+	$(call KCONFIG_SET_OPT,RUNTIME_PREFIX,"/")
+	$(call KCONFIG_SET_OPT,DEVEL_PREFIX,"/usr")
+	$(call KCONFIG_SET_OPT,SHARED_LIB_LOADER_PREFIX,"/lib")
 	$(UCLIBC_MMU_CONFIG)
 	$(UCLIBC_BINFMT_CONFIG)
 	$(UCLIBC_ARC_PAGE_SIZE_CONFIG)
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 08/22] linux: don't specify .config to munge
  2020-04-04 12:10 [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts) Yann E. MORIN
                   ` (6 preceding siblings ...)
  2020-04-04 12:10 ` [Buildroot] [PATCH 07/22] boot/uclibc: " Yann E. MORIN
@ 2020-04-04 12:10 ` Yann E. MORIN
  2020-04-04 12:10 ` [Buildroot] [PATCH 09/22] linux: allow packages to set options Yann E. MORIN
                   ` (14 subsequent siblings)
  22 siblings, 0 replies; 32+ messages in thread
From: Yann E. MORIN @ 2020-04-04 12:10 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
---
 linux/linux.mk | 140 ++++++++++++++++++++++++-------------------------
 1 file changed, 70 insertions(+), 70 deletions(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index 3d9052a337..f6155a1a36 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -304,40 +304,40 @@ LINUX_NEEDS_MODULES ?= $(BR2_LINUX_NEEDS_MODULES)
 # option will be thrown away and ignored if it doesn't exist.
 ifeq ($(BR2_ENDIAN),"BIG")
 define LINUX_FIXUP_CONFIG_ENDIANNESS
-	$(call KCONFIG_ENABLE_OPT,CONFIG_CPU_BIG_ENDIAN,$(@D)/.config)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_CPU_BIG_ENDIAN)
 endef
 else
 define LINUX_FIXUP_CONFIG_ENDIANNESS
-	$(call KCONFIG_ENABLE_OPT,CONFIG_CPU_LITTLE_ENDIAN,$(@D)/.config)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_CPU_LITTLE_ENDIAN)
 endef
 endif
 
 define LINUX_KCONFIG_FIXUP_CMDS
 	$(if $(LINUX_NEEDS_MODULES),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_MODULES,$(@D)/.config))
-	$(call KCONFIG_ENABLE_OPT,$(strip $(LINUX_COMPRESSION_OPT_y)),$(@D)/.config)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_MODULES))
+	$(call KCONFIG_ENABLE_OPT,$(strip $(LINUX_COMPRESSION_OPT_y)))
 	$(foreach opt, $(LINUX_COMPRESSION_OPT_),
-		$(call KCONFIG_DISABLE_OPT,$(opt),$(@D)/.config)
+		$(call KCONFIG_DISABLE_OPT,$(opt))
 	)
 	$(LINUX_FIXUP_CONFIG_ENDIANNESS)
 	$(if $(BR2_arm)$(BR2_armeb),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(@D)/.config))
+		$(call KCONFIG_ENABLE_OPT,CONFIG_AEABI))
 	$(if $(BR2_powerpc)$(BR2_powerpc64)$(BR2_powerpc64le),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_PPC_DISABLE_WERROR,$(@D)/.config))
+		$(call KCONFIG_ENABLE_OPT,CONFIG_PPC_DISABLE_WERROR))
 	$(if $(BR2_ARC_PAGE_SIZE_4K),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_ARC_PAGE_SIZE_4K,$(@D)/.config)
-		$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_8K,$(@D)/.config)
-		$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_16K,$(@D)/.config))
+		$(call KCONFIG_ENABLE_OPT,CONFIG_ARC_PAGE_SIZE_4K)
+		$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_8K)
+		$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_16K))
 	$(if $(BR2_ARC_PAGE_SIZE_8K),
-		$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_4K,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_ARC_PAGE_SIZE_8K,$(@D)/.config)
-		$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_16K,$(@D)/.config))
+		$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_4K)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_ARC_PAGE_SIZE_8K)
+		$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_16K))
 	$(if $(BR2_ARC_PAGE_SIZE_16K),
-		$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_4K,$(@D)/.config)
-		$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_8K,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_ARC_PAGE_SIZE_16K,$(@D)/.config))
+		$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_4K)
+		$(call KCONFIG_DISABLE_OPT,CONFIG_ARC_PAGE_SIZE_8K)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_ARC_PAGE_SIZE_16K))
 	$(if $(BR2_TARGET_ROOTFS_CPIO),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD,$(@D)/.config))
+		$(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD))
 	# As the kernel gets compiled before root filesystems are
 	# built, we create a fake cpio file. It'll be
 	# replaced later by the real cpio archive, and the kernel will be
@@ -345,77 +345,77 @@ define LINUX_KCONFIG_FIXUP_CMDS
 	$(if $(BR2_TARGET_ROOTFS_INITRAMFS),
 		mkdir -p $(BINARIES_DIR)
 		touch $(BINARIES_DIR)/rootfs.cpio
-		$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,"$${BR_BINARIES_DIR}/rootfs.cpio",$(@D)/.config)
-		$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_UID,0,$(@D)/.config)
-		$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_GID,0,$(@D)/.config))
+		$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,"$${BR_BINARIES_DIR}/rootfs.cpio")
+		$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_UID,0)
+		$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_GID,0))
 	$(if $(BR2_ROOTFS_DEVICE_CREATION_STATIC),,
-		$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(@D)/.config))
+		$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT))
 	$(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config))
+		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER))
 	$(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_NET,$(@D)/.config))
+		$(call KCONFIG_ENABLE_OPT,CONFIG_NET))
 	$(if $(BR2_PACKAGE_AUDIT),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_NET,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_AUDIT,$(@D)/.config))
+		$(call KCONFIG_ENABLE_OPT,CONFIG_NET)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_AUDIT))
 	$(if $(BR2_PACKAGE_INTEL_MICROCODE),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_MICROCODE,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_MICROCODE_INTEL,$(@D)/.config))
+		$(call KCONFIG_ENABLE_OPT,CONFIG_MICROCODE)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_MICROCODE_INTEL))
 	$(if $(BR2_PACKAGE_KTAP),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_DEBUG_FS,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_ENABLE_DEFAULT_TRACERS,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_PERF_EVENTS,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_FUNCTION_TRACER,$(@D)/.config))
+		$(call KCONFIG_ENABLE_OPT,CONFIG_DEBUG_FS)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_ENABLE_DEFAULT_TRACERS)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_PERF_EVENTS)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_FUNCTION_TRACER))
 	$(if $(BR2_PACKAGE_LINUX_TOOLS_PERF),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_PERF_EVENTS,$(@D)/.config))
+		$(call KCONFIG_ENABLE_OPT,CONFIG_PERF_EVENTS))
 	$(if $(BR2_PACKAGE_PCM_TOOLS),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_X86_MSR,$(@D)/.config))
+		$(call KCONFIG_ENABLE_OPT,CONFIG_X86_MSR))
 	$(if $(BR2_PACKAGE_SYSTEMD),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_FHANDLE,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_AUTOFS4_FS,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_POSIX_ACL,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_XATTR,$(@D)/.config))
+		$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_FHANDLE)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_AUTOFS4_FS)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_POSIX_ACL)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_XATTR))
 	$(if $(BR2_PACKAGE_SMACK),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_SMACK,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_NETWORK,$(@D)/.config))
+		$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_SMACK)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_NETWORK))
 	$(if $(BR2_PACKAGE_SUNXI_MALI_MAINLINE_DRIVER),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_CMA,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_DMA_CMA,$(@D)/.config))
+		$(call KCONFIG_ENABLE_OPT,CONFIG_CMA)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_DMA_CMA))
 	$(if $(BR2_PACKAGE_IPTABLES),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_IPTABLES,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_FILTER,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_XTABLES,$(@D)/.config))
+		$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_IPTABLES)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_FILTER)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_XTABLES))
 	$(if $(BR2_PACKAGE_XTABLES_ADDONS),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_ADVANCED,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_NF_CONNTRACK,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_NF_CONNTRACK_MARK,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_NF_NAT,$(@D)/.config))
+		$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_ADVANCED)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_NF_CONNTRACK)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_NF_CONNTRACK_MARK)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_NF_NAT))
 	$(if $(BR2_PACKAGE_WIREGUARD_LINUX_COMPAT),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_INET,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_NET,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_NET_FOU,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_CRYPTO,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_CRYPTO_MANAGER,$(@D)/.config))
+		$(call KCONFIG_ENABLE_OPT,CONFIG_INET)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_NET)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_NET_FOU)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_CRYPTO)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_CRYPTO_MANAGER))
 	$(if $(BR2_LINUX_KERNEL_APPENDED_DTB),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_ARM_APPENDED_DTB,$(@D)/.config))
+		$(call KCONFIG_ENABLE_OPT,CONFIG_ARM_APPENDED_DTB))
 	$(if $(BR2_PACKAGE_KERNEL_MODULE_IMX_GPU_VIV),
-		$(call KCONFIG_DISABLE_OPT,CONFIG_MXC_GPU_VIV,$(@D)/.config))
+		$(call KCONFIG_DISABLE_OPT,CONFIG_MXC_GPU_VIV))
 	$(if $(LINUX_KERNEL_CUSTOM_LOGO_PATH),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_FB,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_LOGO,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_LOGO_LINUX_CLUT224,$(@D)/.config))
+		$(call KCONFIG_ENABLE_OPT,CONFIG_FB)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_LOGO)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_LOGO_LINUX_CLUT224))
 	$(if $(BR2_PACKAGE_LIBSELINUX),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_AUDIT,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_DEFAULT_SECURITY_SELINUX,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_INET,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_NET,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_NETWORK,$(@D)/.config)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_SELINUX,$(@D)/.config))
+		$(call KCONFIG_ENABLE_OPT,CONFIG_AUDIT)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_DEFAULT_SECURITY_SELINUX)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_INET)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_NET)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_NETWORK)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_SELINUX))
 endef
 
 ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT),y)
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 09/22] linux: allow packages to set options
  2020-04-04 12:10 [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts) Yann E. MORIN
                   ` (7 preceding siblings ...)
  2020-04-04 12:10 ` [Buildroot] [PATCH 08/22] linux: " Yann E. MORIN
@ 2020-04-04 12:10 ` Yann E. MORIN
  2020-05-01 13:56   ` Thomas Petazzoni
  2020-04-04 12:10 ` [Buildroot] [PATCH 10/22] package/audit: bear the kernel options munging Yann E. MORIN
                   ` (13 subsequent siblings)
  22 siblings, 1 reply; 32+ messages in thread
From: Yann E. MORIN @ 2020-04-04 12:10 UTC (permalink / raw)
  To: buildroot

Currently, the linux kernel will apply some fixups on its .config file,
based on whether some packages are enabled or not. That list of
conditional fixups is getting bigger and bigger with each new package
that needs such fixups, culminating with the pending firewalld one [0].

Furthermore, these fixups are not accessible to packages in br2-external
trees.

Add a new per-package variable, that packages may set to the commands to
run to fixup the kernel .config file, which is added at the end of the
linux' own fixups.

This opens the possibility to write things like;

    define FOO_LINUX_CONFIG_FIXUPS
        $(call KCONFIG_ENABLE_OPT,BLA)
    endef

Of course, it also opens the way to run arbitrary commands in there, but
any alternative that would be declarative only, such as a list of
options to enable or disable (as an example):

    FOO_LINUX_CONFIG_FIXUPS = +BAR -FOO +BUZ="value"

.. is not very nice either, and such lists fall flat when a value would
have a space.

For packages that we have in-tree, we can ensure they won't play foul
with their _LINUX_CONFIG_FIXUPS. For packages in br2-external trees,
there's nothing we can do; users already have the opportunity to hack
into the linux configure process by providing LINUX_PRE_CONFIGURE_HOOKS
or LINUX_POST_CONFIGURE_HOOKS anyway...

.. which brings the question of why we don't use that to implement the
per-package fixups. We don;t, because _PRE or _POST_CONFIGURE_HOOKS are
run after we run 'make oldconfig' to sanitise the mangled .config.

[0] http://lists.busybox.net/pipermail/buildroot/2020-March/278683.html

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Cc: Adam Duskett <aduskett@gmail.com>
---
 docs/manual/adding-packages-generic.txt | 9 +++++++++
 linux/linux.mk                          | 1 +
 package/pkg-generic.mk                  | 3 +++
 3 files changed, 13 insertions(+)

diff --git a/docs/manual/adding-packages-generic.txt b/docs/manual/adding-packages-generic.txt
index ed1e6acf57..7f06066359 100644
--- a/docs/manual/adding-packages-generic.txt
+++ b/docs/manual/adding-packages-generic.txt
@@ -577,6 +577,15 @@ different steps of the build process.
   This is seldom used, as packages rarely have custom rules. *Do not use
   this variable*, unless you really know that you need to print help.
 
+* +LIBFOO_LINUX_CONFIG_FIXUPS+ lists the strictly required linux kernel
+  options that are uncommon, and without which the package is
+  *fundamentally* broken. This shall be a set of calls to one of the
+  kconfig tweaking option: `KCONFIG_ENABLE_OPT`, `KCONFIG_DISABLE_OPT`,
+  or `KCONFIG_SET_OPT`.
+  This is seldom used, as package usually have no strict requirements on
+  the kernel options. *Do not use this variable*, unless you really know
+  that you need to set kernel options.
+
 The preferred way to define these variables is:
 
 ----------------------
diff --git a/linux/linux.mk b/linux/linux.mk
index f6155a1a36..84c4f5db8d 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -416,6 +416,7 @@ define LINUX_KCONFIG_FIXUP_CMDS
 		$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY)
 		$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_NETWORK)
 		$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_SELINUX))
+	$(PACKAGES_LINUX_CONFIG_FIXUPS)
 endef
 
 ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT),y)
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 20b07a7fa9..f304417833 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -1083,6 +1083,9 @@ endif
 ifneq ($$($(2)_USERS),)
 PACKAGES_USERS += $$($(2)_USERS)$$(sep)
 endif
+ifneq ($$($(2)_LINUX_CONFIG_FIXUPS),)
+PACKAGES_LINUX_CONFIG_FIXUPS += $$($(2)_LINUX_CONFIG_FIXUPS)$$(sep)
+endif
 TARGET_FINALIZE_HOOKS += $$($(2)_TARGET_FINALIZE_HOOKS)
 ROOTFS_PRE_CMD_HOOKS += $$($(2)_ROOTFS_PRE_CMD_HOOKS)
 KEEP_PYTHON_PY_FILES += $$($(2)_KEEP_PY_FILES)
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 10/22] package/audit: bear the kernel options munging
  2020-04-04 12:10 [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts) Yann E. MORIN
                   ` (8 preceding siblings ...)
  2020-04-04 12:10 ` [Buildroot] [PATCH 09/22] linux: allow packages to set options Yann E. MORIN
@ 2020-04-04 12:10 ` Yann E. MORIN
  2020-04-06 12:10   ` Matthew Weber
  2020-04-04 12:10 ` [Buildroot] [PATCH 11/22] package/intel-micro-code: " Yann E. MORIN
                   ` (12 subsequent siblings)
  22 siblings, 1 reply; 32+ messages in thread
From: Yann E. MORIN @ 2020-04-04 12:10 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Adam Duskett <aduskett@gmail.com>
Cc: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
---
 linux/linux.mk         | 3 ---
 package/audit/audit.mk | 5 +++++
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index 84c4f5db8d..ea65286308 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -355,9 +355,6 @@ define LINUX_KCONFIG_FIXUP_CMDS
 		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER))
 	$(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_NET))
-	$(if $(BR2_PACKAGE_AUDIT),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_NET)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_AUDIT))
 	$(if $(BR2_PACKAGE_INTEL_MICROCODE),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_MICROCODE)
 		$(call KCONFIG_ENABLE_OPT,CONFIG_MICROCODE_INTEL))
diff --git a/package/audit/audit.mk b/package/audit/audit.mk
index 03967ee650..652e0fcd56 100644
--- a/package/audit/audit.mk
+++ b/package/audit/audit.mk
@@ -54,6 +54,11 @@ define AUDIT_INSTALL_CLEANUP
 endef
 AUDIT_POST_INSTALL_TARGET_HOOKS += AUDIT_INSTALL_CLEANUP
 
+define AUDIT_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_ENABLE_OPT,CONFIG_NET)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_AUDIT)
+endef
+
 HOST_AUDIT_CONF_OPTS = \
 	--without-python \
 	--without-python3 \
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 11/22] package/intel-micro-code: bear the kernel options munging
  2020-04-04 12:10 [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts) Yann E. MORIN
                   ` (9 preceding siblings ...)
  2020-04-04 12:10 ` [Buildroot] [PATCH 10/22] package/audit: bear the kernel options munging Yann E. MORIN
@ 2020-04-04 12:10 ` Yann E. MORIN
  2020-04-04 12:10 ` [Buildroot] [PATCH 12/22] package/ktap: " Yann E. MORIN
                   ` (11 subsequent siblings)
  22 siblings, 0 replies; 32+ messages in thread
From: Yann E. MORIN @ 2020-04-04 12:10 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Cc: Carlos Santos <unixmania@gmail.com>
---
 linux/linux.mk                             | 3 ---
 package/intel-microcode/intel-microcode.mk | 5 +++++
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index ea65286308..65cfa5d7ad 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -355,9 +355,6 @@ define LINUX_KCONFIG_FIXUP_CMDS
 		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER))
 	$(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_NET))
-	$(if $(BR2_PACKAGE_INTEL_MICROCODE),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_MICROCODE)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_MICROCODE_INTEL))
 	$(if $(BR2_PACKAGE_KTAP),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_DEBUG_FS)
 		$(call KCONFIG_ENABLE_OPT,CONFIG_ENABLE_DEFAULT_TRACERS)
diff --git a/package/intel-microcode/intel-microcode.mk b/package/intel-microcode/intel-microcode.mk
index 0492ace69e..f3d05d5f58 100644
--- a/package/intel-microcode/intel-microcode.mk
+++ b/package/intel-microcode/intel-microcode.mk
@@ -27,4 +27,9 @@ else
 INTEL_MICROCODE_INSTALL_TARGET = NO
 endif
 
+define INTEL_MICROCODE_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_ENABLE_OPT,CONFIG_MICROCODE)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_MICROCODE_INTEL)
+endef
+
 $(eval $(generic-package))
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 12/22] package/ktap: bear the kernel options munging
  2020-04-04 12:10 [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts) Yann E. MORIN
                   ` (10 preceding siblings ...)
  2020-04-04 12:10 ` [Buildroot] [PATCH 11/22] package/intel-micro-code: " Yann E. MORIN
@ 2020-04-04 12:10 ` Yann E. MORIN
  2020-04-04 12:10 ` [Buildroot] [PATCH 13/22] package/pcm-tools: " Yann E. MORIN
                   ` (10 subsequent siblings)
  22 siblings, 0 replies; 32+ messages in thread
From: Yann E. MORIN @ 2020-04-04 12:10 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Anders Darander <anders@chargestorm.se>
---
 linux/linux.mk       | 5 -----
 package/ktap/ktap.mk | 7 +++++++
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index 65cfa5d7ad..157808a49d 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -355,11 +355,6 @@ define LINUX_KCONFIG_FIXUP_CMDS
 		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER))
 	$(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_NET))
-	$(if $(BR2_PACKAGE_KTAP),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_DEBUG_FS)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_ENABLE_DEFAULT_TRACERS)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_PERF_EVENTS)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_FUNCTION_TRACER))
 	$(if $(BR2_PACKAGE_LINUX_TOOLS_PERF),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_PERF_EVENTS))
 	$(if $(BR2_PACKAGE_PCM_TOOLS),
diff --git a/package/ktap/ktap.mk b/package/ktap/ktap.mk
index 3b9134da65..09daba5c53 100644
--- a/package/ktap/ktap.mk
+++ b/package/ktap/ktap.mk
@@ -25,5 +25,12 @@ endef
 
 KTAP_MODULE_MAKE_OPTS = KVERSION=$(LINUX_VERSION_PROBED)
 
+define KTAP_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_ENABLE_OPT,CONFIG_DEBUG_FS)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_ENABLE_DEFAULT_TRACERS)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_PERF_EVENTS)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_FUNCTION_TRACER)
+endef
+
 $(eval $(kernel-module))
 $(eval $(generic-package))
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 13/22] package/pcm-tools: bear the kernel options munging
  2020-04-04 12:10 [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts) Yann E. MORIN
                   ` (11 preceding siblings ...)
  2020-04-04 12:10 ` [Buildroot] [PATCH 12/22] package/ktap: " Yann E. MORIN
@ 2020-04-04 12:10 ` Yann E. MORIN
  2020-04-04 12:10 ` [Buildroot] [PATCH 14/22] package/linux-tools/perf: " Yann E. MORIN
                   ` (9 subsequent siblings)
  22 siblings, 0 replies; 32+ messages in thread
From: Yann E. MORIN @ 2020-04-04 12:10 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Carlos Santos <unixmania@gmail.com>
---
 linux/linux.mk                 | 2 --
 package/pcm-tools/pcm-tools.mk | 4 ++++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index 157808a49d..ec57f580ea 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -357,8 +357,6 @@ define LINUX_KCONFIG_FIXUP_CMDS
 		$(call KCONFIG_ENABLE_OPT,CONFIG_NET))
 	$(if $(BR2_PACKAGE_LINUX_TOOLS_PERF),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_PERF_EVENTS))
-	$(if $(BR2_PACKAGE_PCM_TOOLS),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_X86_MSR))
 	$(if $(BR2_PACKAGE_SYSTEMD),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS)
 		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER)
diff --git a/package/pcm-tools/pcm-tools.mk b/package/pcm-tools/pcm-tools.mk
index 6d5938f94e..6de11c0da2 100644
--- a/package/pcm-tools/pcm-tools.mk
+++ b/package/pcm-tools/pcm-tools.mk
@@ -33,4 +33,8 @@ define PCM_TOOLS_INSTALL_TARGET_CMDS
 	$(PCM_TOOLS_INSTALL_PMU_QUERY)
 endef
 
+define PCM_TOOLS_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_ENABLE_OPT,CONFIG_X86_MSR)
+endef
+
 $(eval $(generic-package))
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 14/22] package/linux-tools/perf: bear the kernel options munging
  2020-04-04 12:10 [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts) Yann E. MORIN
                   ` (12 preceding siblings ...)
  2020-04-04 12:10 ` [Buildroot] [PATCH 13/22] package/pcm-tools: " Yann E. MORIN
@ 2020-04-04 12:10 ` Yann E. MORIN
  2020-05-01 13:57   ` Thomas Petazzoni
  2020-04-04 12:10 ` [Buildroot] [PATCH 15/22] package/systemd: " Yann E. MORIN
                   ` (8 subsequent siblings)
  22 siblings, 1 reply; 32+ messages in thread
From: Yann E. MORIN @ 2020-04-04 12:10 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
 linux/linux.mk                            | 2 --
 package/linux-tools/linux-tool-perf.mk.in | 4 ++++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index ec57f580ea..60fefd0eba 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -355,8 +355,6 @@ define LINUX_KCONFIG_FIXUP_CMDS
 		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER))
 	$(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_NET))
-	$(if $(BR2_PACKAGE_LINUX_TOOLS_PERF),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_PERF_EVENTS))
 	$(if $(BR2_PACKAGE_SYSTEMD),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS)
 		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER)
diff --git a/package/linux-tools/linux-tool-perf.mk.in b/package/linux-tools/linux-tool-perf.mk.in
index 7106b622cb..53b7c5b9cd 100644
--- a/package/linux-tools/linux-tool-perf.mk.in
+++ b/package/linux-tools/linux-tool-perf.mk.in
@@ -158,3 +158,7 @@ define PERF_INSTALL_TARGET_CMDS
 	$(RM) -rf $(TARGET_DIR)/usr/libexec/perf-core/scripts/
 	$(RM) -rf $(TARGET_DIR)/usr/libexec/perf-core/tests/
 endef
+
+define PERF_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_ENABLE_OPT,CONFIG_PERF_EVENTS)
+endef
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 15/22] package/systemd: bear the kernel options munging
  2020-04-04 12:10 [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts) Yann E. MORIN
                   ` (13 preceding siblings ...)
  2020-04-04 12:10 ` [Buildroot] [PATCH 14/22] package/linux-tools/perf: " Yann E. MORIN
@ 2020-04-04 12:10 ` Yann E. MORIN
  2020-04-04 12:10 ` [Buildroot] [PATCH 16/22] package/smack: " Yann E. MORIN
                   ` (7 subsequent siblings)
  22 siblings, 0 replies; 32+ messages in thread
From: Yann E. MORIN @ 2020-04-04 12:10 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Adam Duskett <aduskett@gmail.com>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
---
 linux/linux.mk             | 7 -------
 package/systemd/systemd.mk | 9 +++++++++
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index 60fefd0eba..0a504dc615 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -355,13 +355,6 @@ define LINUX_KCONFIG_FIXUP_CMDS
 		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER))
 	$(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_NET))
-	$(if $(BR2_PACKAGE_SYSTEMD),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_FHANDLE)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_AUTOFS4_FS)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_POSIX_ACL)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_XATTR))
 	$(if $(BR2_PACKAGE_SMACK),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY)
 		$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_SMACK)
diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
index 56459947c4..f058c94040 100644
--- a/package/systemd/systemd.mk
+++ b/package/systemd/systemd.mk
@@ -519,6 +519,15 @@ SYSTEMD_TARGET_FINALIZE_HOOKS += SYSTEMD_PRESET_ALL
 SYSTEMD_CONF_ENV = $(HOST_UTF8_LOCALE_ENV)
 SYSTEMD_NINJA_ENV = $(HOST_UTF8_LOCALE_ENV)
 
+define SYSTEMD_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_FHANDLE)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_AUTOFS4_FS)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_POSIX_ACL)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_XATTR)
+endef
+
 # We need a very minimal host variant, so we disable as much as possible.
 HOST_SYSTEMD_CONF_OPTS = \
 	-Dsplit-bin=true \
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 16/22] package/smack: bear the kernel options munging
  2020-04-04 12:10 [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts) Yann E. MORIN
                   ` (14 preceding siblings ...)
  2020-04-04 12:10 ` [Buildroot] [PATCH 15/22] package/systemd: " Yann E. MORIN
@ 2020-04-04 12:10 ` Yann E. MORIN
  2020-04-04 12:10 ` [Buildroot] [PATCH 17/22] package/sunxi-mali-mainline-driver: " Yann E. MORIN
                   ` (6 subsequent siblings)
  22 siblings, 0 replies; 32+ messages in thread
From: Yann E. MORIN @ 2020-04-04 12:10 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
---
 linux/linux.mk         | 4 ----
 package/smack/smack.mk | 6 ++++++
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index 0a504dc615..6ce984b22b 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -355,10 +355,6 @@ define LINUX_KCONFIG_FIXUP_CMDS
 		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER))
 	$(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_NET))
-	$(if $(BR2_PACKAGE_SMACK),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_SMACK)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_NETWORK))
 	$(if $(BR2_PACKAGE_SUNXI_MALI_MAINLINE_DRIVER),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_CMA)
 		$(call KCONFIG_ENABLE_OPT,CONFIG_DMA_CMA))
diff --git a/package/smack/smack.mk b/package/smack/smack.mk
index d2ac005ab9..b7b656e644 100644
--- a/package/smack/smack.mk
+++ b/package/smack/smack.mk
@@ -14,4 +14,10 @@ SMACK_DEPENDENCIES = host-pkgconf
 # Sources from GitHub, no configure script included.
 SMACK_AUTORECONF = YES
 
+define SMAKE_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_SMACK)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_NETWORK)
+endef
+
 $(eval $(autotools-package))
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 17/22] package/sunxi-mali-mainline-driver: bear the kernel options munging
  2020-04-04 12:10 [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts) Yann E. MORIN
                   ` (15 preceding siblings ...)
  2020-04-04 12:10 ` [Buildroot] [PATCH 16/22] package/smack: " Yann E. MORIN
@ 2020-04-04 12:10 ` Yann E. MORIN
  2020-04-04 12:10 ` [Buildroot] [PATCH 18/22] package/iptables: " Yann E. MORIN
                   ` (5 subsequent siblings)
  22 siblings, 0 replies; 32+ messages in thread
From: Yann E. MORIN @ 2020-04-04 12:10 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 linux/linux.mk                                               | 3 ---
 .../sunxi-mali-mainline-driver/sunxi-mali-mainline-driver.mk | 5 +++++
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index 6ce984b22b..e4dfefde48 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -355,9 +355,6 @@ define LINUX_KCONFIG_FIXUP_CMDS
 		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER))
 	$(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_NET))
-	$(if $(BR2_PACKAGE_SUNXI_MALI_MAINLINE_DRIVER),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_CMA)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_DMA_CMA))
 	$(if $(BR2_PACKAGE_IPTABLES),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_IPTABLES)
 		$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_FILTER)
diff --git a/package/sunxi-mali-mainline-driver/sunxi-mali-mainline-driver.mk b/package/sunxi-mali-mainline-driver/sunxi-mali-mainline-driver.mk
index 0edcdee4d6..40ea450b31 100644
--- a/package/sunxi-mali-mainline-driver/sunxi-mali-mainline-driver.mk
+++ b/package/sunxi-mali-mainline-driver/sunxi-mali-mainline-driver.mk
@@ -32,4 +32,9 @@ define SUNXI_MALI_MAINLINE_DRIVER_INSTALL_TARGET_CMDS
 		$(SHELL) ./build.sh -r $(SUNXI_MALI_MAINLINE_REV) -j $(PARALLEL_JOBS) -i
 endef
 
+define SUNXI_MALI_MAINLINE_DRIVER_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_ENABLE_OPT,CONFIG_CMA)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_DMA_CMA)
+endef
+
 $(eval $(generic-package))
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts)
@ 2020-04-04 12:10 Yann E. MORIN
  2020-04-04 12:10 ` [Buildroot] [PATCH 01/22] core/pkg-utils: rationalise kconfig option mangling Yann E. MORIN
                   ` (22 more replies)
  0 siblings, 23 replies; 32+ messages in thread
From: Yann E. MORIN @ 2020-04-04 12:10 UTC (permalink / raw)
  To: buildroot

Hello All!

Currently, in the spirit of making it work out of the box, we have
some linux kconfig options set depending on whether some packages
are enabled or not.

This list has been slowly growing over time, with now more than half
of the kernel options being set by packages. Yet, some more packages
will eventualy want to set some options, like the pending firewalld
giant hairball [0]; this is going to be an insane and unmaintainable
list.

Furthermore, there is no mechanism to allow packages from a br2-external
tree to easily provide options to be set in the kernel config.

This series brings in such a mechanism, for packages to be able to
provide a way to set linux kernel options, be they in-tree packages
or not.

Additionally, this makes the list more manageable, by splitting it
over to the responsible packages.

Finally, it brings a nice cleanup, where we no longer have to repeat
the knowledge of how the .config file is named, as the name from the
pkg-kconfig infra gets reused.

[0] http://lists.busybox.net/pipermail/buildroot/2020-March/278683.html


Regards,
Yann E. MORIN.


The following changes since commit 9daf7483e9cf86d86797e799c73be80dbbbb9acf

  package/ntp: security bump to version 4.2.8p14 (2020-04-03 10:04:25 +0200)


are available in the git repository at:

  git://git.buildroot.org/~ymorin/git/buildroot.git

for you to fetch changes up to 681cc941334365689dadc41143521d842cd98189

  package/kernel-module-imx-gpu-viv: bear the kernel options munging (2020-04-04 13:50:16 +0200)


----------------------------------------------------------------
Yann E. MORIN (22):
      core/pkg-utils: rationalise kconfig option mangling
      core/pkg-utils: kconfig mangling defaults to current package's .config
      boot/barebox: don't specify .config to munge
      boot/uboot: don't specify .config to munge
      boot/busybox: don't specify .config to munge
      boot/swupdate: don't specify .config to munge
      boot/uclibc: don't specify .config to munge
      linux: don't specify .config to munge
      linux: allow packages to set options
      package/audit: bear the kernel options munging
      package/intel-micro-code: bear the kernel options munging
      package/ktap: bear the kernel options munging
      package/pcm-tools: bear the kernel options munging
      package/linux-tools/perf: bear the kernel options munging
      package/systemd: bear the kernel options munging
      package/smack: bear the kernel options munging
      package/sunxi-mali-mainline-driver: bear the kernel options munging
      package/iptables: bear the kernel options munging
      package/xtables-addons: bear the kernel options munging
      package/wireguard-linux-compat: bear the kernel options munging
      package/libselinux: bear the kernel options munging
      package/kernel-module-imx-gpu-viv: bear the kernel options munging

 boot/barebox/barebox.mk                            |   4 +-
 boot/uboot/uboot.mk                                |   6 +-
 docs/manual/adding-packages-generic.txt            |   9 ++
 linux/linux.mk                                     | 112 ++++-----------
 package/audit/audit.mk                             |   5 +
 package/busybox/busybox.mk                         |  71 +++++-----
 .../kernel-module-imx-gpu-viv.mk                   |   4 +
 package/intel-microcode/intel-microcode.mk         |   5 +
 package/iptables/iptables.mk                       |   7 +
 package/ktap/ktap.mk                               |   7 +
 package/libselinux/libselinux.mk                   |  10 ++
 package/linux-tools/linux-tool-perf.mk.in          |   4 +
 package/pcm-tools/pcm-tools.mk                     |   4 +
 package/pkg-generic.mk                             |   3 +
 package/pkg-kconfig.mk                             |   2 +
 package/pkg-utils.mk                               |  27 ++--
 package/smack/smack.mk                             |   6 +
 .../sunxi-mali-mainline-driver.mk                  |   5 +
 package/swupdate/swupdate.mk                       |   4 +-
 package/systemd/systemd.mk                         |   9 ++
 package/uclibc/uclibc.mk                           | 152 ++++++++++-----------
 .../wireguard-linux-compat.mk                      |   8 ++
 package/xtables-addons/xtables-addons.mk           |   7 +
 23 files changed, 257 insertions(+), 214 deletions(-)

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 18/22] package/iptables: bear the kernel options munging
  2020-04-04 12:10 [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts) Yann E. MORIN
                   ` (16 preceding siblings ...)
  2020-04-04 12:10 ` [Buildroot] [PATCH 17/22] package/sunxi-mali-mainline-driver: " Yann E. MORIN
@ 2020-04-04 12:10 ` Yann E. MORIN
  2020-04-04 12:10 ` [Buildroot] [PATCH 19/22] package/xtables-addons: " Yann E. MORIN
                   ` (4 subsequent siblings)
  22 siblings, 0 replies; 32+ messages in thread
From: Yann E. MORIN @ 2020-04-04 12:10 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
 linux/linux.mk               | 5 -----
 package/iptables/iptables.mk | 7 +++++++
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index e4dfefde48..36cb49b84a 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -355,11 +355,6 @@ define LINUX_KCONFIG_FIXUP_CMDS
 		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER))
 	$(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_NET))
-	$(if $(BR2_PACKAGE_IPTABLES),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_IPTABLES)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_FILTER)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_XTABLES))
 	$(if $(BR2_PACKAGE_XTABLES_ADDONS),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_ADVANCED)
 		$(call KCONFIG_ENABLE_OPT,CONFIG_NF_CONNTRACK)
diff --git a/package/iptables/iptables.mk b/package/iptables/iptables.mk
index ae5cf4ddd3..7b964aaf41 100644
--- a/package/iptables/iptables.mk
+++ b/package/iptables/iptables.mk
@@ -47,4 +47,11 @@ else
 IPTABLES_CONF_OPTS += --disable-bpf-compiler --disable-nfsynproxy
 endif
 
+define IPTABLES_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_IPTABLES)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_FILTER)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_XTABLES)
+endef
+
 $(eval $(autotools-package))
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 19/22] package/xtables-addons: bear the kernel options munging
  2020-04-04 12:10 [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts) Yann E. MORIN
                   ` (17 preceding siblings ...)
  2020-04-04 12:10 ` [Buildroot] [PATCH 18/22] package/iptables: " Yann E. MORIN
@ 2020-04-04 12:10 ` Yann E. MORIN
  2020-04-04 12:10 ` [Buildroot] [PATCH 20/22] package/wireguard-linux-compat: " Yann E. MORIN
                   ` (3 subsequent siblings)
  22 siblings, 0 replies; 32+ messages in thread
From: Yann E. MORIN @ 2020-04-04 12:10 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
 linux/linux.mk                           | 5 -----
 package/xtables-addons/xtables-addons.mk | 7 +++++++
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index 36cb49b84a..eb2bfbfa3f 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -355,11 +355,6 @@ define LINUX_KCONFIG_FIXUP_CMDS
 		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER))
 	$(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_NET))
-	$(if $(BR2_PACKAGE_XTABLES_ADDONS),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_ADVANCED)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_NF_CONNTRACK)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_NF_CONNTRACK_MARK)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_NF_NAT))
 	$(if $(BR2_PACKAGE_WIREGUARD_LINUX_COMPAT),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_INET)
 		$(call KCONFIG_ENABLE_OPT,CONFIG_NET)
diff --git a/package/xtables-addons/xtables-addons.mk b/package/xtables-addons/xtables-addons.mk
index 1a74b80f46..dab57d980e 100644
--- a/package/xtables-addons/xtables-addons.mk
+++ b/package/xtables-addons/xtables-addons.mk
@@ -30,4 +30,11 @@ define XTABLES_ADDONS_INSTALL_TARGET_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) DESTDIR="$(TARGET_DIR)" install
 endef
 
+define XTABLES_ADDONS_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_ADVANCED)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_NF_CONNTRACK)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_NF_CONNTRACK_MARK)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_NF_NAT)
+endef
+
 $(eval $(autotools-package))
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 20/22] package/wireguard-linux-compat: bear the kernel options munging
  2020-04-04 12:10 [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts) Yann E. MORIN
                   ` (18 preceding siblings ...)
  2020-04-04 12:10 ` [Buildroot] [PATCH 19/22] package/xtables-addons: " Yann E. MORIN
@ 2020-04-04 12:10 ` Yann E. MORIN
  2020-04-04 12:10 ` [Buildroot] [PATCH 21/22] package/libselinux: " Yann E. MORIN
                   ` (2 subsequent siblings)
  22 siblings, 0 replies; 32+ messages in thread
From: Yann E. MORIN @ 2020-04-04 12:10 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Peter Korsgaard <peter@korsgaard.com>
---
 linux/linux.mk                                           | 6 ------
 package/wireguard-linux-compat/wireguard-linux-compat.mk | 8 ++++++++
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index eb2bfbfa3f..b9e2058e29 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -355,12 +355,6 @@ define LINUX_KCONFIG_FIXUP_CMDS
 		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER))
 	$(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_NET))
-	$(if $(BR2_PACKAGE_WIREGUARD_LINUX_COMPAT),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_INET)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_NET)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_NET_FOU)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_CRYPTO)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_CRYPTO_MANAGER))
 	$(if $(BR2_LINUX_KERNEL_APPENDED_DTB),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_ARM_APPENDED_DTB))
 	$(if $(BR2_PACKAGE_KERNEL_MODULE_IMX_GPU_VIV),
diff --git a/package/wireguard-linux-compat/wireguard-linux-compat.mk b/package/wireguard-linux-compat/wireguard-linux-compat.mk
index 747cef3e50..8c8743bb4b 100644
--- a/package/wireguard-linux-compat/wireguard-linux-compat.mk
+++ b/package/wireguard-linux-compat/wireguard-linux-compat.mk
@@ -11,5 +11,13 @@ WIREGUARD_LINUX_COMPAT_LICENSE = GPL-2.0
 WIREGUARD_LINUX_COMPAT_LICENSE_FILES = COPYING
 WIREGUARD_LINUX_COMPAT_MODULE_SUBDIRS = src
 
+define WIREGUARD_LINUX_COMPAT_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_ENABLE_OPT,CONFIG_INET)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_NET)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_NET_FOU)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_CRYPTO)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_CRYPTO_MANAGER)
+endef
+
 $(eval $(kernel-module))
 $(eval $(generic-package))
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 21/22] package/libselinux: bear the kernel options munging
  2020-04-04 12:10 [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts) Yann E. MORIN
                   ` (19 preceding siblings ...)
  2020-04-04 12:10 ` [Buildroot] [PATCH 20/22] package/wireguard-linux-compat: " Yann E. MORIN
@ 2020-04-04 12:10 ` Yann E. MORIN
  2020-04-06 12:08   ` Matthew Weber
  2020-04-04 12:10 ` [Buildroot] [PATCH 22/22] package/kernel-module-imx-gpu-viv: " Yann E. MORIN
  2020-05-01 13:54 ` [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts) Thomas Petazzoni
  22 siblings, 1 reply; 32+ messages in thread
From: Yann E. MORIN @ 2020-04-04 12:10 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Adam Duskett <aduskett@gmail.com>
Cc: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
Cc: Matt Weber <matthew.weber@rockwellcollins.com>
Cc: Marcus Folkesson <marcus.folkesson@gmail.com>
---
 linux/linux.mk                   |  8 --------
 package/libselinux/libselinux.mk | 10 ++++++++++
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index b9e2058e29..3762e718c6 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -363,14 +363,6 @@ define LINUX_KCONFIG_FIXUP_CMDS
 		$(call KCONFIG_ENABLE_OPT,CONFIG_FB)
 		$(call KCONFIG_ENABLE_OPT,CONFIG_LOGO)
 		$(call KCONFIG_ENABLE_OPT,CONFIG_LOGO_LINUX_CLUT224))
-	$(if $(BR2_PACKAGE_LIBSELINUX),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_AUDIT)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_DEFAULT_SECURITY_SELINUX)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_INET)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_NET)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_NETWORK)
-		$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_SELINUX))
 	$(PACKAGES_LINUX_CONFIG_FIXUPS)
 endef
 
diff --git a/package/libselinux/libselinux.mk b/package/libselinux/libselinux.mk
index 1461e34539..5f07236791 100644
--- a/package/libselinux/libselinux.mk
+++ b/package/libselinux/libselinux.mk
@@ -116,5 +116,15 @@ define HOST_LIBSELINUX_INSTALL_CMDS
 		$(HOST_LIBSELINUX_MAKE_OPTS) install-pywrap
 endef
 
+define LIBSELINUX_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_ENABLE_OPT,CONFIG_AUDIT)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_DEFAULT_SECURITY_SELINUX)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_INET)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_NET)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_NETWORK)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_SELINUX)
+endef
+
 $(eval $(generic-package))
 $(eval $(host-generic-package))
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 22/22] package/kernel-module-imx-gpu-viv: bear the kernel options munging
  2020-04-04 12:10 [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts) Yann E. MORIN
                   ` (20 preceding siblings ...)
  2020-04-04 12:10 ` [Buildroot] [PATCH 21/22] package/libselinux: " Yann E. MORIN
@ 2020-04-04 12:10 ` Yann E. MORIN
  2020-05-01 13:54 ` [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts) Thomas Petazzoni
  22 siblings, 0 replies; 32+ messages in thread
From: Yann E. MORIN @ 2020-04-04 12:10 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Gary Bisson <bisson.gary@gmail.com>
Cc: Refik Tuzakli <tuzakli.refik@gmail.com>
---
 linux/linux.mk                                                | 2 --
 .../kernel-module-imx-gpu-viv/kernel-module-imx-gpu-viv.mk    | 4 ++++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index 3762e718c6..60dc343efa 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -357,8 +357,6 @@ define LINUX_KCONFIG_FIXUP_CMDS
 		$(call KCONFIG_ENABLE_OPT,CONFIG_NET))
 	$(if $(BR2_LINUX_KERNEL_APPENDED_DTB),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_ARM_APPENDED_DTB))
-	$(if $(BR2_PACKAGE_KERNEL_MODULE_IMX_GPU_VIV),
-		$(call KCONFIG_DISABLE_OPT,CONFIG_MXC_GPU_VIV))
 	$(if $(LINUX_KERNEL_CUSTOM_LOGO_PATH),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_FB)
 		$(call KCONFIG_ENABLE_OPT,CONFIG_LOGO)
diff --git a/package/freescale-imx/kernel-module-imx-gpu-viv/kernel-module-imx-gpu-viv.mk b/package/freescale-imx/kernel-module-imx-gpu-viv/kernel-module-imx-gpu-viv.mk
index c76a5ee386..1895b9f446 100644
--- a/package/freescale-imx/kernel-module-imx-gpu-viv/kernel-module-imx-gpu-viv.mk
+++ b/package/freescale-imx/kernel-module-imx-gpu-viv/kernel-module-imx-gpu-viv.mk
@@ -16,5 +16,9 @@ KERNEL_MODULE_IMX_GPU_VIV_MODULE_MAKE_OPTS = \
 
 KERNEL_MODULE_IMX_GPU_VIV_MODULE_SUBDIRS = kernel-module-imx-gpu-viv-src
 
+define KERNEL_MODULE_IMX_GPU_VIV_MODULE_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_DISABLE_OPT,CONFIG_MXC_GPU_VIV)
+endef
+
 $(eval $(kernel-module))
 $(eval $(generic-package))
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 21/22] package/libselinux: bear the kernel options munging
  2020-04-04 12:10 ` [Buildroot] [PATCH 21/22] package/libselinux: " Yann E. MORIN
@ 2020-04-06 12:08   ` Matthew Weber
  2020-04-19 18:14     ` Adam Duskett
  0 siblings, 1 reply; 32+ messages in thread
From: Matthew Weber @ 2020-04-06 12:08 UTC (permalink / raw)
  To: buildroot

Yann,


On Sat, Apr 4, 2020 at 7:13 AM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Adam Duskett <aduskett@gmail.com>
> Cc: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
> Cc: Matt Weber <matthew.weber@rockwellcollins.com>

Reviewed-by: Matt Weber <matthew.weber@rockwellcollins.com>

Thanks Yann, this is a nice cleanup!

> Cc: Marcus Folkesson <marcus.folkesson@gmail.com>
> ---
>  linux/linux.mk                   |  8 --------
>  package/libselinux/libselinux.mk | 10 ++++++++++
>  2 files changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/linux/linux.mk b/linux/linux.mk
> index b9e2058e29..3762e718c6 100644
> --- a/linux/linux.mk
> +++ b/linux/linux.mk
> @@ -363,14 +363,6 @@ define LINUX_KCONFIG_FIXUP_CMDS
>                 $(call KCONFIG_ENABLE_OPT,CONFIG_FB)
>                 $(call KCONFIG_ENABLE_OPT,CONFIG_LOGO)
>                 $(call KCONFIG_ENABLE_OPT,CONFIG_LOGO_LINUX_CLUT224))
> -       $(if $(BR2_PACKAGE_LIBSELINUX),
> -               $(call KCONFIG_ENABLE_OPT,CONFIG_AUDIT)
> -               $(call KCONFIG_ENABLE_OPT,CONFIG_DEFAULT_SECURITY_SELINUX)
> -               $(call KCONFIG_ENABLE_OPT,CONFIG_INET)
> -               $(call KCONFIG_ENABLE_OPT,CONFIG_NET)
> -               $(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY)
> -               $(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_NETWORK)
> -               $(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_SELINUX))
>         $(PACKAGES_LINUX_CONFIG_FIXUPS)
>  endef
>
> diff --git a/package/libselinux/libselinux.mk b/package/libselinux/libselinux.mk
> index 1461e34539..5f07236791 100644
> --- a/package/libselinux/libselinux.mk
> +++ b/package/libselinux/libselinux.mk
> @@ -116,5 +116,15 @@ define HOST_LIBSELINUX_INSTALL_CMDS
>                 $(HOST_LIBSELINUX_MAKE_OPTS) install-pywrap
>  endef
>
> +define LIBSELINUX_LINUX_CONFIG_FIXUPS
> +       $(call KCONFIG_ENABLE_OPT,CONFIG_AUDIT)
> +       $(call KCONFIG_ENABLE_OPT,CONFIG_DEFAULT_SECURITY_SELINUX)
> +       $(call KCONFIG_ENABLE_OPT,CONFIG_INET)
> +       $(call KCONFIG_ENABLE_OPT,CONFIG_NET)
> +       $(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY)
> +       $(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_NETWORK)
> +       $(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_SELINUX)
> +endef
> +
>  $(eval $(generic-package))
>  $(eval $(host-generic-package))
> --
> 2.20.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot



-- 

Matthew Weber | Associate Director Software Engineer | Commercial Avionics

COLLINS AEROSPACE

400 Collins Road NE, Cedar Rapids, Iowa 52498, USA

Tel: +1 319 295 7349 | FAX: +1 319 263 6099

matthew.weber at collins.com | collinsaerospace.com



CONFIDENTIALITY WARNING: This message may contain proprietary and/or
privileged information of Collins Aerospace and its affiliated
companies. If you are not the intended recipient, please 1) Do not
disclose, copy, distribute or use this message or its contents. 2)
Advise the sender by return email. 3) Delete all copies (including all
attachments) from your computer. Your cooperation is greatly
appreciated.


Any export restricted material should be shared using my
matthew.weber at corp.rockwellcollins.com address.


ALPHA BRAVO COLLINS | Aerospace Redefined

         __ l __

 \- - - -o-(_)-o- - - -/

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 10/22] package/audit: bear the kernel options munging
  2020-04-04 12:10 ` [Buildroot] [PATCH 10/22] package/audit: bear the kernel options munging Yann E. MORIN
@ 2020-04-06 12:10   ` Matthew Weber
  0 siblings, 0 replies; 32+ messages in thread
From: Matthew Weber @ 2020-04-06 12:10 UTC (permalink / raw)
  To: buildroot

Yann,

On Sat, Apr 4, 2020 at 7:13 AM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Adam Duskett <aduskett@gmail.com>
> Cc: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>

Review-by: Matt Weber <matthew.weber@rockwellcollins.com>

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 21/22] package/libselinux: bear the kernel options munging
  2020-04-06 12:08   ` Matthew Weber
@ 2020-04-19 18:14     ` Adam Duskett
  0 siblings, 0 replies; 32+ messages in thread
From: Adam Duskett @ 2020-04-19 18:14 UTC (permalink / raw)
  To: buildroot

Yann;

This is a great addition and really does a wonderful job of cleaning
up the kernel config options.
Thanks for the hard work!

Reviewed-by: Adam Duskett <aduskett@gmail.com>
Tested-by: Adam Duskett <aduskett@gmail.com>

On Mon, Apr 6, 2020 at 5:09 AM Matthew Weber <matthew.weber@collins.com> wrote:
>
> Yann,
>
>
> On Sat, Apr 4, 2020 at 7:13 AM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> >
> > Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> > Cc: Adam Duskett <aduskett@gmail.com>
> > Cc: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
> > Cc: Matt Weber <matthew.weber@rockwellcollins.com>
>
> Reviewed-by: Matt Weber <matthew.weber@rockwellcollins.com>
>
> Thanks Yann, this is a nice cleanup!
>
> > Cc: Marcus Folkesson <marcus.folkesson@gmail.com>
> > ---
> >  linux/linux.mk                   |  8 --------
> >  package/libselinux/libselinux.mk | 10 ++++++++++
> >  2 files changed, 10 insertions(+), 8 deletions(-)
> >
> > diff --git a/linux/linux.mk b/linux/linux.mk
> > index b9e2058e29..3762e718c6 100644
> > --- a/linux/linux.mk
> > +++ b/linux/linux.mk
> > @@ -363,14 +363,6 @@ define LINUX_KCONFIG_FIXUP_CMDS
> >                 $(call KCONFIG_ENABLE_OPT,CONFIG_FB)
> >                 $(call KCONFIG_ENABLE_OPT,CONFIG_LOGO)
> >                 $(call KCONFIG_ENABLE_OPT,CONFIG_LOGO_LINUX_CLUT224))
> > -       $(if $(BR2_PACKAGE_LIBSELINUX),
> > -               $(call KCONFIG_ENABLE_OPT,CONFIG_AUDIT)
> > -               $(call KCONFIG_ENABLE_OPT,CONFIG_DEFAULT_SECURITY_SELINUX)
> > -               $(call KCONFIG_ENABLE_OPT,CONFIG_INET)
> > -               $(call KCONFIG_ENABLE_OPT,CONFIG_NET)
> > -               $(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY)
> > -               $(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_NETWORK)
> > -               $(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_SELINUX))
> >         $(PACKAGES_LINUX_CONFIG_FIXUPS)
> >  endef
> >
> > diff --git a/package/libselinux/libselinux.mk b/package/libselinux/libselinux.mk
> > index 1461e34539..5f07236791 100644
> > --- a/package/libselinux/libselinux.mk
> > +++ b/package/libselinux/libselinux.mk
> > @@ -116,5 +116,15 @@ define HOST_LIBSELINUX_INSTALL_CMDS
> >                 $(HOST_LIBSELINUX_MAKE_OPTS) install-pywrap
> >  endef
> >
> > +define LIBSELINUX_LINUX_CONFIG_FIXUPS
> > +       $(call KCONFIG_ENABLE_OPT,CONFIG_AUDIT)
> > +       $(call KCONFIG_ENABLE_OPT,CONFIG_DEFAULT_SECURITY_SELINUX)
> > +       $(call KCONFIG_ENABLE_OPT,CONFIG_INET)
> > +       $(call KCONFIG_ENABLE_OPT,CONFIG_NET)
> > +       $(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY)
> > +       $(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_NETWORK)
> > +       $(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_SELINUX)
> > +endef
> > +
> >  $(eval $(generic-package))
> >  $(eval $(host-generic-package))
> > --
> > 2.20.1
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot at busybox.net
> > http://lists.busybox.net/mailman/listinfo/buildroot
>
>
>
> --
>
> Matthew Weber | Associate Director Software Engineer | Commercial Avionics
>
> COLLINS AEROSPACE
>
> 400 Collins Road NE, Cedar Rapids, Iowa 52498, USA
>
> Tel: +1 319 295 7349 | FAX: +1 319 263 6099
>
> matthew.weber at collins.com | collinsaerospace.com
>
>
>
> CONFIDENTIALITY WARNING: This message may contain proprietary and/or
> privileged information of Collins Aerospace and its affiliated
> companies. If you are not the intended recipient, please 1) Do not
> disclose, copy, distribute or use this message or its contents. 2)
> Advise the sender by return email. 3) Delete all copies (including all
> attachments) from your computer. Your cooperation is greatly
> appreciated.
>
>
> Any export restricted material should be shared using my
> matthew.weber at corp.rockwellcollins.com address.
>
>
> ALPHA BRAVO COLLINS | Aerospace Redefined
>
>          __ l __
>
>  \- - - -o-(_)-o- - - -/

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts)
  2020-04-04 12:10 [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts) Yann E. MORIN
                   ` (21 preceding siblings ...)
  2020-04-04 12:10 ` [Buildroot] [PATCH 22/22] package/kernel-module-imx-gpu-viv: " Yann E. MORIN
@ 2020-05-01 13:54 ` Thomas Petazzoni
  22 siblings, 0 replies; 32+ messages in thread
From: Thomas Petazzoni @ 2020-05-01 13:54 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat,  4 Apr 2020 14:10:30 +0200
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> Yann E. MORIN (22):
>       core/pkg-utils: rationalise kconfig option mangling
>       core/pkg-utils: kconfig mangling defaults to current package's .config
>       boot/barebox: don't specify .config to munge
>       boot/uboot: don't specify .config to munge
>       boot/busybox: don't specify .config to munge
>       boot/swupdate: don't specify .config to munge
>       boot/uclibc: don't specify .config to munge
>       linux: don't specify .config to munge
>       linux: allow packages to set options
>       package/audit: bear the kernel options munging
>       package/intel-micro-code: bear the kernel options munging
>       package/ktap: bear the kernel options munging
>       package/pcm-tools: bear the kernel options munging
>       package/linux-tools/perf: bear the kernel options munging
>       package/systemd: bear the kernel options munging
>       package/smack: bear the kernel options munging
>       package/sunxi-mali-mainline-driver: bear the kernel options munging
>       package/iptables: bear the kernel options munging
>       package/xtables-addons: bear the kernel options munging
>       package/wireguard-linux-compat: bear the kernel options munging
>       package/libselinux: bear the kernel options munging
>       package/kernel-module-imx-gpu-viv: bear the kernel options munging

I've applied the entire series, except the package/linux-tools/perf
change. I'll reply to it, and to some other patches individually.

I also added one more commit to convert libapparmor to use this
mechanism.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 02/22] core/pkg-utils: kconfig mangling defaults to current package's .config
  2020-04-04 12:10 ` [Buildroot] [PATCH 02/22] core/pkg-utils: kconfig mangling defaults to current package's .config Yann E. MORIN
@ 2020-05-01 13:55   ` Thomas Petazzoni
  2020-08-30  7:54   ` Peter Korsgaard
  1 sibling, 0 replies; 32+ messages in thread
From: Thomas Petazzoni @ 2020-05-01 13:55 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat,  4 Apr 2020 14:10:14 +0200
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> The kconfig mangling macros currently operate on the caller-supplied
> .config file, on the assumption that the caller will always know what
> file to mangle.
> 
> This was correct so far, as packages would indeed only mangle their own
> .config files.
> 
> However, the linux kernel does its mangling based on whether some
> packages are enabled or not. That list of conditional mangling is
> getting bigger and bigger with each new package that needs such
> mangling, culminating with the pending firewalld one [0]. Furthermore,
> this mangling is not accessible to packages in br2-external trees. So
> we'll want to have packages provide the mangling commands.
> 
> So we'll want the mangling to be done on the linux' .config file,,i.e.
> and the expanding package context, not in the package calling the
> macros.

I fixed up this paragraph.

> This has the added benefit that we do not have to repeat in the
> exp[anding package context the knowledge of how the .config file is
> named:
> 
>     FOO_KCONFIG_DOTCONFIG = .config
>     define FOO_KCONFIG_FIXUPS_CMDS
>         $(call KCONFIG_ENABLE_OPT,BLA,$(@D)/.config)

And dropped $(@D)/.config from this example.. because it's precisely
what you're explaining: we no longer need to specify it explicitly.


> -# KCONFIG_MUNGE_DOT_CONFIG (option, newline, file)
> +# KCONFIG_DOT_CONFIG ([file])

I've added a comment here that explains what this macro is doing.

> +KCONFIG_DOT_CONFIG = $(strip \
> +	$(if $(strip $(1)), $(1), \
> +		$($(PKG)_BUILDDIR)/$($(PKG)_KCONFIG_DOTCONFIG) \
> +	) \
> +)

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 09/22] linux: allow packages to set options
  2020-04-04 12:10 ` [Buildroot] [PATCH 09/22] linux: allow packages to set options Yann E. MORIN
@ 2020-05-01 13:56   ` Thomas Petazzoni
  0 siblings, 0 replies; 32+ messages in thread
From: Thomas Petazzoni @ 2020-05-01 13:56 UTC (permalink / raw)
  To: buildroot

On Sat,  4 Apr 2020 14:10:21 +0200
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> +* +LIBFOO_LINUX_CONFIG_FIXUPS+ lists the strictly required linux kernel
> +  options that are uncommon, and without which the package is
> +  *fundamentally* broken. This shall be a set of calls to one of the
> +  kconfig tweaking option: `KCONFIG_ENABLE_OPT`, `KCONFIG_DISABLE_OPT`,
> +  or `KCONFIG_SET_OPT`.
> +  This is seldom used, as package usually have no strict requirements on
> +  the kernel options. *Do not use this variable*, unless you really know
> +  that you need to set kernel options.

I've reworded this a bit to be less "strongly" worded.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 14/22] package/linux-tools/perf: bear the kernel options munging
  2020-04-04 12:10 ` [Buildroot] [PATCH 14/22] package/linux-tools/perf: " Yann E. MORIN
@ 2020-05-01 13:57   ` Thomas Petazzoni
  0 siblings, 0 replies; 32+ messages in thread
From: Thomas Petazzoni @ 2020-05-01 13:57 UTC (permalink / raw)
  To: buildroot

On Sat,  4 Apr 2020 14:10:26 +0200
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> ---
>  linux/linux.mk                            | 2 --
>  package/linux-tools/linux-tool-perf.mk.in | 4 ++++
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/linux/linux.mk b/linux/linux.mk
> index ec57f580ea..60fefd0eba 100644
> --- a/linux/linux.mk
> +++ b/linux/linux.mk
> @@ -355,8 +355,6 @@ define LINUX_KCONFIG_FIXUP_CMDS
>  		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER))
>  	$(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),
>  		$(call KCONFIG_ENABLE_OPT,CONFIG_NET))
> -	$(if $(BR2_PACKAGE_LINUX_TOOLS_PERF),
> -		$(call KCONFIG_ENABLE_OPT,CONFIG_PERF_EVENTS))
>  	$(if $(BR2_PACKAGE_SYSTEMD),
>  		$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS)
>  		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER)
> diff --git a/package/linux-tools/linux-tool-perf.mk.in b/package/linux-tools/linux-tool-perf.mk.in
> index 7106b622cb..53b7c5b9cd 100644
> --- a/package/linux-tools/linux-tool-perf.mk.in
> +++ b/package/linux-tools/linux-tool-perf.mk.in
> @@ -158,3 +158,7 @@ define PERF_INSTALL_TARGET_CMDS
>  	$(RM) -rf $(TARGET_DIR)/usr/libexec/perf-core/scripts/
>  	$(RM) -rf $(TARGET_DIR)/usr/libexec/perf-core/tests/
>  endef
> +
> +define PERF_LINUX_CONFIG_FIXUPS
> +	$(call KCONFIG_ENABLE_OPT,CONFIG_PERF_EVENTS)
> +endef

Unfortunately, "perf" is not a package, so this cannot work without
some work in package/linux-tools/linux-tools.mk. So I kept this patch
not applied, with the Linux kernel config tweak for Perf still in
linux/linux.mk.

Could you rework package/linux-tools/linux-tools.mk to properly support
this ?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 01/22] core/pkg-utils: rationalise kconfig option mangling
  2020-04-04 12:10 ` [Buildroot] [PATCH 01/22] core/pkg-utils: rationalise kconfig option mangling Yann E. MORIN
@ 2020-08-30  7:54   ` Peter Korsgaard
  0 siblings, 0 replies; 32+ messages in thread
From: Peter Korsgaard @ 2020-08-30  7:54 UTC (permalink / raw)
  To: buildroot

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > Currently, we have three macros that may mangle a .config file. All
 > three are modeled after the same pattern: removing the existing option
 > from the .config file, then adding the new definition for that option;
 > all three also implement that pattern with the same commands: sed and
 > echo.

 > This is all good so far, because it was simple enough, and the always
 > worked on a file passed in parameter.

 > However, we're soon going to change this file parameter to make it
 > optional, so that the file will then be auto-deduced for the current
 > package. In that case, the file to sed adn echo into will be a more
 > complex structure than just the parameter.

 > As such, move the actual mangling down to a helper macro, that is called
 > from the three existing ones.

 > Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
 > Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
 > Cc: Peter Korsgaard <peter@korsgaard.com>

Committed to 2020.02.x to fix the busybox breakage, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [Buildroot] [PATCH 02/22] core/pkg-utils: kconfig mangling defaults to current package's .config
  2020-04-04 12:10 ` [Buildroot] [PATCH 02/22] core/pkg-utils: kconfig mangling defaults to current package's .config Yann E. MORIN
  2020-05-01 13:55   ` Thomas Petazzoni
@ 2020-08-30  7:54   ` Peter Korsgaard
  1 sibling, 0 replies; 32+ messages in thread
From: Peter Korsgaard @ 2020-08-30  7:54 UTC (permalink / raw)
  To: buildroot

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > The kconfig mangling macros currently operate on the caller-supplied
 > .config file, on the assumption that the caller will always know what
 > file to mangle.

 > This was correct so far, as packages would indeed only mangle their own
 > .config files.

 > However, the linux kernel does its mangling based on whether some
 > packages are enabled or not. That list of conditional mangling is
 > getting bigger and bigger with each new package that needs such
 > mangling, culminating with the pending firewalld one [0]. Furthermore,
 > this mangling is not accessible to packages in br2-external trees. So
 > we'll want to have packages provide the mangling commands.

 > So we'll want the mangling to be done on the linux' .config file,,i.e.
 > and the expanding package context, not in the package calling the
 > macros.

 > But packages do not, and should not have knowledge about where the
 > .config file is, nor how it is named.

 > So we make the parameter to specify the .config file to mangle optional.
 > If it is set, this is what the macros will mangle; if it is not set, the
 > expanding packge's .config file will be used.

 > This has the added benefit that we do not have to repeat in the
 > exp[anding package context the knowledge of how the .config file is
 > named:

 >     FOO_KCONFIG_DOTCONFIG = .config
 >     define FOO_KCONFIG_FIXUPS_CMDS
 >         $(call KCONFIG_ENABLE_OPT,BLA,$(@D)/.config)
 >     endef

 > [0] http://lists.busybox.net/pipermail/buildroot/2020-March/278683.html

 > Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
 > Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
 > Cc: Peter Korsgaard <peter@korsgaard.com>

Committed to 2020.02.x to fix the busybox breakage, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2020-08-30  7:54 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-04 12:10 [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts) Yann E. MORIN
2020-04-04 12:10 ` [Buildroot] [PATCH 01/22] core/pkg-utils: rationalise kconfig option mangling Yann E. MORIN
2020-08-30  7:54   ` Peter Korsgaard
2020-04-04 12:10 ` [Buildroot] [PATCH 02/22] core/pkg-utils: kconfig mangling defaults to current package's .config Yann E. MORIN
2020-05-01 13:55   ` Thomas Petazzoni
2020-08-30  7:54   ` Peter Korsgaard
2020-04-04 12:10 ` [Buildroot] [PATCH 03/22] boot/barebox: don't specify .config to munge Yann E. MORIN
2020-04-04 12:10 ` [Buildroot] [PATCH 04/22] boot/uboot: " Yann E. MORIN
2020-04-04 12:10 ` [Buildroot] [PATCH 05/22] boot/busybox: " Yann E. MORIN
2020-04-04 12:10 ` [Buildroot] [PATCH 06/22] boot/swupdate: " Yann E. MORIN
2020-04-04 12:10 ` [Buildroot] [PATCH 07/22] boot/uclibc: " Yann E. MORIN
2020-04-04 12:10 ` [Buildroot] [PATCH 08/22] linux: " Yann E. MORIN
2020-04-04 12:10 ` [Buildroot] [PATCH 09/22] linux: allow packages to set options Yann E. MORIN
2020-05-01 13:56   ` Thomas Petazzoni
2020-04-04 12:10 ` [Buildroot] [PATCH 10/22] package/audit: bear the kernel options munging Yann E. MORIN
2020-04-06 12:10   ` Matthew Weber
2020-04-04 12:10 ` [Buildroot] [PATCH 11/22] package/intel-micro-code: " Yann E. MORIN
2020-04-04 12:10 ` [Buildroot] [PATCH 12/22] package/ktap: " Yann E. MORIN
2020-04-04 12:10 ` [Buildroot] [PATCH 13/22] package/pcm-tools: " Yann E. MORIN
2020-04-04 12:10 ` [Buildroot] [PATCH 14/22] package/linux-tools/perf: " Yann E. MORIN
2020-05-01 13:57   ` Thomas Petazzoni
2020-04-04 12:10 ` [Buildroot] [PATCH 15/22] package/systemd: " Yann E. MORIN
2020-04-04 12:10 ` [Buildroot] [PATCH 16/22] package/smack: " Yann E. MORIN
2020-04-04 12:10 ` [Buildroot] [PATCH 17/22] package/sunxi-mali-mainline-driver: " Yann E. MORIN
2020-04-04 12:10 ` [Buildroot] [PATCH 18/22] package/iptables: " Yann E. MORIN
2020-04-04 12:10 ` [Buildroot] [PATCH 19/22] package/xtables-addons: " Yann E. MORIN
2020-04-04 12:10 ` [Buildroot] [PATCH 20/22] package/wireguard-linux-compat: " Yann E. MORIN
2020-04-04 12:10 ` [Buildroot] [PATCH 21/22] package/libselinux: " Yann E. MORIN
2020-04-06 12:08   ` Matthew Weber
2020-04-19 18:14     ` Adam Duskett
2020-04-04 12:10 ` [Buildroot] [PATCH 22/22] package/kernel-module-imx-gpu-viv: " Yann E. MORIN
2020-05-01 13:54 ` [Buildroot] [PATCH 00/22] linux: allow packages to set kconfig options (branch yem/pkg-linux-opts) Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.