All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/4] package/pkg-kconfig: introduce generic help (branch yem/kconfig-help)
@ 2021-07-24 21:19 Yann E. MORIN
  2021-07-24 21:19 ` [Buildroot] [PATCH 1/4] package/pkg-kconfig: move defaults before calling pkg-generic Yann E. MORIN
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Yann E. MORIN @ 2021-07-24 21:19 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas De Schampheleire, Yann E . MORIN, Thomas Petazzoni

Hello All!

This is a counter-proposal to an eariler patch from Thomas, which adds
and fixes help entries for kconfig packages:

    https://patchwork.ozlabs.org/project/buildroot/patch/20210703194001.693553-1-thomas.petazzoni@bootlin.com/

Compared to that patch, this series ointroduces a generic help generator
for kconfig packages, and removes all existing custom help commands for
those packages.

As a cherry on the cake, it adds a new configurator to uClibc, which as
supported nconfig for some time now...

Regards,
Yann E. MORIN.


----------------------------------------------------------------
Yann E. MORIN (4):
      package/pkg-kconfig: move defaults before calling pkg-generic
      package/pkg-kconfig: generate generic help
      package: use the generic _HELP_CMDS for kconfig-based packages
      package/uclibc: add nconfig as a kconfig editor

 boot/barebox/barebox/barebox.mk         |  5 -----
 boot/uboot/uboot.mk                     |  6 -----
 docs/manual/adding-packages-kconfig.txt |  3 +++
 linux/linux.mk                          |  7 ------
 package/busybox/busybox.mk              |  5 +----
 package/pkg-kconfig.mk                  | 40 ++++++++++++++++++++++++++-------
 package/uclibc/uclibc.mk                |  5 +----
 7 files changed, 37 insertions(+), 34 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.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 1/4] package/pkg-kconfig: move defaults before calling pkg-generic
  2021-07-24 21:19 [Buildroot] [PATCH 0/4] package/pkg-kconfig: introduce generic help (branch yem/kconfig-help) Yann E. MORIN
@ 2021-07-24 21:19 ` Yann E. MORIN
  2021-07-24 21:19 ` [Buildroot] [PATCH 2/4] package/pkg-kconfig: generate generic help Yann E. MORIN
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2021-07-24 21:19 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas De Schampheleire, Yann E. MORIN, Thomas Petazzoni

Currently, we define the default values for kconfig-specific variables
after we call into the generic package infrastructure.

So far, this was totally unconsequential, because there was no kconfig
variable that could influence the generic parts. But conversely, there
are generic variables that do influence the kconfig part (e.g. $(2)_DIR
that is used in some dependency definitions), but none that do influence
the kconfig variables.

However, we are going to add a new kconfig-related variable that will
have an impact on the generic parts, so we will want that kconfig
variable to be defined before calling into the generic infrastructure.

For consistency, move all the defaults before calling the generic infra.

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>
---
 package/pkg-kconfig.mk | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/package/pkg-kconfig.mk b/package/pkg-kconfig.mk
index dd727b7200..49074f9220 100644
--- a/package/pkg-kconfig.mk
+++ b/package/pkg-kconfig.mk
@@ -78,6 +78,14 @@ endef
 
 define inner-kconfig-package
 
+# Default values
+$(2)_MAKE ?= $$(MAKE)
+$(2)_KCONFIG_EDITORS ?= menuconfig
+$(2)_KCONFIG_OPTS ?=
+$(2)_KCONFIG_FIXUP_CMDS ?=
+$(2)_KCONFIG_FRAGMENT_FILES ?=
+$(2)_KCONFIG_DOTCONFIG ?= .config
+
 # Register the kconfig dependencies as regular dependencies, so that
 # they are also accounted for in the generated graphs.
 $(2)_DEPENDENCIES += $$($(2)_KCONFIG_DEPENDENCIES)
@@ -88,14 +96,6 @@ $(2)_DEPENDENCIES += $$($(2)_KCONFIG_DEPENDENCIES)
 # dependency expression
 $(call inner-generic-package,$(1),$(2),$(3),$(4))
 
-# Default values
-$(2)_MAKE ?= $$(MAKE)
-$(2)_KCONFIG_EDITORS ?= menuconfig
-$(2)_KCONFIG_OPTS ?=
-$(2)_KCONFIG_FIXUP_CMDS ?=
-$(2)_KCONFIG_FRAGMENT_FILES ?=
-$(2)_KCONFIG_DOTCONFIG ?= .config
-
 # Do not use $(2)_KCONFIG_DOTCONFIG as stamp file, because the package
 # buildsystem (e.g. linux >= 4.19) may touch it, thus rendering our
 # timestamps out of date, thus re-trigerring the build of the package.
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 2/4] package/pkg-kconfig: generate generic help
  2021-07-24 21:19 [Buildroot] [PATCH 0/4] package/pkg-kconfig: introduce generic help (branch yem/kconfig-help) Yann E. MORIN
  2021-07-24 21:19 ` [Buildroot] [PATCH 1/4] package/pkg-kconfig: move defaults before calling pkg-generic Yann E. MORIN
@ 2021-07-24 21:19 ` Yann E. MORIN
  2021-07-25 13:19   ` Arnout Vandecappelle
  2021-07-24 21:19 ` [Buildroot] [PATCH 3/4] package: use the generic _HELP_CMDS for kconfig-based packages Yann E. MORIN
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 8+ messages in thread
From: Yann E. MORIN @ 2021-07-24 21:19 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas De Schampheleire, Yann E. MORIN, Thomas Petazzoni

Currently, as Thomas pointed out [0], the help for kconfig packages is
not consistently used and handled by the different packages.

This commit introduces a generic help text for kconfig packages, that is
based on what the package declares:

  - the list of kconfig editors it supports;

  - whether it is possible to save back the configuration (impossible if
    the package uses an in-tree defconfig file);

  - whether the package actually supports (loading and saving) defconfig
    files, by introducing a new variable a package can set if it does
    not (only busybox is known to be in that case).

That new help helper is only used if the package does not already define
its own help, to be consistent with what we do for other _CMDS.

[0] http://lists.busybox.net/pipermail/buildroot/2021-July/313570.html

Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
---
 docs/manual/adding-packages-kconfig.txt |  3 +++
 package/pkg-kconfig.mk                  | 24 ++++++++++++++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/docs/manual/adding-packages-kconfig.txt b/docs/manual/adding-packages-kconfig.txt
index 8f40ea6099..a35681775f 100644
--- a/docs/manual/adding-packages-kconfig.txt
+++ b/docs/manual/adding-packages-kconfig.txt
@@ -91,3 +91,6 @@ be set to suit the needs of the package under consideration:
 * +FOO_KCONFIG_DEPENDENCIES+: the list of packages (most probably, host
   packages) that need to be built before this package's kconfig is
   interpreted. Seldom used. By default, empty.
+
+* +FOO_KCONFIG_SUPPORTS_DEFCONFIG+: whether the package's kconfig system
+  supports using defconfig files; few packages do not. By default, 'YES'.
diff --git a/package/pkg-kconfig.mk b/package/pkg-kconfig.mk
index 49074f9220..715c3e04ec 100644
--- a/package/pkg-kconfig.mk
+++ b/package/pkg-kconfig.mk
@@ -85,11 +85,35 @@ $(2)_KCONFIG_OPTS ?=
 $(2)_KCONFIG_FIXUP_CMDS ?=
 $(2)_KCONFIG_FRAGMENT_FILES ?=
 $(2)_KCONFIG_DOTCONFIG ?= .config
+$(2)_KCONFIG_SUPPORTS_DEFCONFIG ?= YES
 
 # Register the kconfig dependencies as regular dependencies, so that
 # they are also accounted for in the generated graphs.
 $(2)_DEPENDENCIES += $$($(2)_KCONFIG_DEPENDENCIES)
 
+# Generate the kconfig-related help: one entry for each editor.
+# Additionally, if the package is *not* using an in-tree defconfig
+# name, an entry for updating the package configuration file.
+ifndef $(2)_HELP_CMDS
+define $(2)_HELP_CMDS
+	$$(foreach editor, $$($(2)_KCONFIG_EDITORS), \
+		@printf '  %-22s - Run %s %s\n' $(1)-$$(editor) $(1) $$(editor)
+	)
+	$$(if $$($(2)_KCONFIG_DEFCONFIG),,\
+		$$(if $$(filter YES,$$($(2)_KCONFIG_SUPPORTS_DEFCONFIG)),\
+			@printf '  %-22s - Save the %s configuration as a defconfig file\n' \
+				$(1)-update-defconfig $(1)
+			@printf '  %-22s     to %s\n' '' $$($(2)_KCONFIG_FILE)
+			@printf '  %-22s     (or override with %s_KCONFIG_FILE)\n' '' $(2)
+		)
+		@printf '  %-22s - Save the %s configuration as a full .config file\n' \
+			$(1)-update-config $(1)
+		@printf '  %-22s     to %s\n' '' $$($(2)_KCONFIG_FILE)
+		@printf '  %-22s     (or override with %s_KCONFIG_FILE)\n' '' $(2)
+	)
+endef
+endif
+
 # Call the generic package infrastructure to generate the necessary
 # make targets.
 # Note: this must be done _before_ attempting to use $$($(2)_DIR) in a
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 3/4] package: use the generic _HELP_CMDS for kconfig-based packages
  2021-07-24 21:19 [Buildroot] [PATCH 0/4] package/pkg-kconfig: introduce generic help (branch yem/kconfig-help) Yann E. MORIN
  2021-07-24 21:19 ` [Buildroot] [PATCH 1/4] package/pkg-kconfig: move defaults before calling pkg-generic Yann E. MORIN
  2021-07-24 21:19 ` [Buildroot] [PATCH 2/4] package/pkg-kconfig: generate generic help Yann E. MORIN
@ 2021-07-24 21:19 ` Yann E. MORIN
  2021-07-24 21:19 ` [Buildroot] [PATCH 4/4] package/uclibc: add nconfig as a kconfig editor Yann E. MORIN
  2021-07-25 13:21 ` [Buildroot] [PATCH 0/4] package/pkg-kconfig: introduce generic help (branch yem/kconfig-help) Arnout Vandecappelle
  4 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2021-07-24 21:19 UTC (permalink / raw)
  To: buildroot; +Cc: Yann E. MORIN, Thomas Petazzoni

As Thomas put it:

    The <pkg>_HELP_CMDS variable allows packages using the
    kconfig-package infrastructure to display their specific
    targets related to the handling of their configuration.

    However, it was not consistently used and handled by the
    different packages.

So, this commit switches all the kconfig-based package to use the
generic help helper.

As a consequence:

  - all kconfig packages now advetise their kconfig-related actions,
    where some were previously missing: at91bootstrap3, linux-backports,
    swupdate, xvisor;

  - busybox advertises it does not support defconfig files;

  - the 'foo-savedfconfig' action is no longer advertised: it is to be
    considered an internal implementation detail.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 boot/barebox/barebox/barebox.mk | 5 -----
 boot/uboot/uboot.mk             | 6 ------
 linux/linux.mk                  | 7 -------
 package/busybox/busybox.mk      | 5 +----
 package/uclibc/uclibc.mk        | 4 ----
 5 files changed, 1 insertion(+), 26 deletions(-)

diff --git a/boot/barebox/barebox/barebox.mk b/boot/barebox/barebox/barebox.mk
index 39afb0fccb..6a5a80de34 100644
--- a/boot/barebox/barebox/barebox.mk
+++ b/boot/barebox/barebox/barebox.mk
@@ -4,10 +4,5 @@
 #
 ################################################################################
 
-define BAREBOX_HELP_CMDS
-	@echo '  barebox-menuconfig     - Run barebox menuconfig'
-	@echo '  barebox-savedefconfig  - Run barebox savedefconfig'
-endef
-
 # Instantiate the barebox package
 $(eval $(barebox-package))
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index 9c2261963d..4f3c9b7c3a 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -296,12 +296,6 @@ UBOOT_KCONFIG_EDITORS = menuconfig xconfig gconfig nconfig
 # override again. In addition, host-ccache is not ready at kconfig
 # time, so use HOSTCC_NOCCACHE.
 UBOOT_KCONFIG_OPTS = $(UBOOT_MAKE_OPTS) HOSTCC="$(HOSTCC_NOCCACHE)" HOSTLDFLAGS=""
-define UBOOT_HELP_CMDS
-	@echo '  uboot-menuconfig       - Run U-Boot menuconfig'
-	@echo '  uboot-savedefconfig    - Run U-Boot savedefconfig'
-	@echo '  uboot-update-defconfig - Save the U-Boot configuration to the path specified'
-	@echo '                             by BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE'
-endef
 endif # BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY
 
 UBOOT_CUSTOM_DTS_PATH = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_DTS_PATH))
diff --git a/linux/linux.mk b/linux/linux.mk
index 1457228eb9..61fdc0c76c 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -16,13 +16,6 @@ LINUX_CPE_ID_VENDOR = linux
 LINUX_CPE_ID_PRODUCT = linux_kernel
 LINUX_CPE_ID_PREFIX = cpe:2.3:o
 
-define LINUX_HELP_CMDS
-	@echo '  linux-menuconfig       - Run Linux kernel menuconfig'
-	@echo '  linux-savedefconfig    - Run Linux kernel savedefconfig'
-	@echo '  linux-update-defconfig - Save the Linux configuration to the path specified'
-	@echo '                             by BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE'
-endef
-
 # Compute LINUX_SOURCE and LINUX_SITE from the configuration
 ifeq ($(BR2_LINUX_KERNEL_CUSTOM_TARBALL),y)
 LINUX_TARBALL = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION))
diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index 413939e28d..68e0b8a72c 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -11,10 +11,6 @@ BUSYBOX_LICENSE = GPL-2.0, bzip2-1.0.4
 BUSYBOX_LICENSE_FILES = LICENSE archival/libarchive/bz/LICENSE
 BUSYBOX_CPE_ID_VENDOR = busybox
 
-define BUSYBOX_HELP_CMDS
-	@echo '  busybox-menuconfig     - Run BusyBox menuconfig'
-endef
-
 BUSYBOX_CFLAGS = \
 	$(TARGET_CFLAGS)
 
@@ -107,6 +103,7 @@ ifndef BUSYBOX_CONFIG_FILE
 BUSYBOX_CONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_BUSYBOX_CONFIG))
 endif
 
+BUSYBOX_KCONFIG_HAS_DEFCONFIG = NO
 BUSYBOX_KCONFIG_FILE = $(BUSYBOX_CONFIG_FILE)
 BUSYBOX_KCONFIG_FRAGMENT_FILES = $(call qstrip,$(BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES))
 BUSYBOX_KCONFIG_EDITORS = menuconfig xconfig gconfig
diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk
index a7c96684d0..5c17eea8dd 100644
--- a/package/uclibc/uclibc.mk
+++ b/package/uclibc/uclibc.mk
@@ -13,10 +13,6 @@ UCLIBC_INSTALL_STAGING = YES
 UCLIBC_CPE_ID_VENDOR = uclibc-ng_project
 UCLIBC_CPE_ID_PRODUCT = uclibc-ng
 
-define UCLIBC_HELP_CMDS
-	@echo '  uclibc-menuconfig      - Run uClibc menuconfig'
-endef
-
 # uclibc is part of the toolchain so disable the toolchain dependency
 UCLIBC_ADD_TOOLCHAIN_DEPENDENCY = NO
 
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 4/4] package/uclibc: add nconfig as a kconfig editor
  2021-07-24 21:19 [Buildroot] [PATCH 0/4] package/pkg-kconfig: introduce generic help (branch yem/kconfig-help) Yann E. MORIN
                   ` (2 preceding siblings ...)
  2021-07-24 21:19 ` [Buildroot] [PATCH 3/4] package: use the generic _HELP_CMDS for kconfig-based packages Yann E. MORIN
@ 2021-07-24 21:19 ` Yann E. MORIN
  2021-08-05 10:03   ` Peter Korsgaard
  2021-07-25 13:21 ` [Buildroot] [PATCH 0/4] package/pkg-kconfig: introduce generic help (branch yem/kconfig-help) Arnout Vandecappelle
  4 siblings, 1 reply; 8+ messages in thread
From: Yann E. MORIN @ 2021-07-24 21:19 UTC (permalink / raw)
  To: buildroot; +Cc: Yann E. MORIN

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
 package/uclibc/uclibc.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk
index 5c17eea8dd..180ed9951e 100644
--- a/package/uclibc/uclibc.mk
+++ b/package/uclibc/uclibc.mk
@@ -26,6 +26,7 @@ ifndef UCLIBC_CONFIG_FILE
 UCLIBC_CONFIG_FILE = $(call qstrip,$(BR2_UCLIBC_CONFIG))
 endif
 
+UCLIBC_KCONFIG_EDITORS = menuconfig nconfig
 UCLIBC_KCONFIG_FILE = $(UCLIBC_CONFIG_FILE)
 UCLIBC_KCONFIG_FRAGMENT_FILES = $(call qstrip,$(BR2_UCLIBC_CONFIG_FRAGMENT_FILES))
 
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/4] package/pkg-kconfig: generate generic help
  2021-07-24 21:19 ` [Buildroot] [PATCH 2/4] package/pkg-kconfig: generate generic help Yann E. MORIN
@ 2021-07-25 13:19   ` Arnout Vandecappelle
  0 siblings, 0 replies; 8+ messages in thread
From: Arnout Vandecappelle @ 2021-07-25 13:19 UTC (permalink / raw)
  To: Yann E. MORIN, buildroot; +Cc: Thomas De Schampheleire, Thomas Petazzoni



On 24/07/2021 23:19, Yann E. MORIN wrote:
> Currently, as Thomas pointed out [0], the help for kconfig packages is
> not consistently used and handled by the different packages.
> 
> This commit introduces a generic help text for kconfig packages, that is
> based on what the package declares:
> 
>   - the list of kconfig editors it supports;
> 
>   - whether it is possible to save back the configuration (impossible if
>     the package uses an in-tree defconfig file);
> 
>   - whether the package actually supports (loading and saving) defconfig
>     files, by introducing a new variable a package can set if it does
>     not (only busybox is known to be in that case).
> 
> That new help helper is only used if the package does not already define
> its own help, to be consistent with what we do for other _CMDS.
> 
> [0] http://lists.busybox.net/pipermail/buildroot/2021-July/313570.html
> 
> Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
> ---
>  docs/manual/adding-packages-kconfig.txt |  3 +++
>  package/pkg-kconfig.mk                  | 24 ++++++++++++++++++++++++
>  2 files changed, 27 insertions(+)
> 
> diff --git a/docs/manual/adding-packages-kconfig.txt b/docs/manual/adding-packages-kconfig.txt
> index 8f40ea6099..a35681775f 100644
> --- a/docs/manual/adding-packages-kconfig.txt
> +++ b/docs/manual/adding-packages-kconfig.txt
> @@ -91,3 +91,6 @@ be set to suit the needs of the package under consideration:
>  * +FOO_KCONFIG_DEPENDENCIES+: the list of packages (most probably, host
>    packages) that need to be built before this package's kconfig is
>    interpreted. Seldom used. By default, empty.
> +
> +* +FOO_KCONFIG_SUPPORTS_DEFCONFIG+: whether the package's kconfig system
> +  supports using defconfig files; few packages do not. By default, 'YES'.
> diff --git a/package/pkg-kconfig.mk b/package/pkg-kconfig.mk
> index 49074f9220..715c3e04ec 100644
> --- a/package/pkg-kconfig.mk
> +++ b/package/pkg-kconfig.mk
> @@ -85,11 +85,35 @@ $(2)_KCONFIG_OPTS ?=
>  $(2)_KCONFIG_FIXUP_CMDS ?=
>  $(2)_KCONFIG_FRAGMENT_FILES ?=
>  $(2)_KCONFIG_DOTCONFIG ?= .config
> +$(2)_KCONFIG_SUPPORTS_DEFCONFIG ?= YES
>  
>  # Register the kconfig dependencies as regular dependencies, so that
>  # they are also accounted for in the generated graphs.
>  $(2)_DEPENDENCIES += $$($(2)_KCONFIG_DEPENDENCIES)
>  
> +# Generate the kconfig-related help: one entry for each editor.
> +# Additionally, if the package is *not* using an in-tree defconfig
> +# name, an entry for updating the package configuration file.
> +ifndef $(2)_HELP_CMDS
> +define $(2)_HELP_CMDS
> +	$$(foreach editor, $$($(2)_KCONFIG_EDITORS), \
> +		@printf '  %-22s - Run %s %s\n' $(1)-$$(editor) $(1) $$(editor)
> +	)
> +	$$(if $$($(2)_KCONFIG_DEFCONFIG),,\

 We should probably also simply remove the -update-config and -update-defconfig
rules when _KCONFIG_DEFCONFIG is set. There's currently a condition for that in
kconfig-package-update-config, but it's better to just not have the option at
all. I may cook a patch for that.

> +		$$(if $$(filter YES,$$($(2)_KCONFIG_SUPPORTS_DEFCONFIG)),\


 Now we have this variable, it would make sense to also make $(1)-savedefconfig
and $(1)-update-defconfig depend on it. I may cook a patch to do exactly that.



 Regards,
 Arnout


> +			@printf '  %-22s - Save the %s configuration as a defconfig file\n' \
> +				$(1)-update-defconfig $(1)
> +			@printf '  %-22s     to %s\n' '' $$($(2)_KCONFIG_FILE)
> +			@printf '  %-22s     (or override with %s_KCONFIG_FILE)\n' '' $(2)
> +		)
> +		@printf '  %-22s - Save the %s configuration as a full .config file\n' \
> +			$(1)-update-config $(1)
> +		@printf '  %-22s     to %s\n' '' $$($(2)_KCONFIG_FILE)
> +		@printf '  %-22s     (or override with %s_KCONFIG_FILE)\n' '' $(2)
> +	)
> +endef
> +endif
> +
>  # Call the generic package infrastructure to generate the necessary
>  # make targets.
>  # Note: this must be done _before_ attempting to use $$($(2)_DIR) in a
> 
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 0/4] package/pkg-kconfig: introduce generic help (branch yem/kconfig-help)
  2021-07-24 21:19 [Buildroot] [PATCH 0/4] package/pkg-kconfig: introduce generic help (branch yem/kconfig-help) Yann E. MORIN
                   ` (3 preceding siblings ...)
  2021-07-24 21:19 ` [Buildroot] [PATCH 4/4] package/uclibc: add nconfig as a kconfig editor Yann E. MORIN
@ 2021-07-25 13:21 ` Arnout Vandecappelle
  4 siblings, 0 replies; 8+ messages in thread
From: Arnout Vandecappelle @ 2021-07-25 13:21 UTC (permalink / raw)
  To: Yann E. MORIN, buildroot; +Cc: Thomas De Schampheleire, Thomas Petazzoni



On 24/07/2021 23:19, Yann E. MORIN wrote:
> Hello All!
> 
> This is a counter-proposal to an eariler patch from Thomas, which adds
> and fixes help entries for kconfig packages:
> 
>     https://patchwork.ozlabs.org/project/buildroot/patch/20210703194001.693553-1-thomas.petazzoni@bootlin.com/
> 
> Compared to that patch, this series ointroduces a generic help generator
> for kconfig packages, and removes all existing custom help commands for
> those packages.
> 
> As a cherry on the cake, it adds a new configurator to uClibc, which as
> supported nconfig for some time now...

 Series applied to master, thanks! I'll also mark Thomas's patch as Superseded.

 Regards,
 Arnout

> 
> Regards,
> Yann E. MORIN.
> 
> 
> ----------------------------------------------------------------
> Yann E. MORIN (4):
>       package/pkg-kconfig: move defaults before calling pkg-generic
>       package/pkg-kconfig: generate generic help
>       package: use the generic _HELP_CMDS for kconfig-based packages
>       package/uclibc: add nconfig as a kconfig editor
> 
>  boot/barebox/barebox/barebox.mk         |  5 -----
>  boot/uboot/uboot.mk                     |  6 -----
>  docs/manual/adding-packages-kconfig.txt |  3 +++
>  linux/linux.mk                          |  7 ------
>  package/busybox/busybox.mk              |  5 +----
>  package/pkg-kconfig.mk                  | 40 ++++++++++++++++++++++++++-------
>  package/uclibc/uclibc.mk                |  5 +----
>  7 files changed, 37 insertions(+), 34 deletions(-)
> 
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 4/4] package/uclibc: add nconfig as a kconfig editor
  2021-07-24 21:19 ` [Buildroot] [PATCH 4/4] package/uclibc: add nconfig as a kconfig editor Yann E. MORIN
@ 2021-08-05 10:03   ` Peter Korsgaard
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2021-08-05 10:03 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: buildroot

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

 > Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>

Committed to 2021.02.x and 2021.05.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

end of thread, other threads:[~2021-08-05 10:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-24 21:19 [Buildroot] [PATCH 0/4] package/pkg-kconfig: introduce generic help (branch yem/kconfig-help) Yann E. MORIN
2021-07-24 21:19 ` [Buildroot] [PATCH 1/4] package/pkg-kconfig: move defaults before calling pkg-generic Yann E. MORIN
2021-07-24 21:19 ` [Buildroot] [PATCH 2/4] package/pkg-kconfig: generate generic help Yann E. MORIN
2021-07-25 13:19   ` Arnout Vandecappelle
2021-07-24 21:19 ` [Buildroot] [PATCH 3/4] package: use the generic _HELP_CMDS for kconfig-based packages Yann E. MORIN
2021-07-24 21:19 ` [Buildroot] [PATCH 4/4] package/uclibc: add nconfig as a kconfig editor Yann E. MORIN
2021-08-05 10:03   ` Peter Korsgaard
2021-07-25 13:21 ` [Buildroot] [PATCH 0/4] package/pkg-kconfig: introduce generic help (branch yem/kconfig-help) Arnout Vandecappelle

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.