Ouss4 commented on issue #3142:
URL:
https://github.com/apache/incubator-nuttx/issues/3142#issuecomment-831843309
> The procedure to include this in the build would possibly be done by
extending the configure.sh script so that it does the defconfig as usual, and
then applies the .conf file by calling kconfig-tweak over each line of this
file (and then make oldconfig or similar to finish the configuration).
There is the `kconfig-merge` tool that combines multiple defconfigs into one
(.config). This procedure can be reduced to calling `kconfig-merge` for all
the needed files. Something like
```
kconfig-merge -m nsh.conf stm32.conf net.conf
make olddefconfig
```
The `make olddefconfig` and the -m option of `kconfig-merge` can be omitted
if we implement `alldefconfig`.
```patch
diff --git a/tools/Makefile.unix b/tools/Makefile.unix
index 549d1be484..42328ca363 100644
--- a/tools/Makefile.unix
+++ b/tools/Makefile.unix
@@ -490,6 +490,9 @@ oldconfig: apps_preconfig
olddefconfig: apps_preconfig
$(Q) APPSDIR=${CONFIG_APPS_DIR} EXTERNALDIR=$(EXTERNALDIR)
kconfig-conf --olddefconfig Kconfig
+alldefconfig: apps_preconfig
+ $(Q) APPSDIR=${CONFIG_APPS_DIR} EXTERNALDIR=$(EXTERNALDIR)
kconfig-conf --alldefconfig Kconfig
+
menuconfig: apps_preconfig
$(Q) APPSDIR=${CONFIG_APPS_DIR} EXTERNALDIR=$(EXTERNALDIR)
kconfig-mconf Kconfig
diff --git a/tools/Makefile.win b/tools/Makefile.win
index 9ab3427eee..0e38df2792 100644
--- a/tools/Makefile.win
+++ b/tools/Makefile.win
@@ -445,6 +445,9 @@ oldconfig: apps_preconfig
olddefconfig: apps_preconfig
$(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& set
EXTERNALDIR=$(EXTERNALDIR)& kconfig-conf --olddefconfig Kconfig
+alldefconfig: apps_preconfig
+ $(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& set
EXTERNALDIR=$(EXTERNALDIR)& kconfig-conf --alldefconfig Kconfig
+
menuconfig: configenv apps_preconfig
$(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& set
EXTERNALDIR=$(EXTERNALDIR)& kconfig-mconf Kconfig
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]