kconfig: Add a build target for checking current config for issues
PATCH 1/1 kconfig: Add a build target for checking current config for issues
The new target is called 'checkconfig' and currently is basically an alias for listnewconfig with KCONFIG_WARN_UNKNOWN_SYMBOLS set to true. It can be used to validate if the current config is directly compatible with the current kernel version or needs some manual adjustment.
--- scripts/kconfig/Makefile | 4 ++++ 1 file changed, 4 insertions(+)
scripts/kconfig/Makefile +4 -0
@@ -81,6 +81,9 @@ PHONY += savedefconfig defconfig savedefconfig: $(obj)/conf $(Q)$< $(silent) --$@=defconfig $(Kconfig) +checkconfig: $(obj)/conf + $(Q)KCONFIG_WARN_UNKNOWN_SYMBOLS=true $< --listnewconfig $(Kconfig) + defconfig: $(obj)/conf ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),) @$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'"
@@ -144,6 +147,7 @@ help: @echo ' default value without prompting' @echo ' tinyconfig - Configure the tiniest possible kernel' @echo ' testconfig - Run Kconfig unit tests (requires python3 and pytest)' + @echo ' checkconfig - Check current config for unrecognized and new symbols' @echo '' @echo 'Configuration topic targets:' @$(foreach f, $(all-config-fragments), \
Signature · 1 line
2.43.0.472.g3155946c3a-goog
Quoted 7 lines · Tomasz Figa
The new target is called 'checkconfig' and currently is basically an alias for
listnewconfigwithKCONFIG_WARN_UNKNOWN_SYMBOLSset to true. It can be used to validate if the current config is directly compatible with the current kernel version or needs some manual adjustment.Signed-off-by Tomasz Figa <[email protected]>
I rejected a new target in the past.
https://lore.kernel.org/all/[email protected]/T/#m55c37e3091158f8cb008d9e0b5c6bf3f5ead225a
Instead, you can run
KCONFIG_WARN_UNKNOWN_SYMBOLS=1 make listnewconfig
or
make W=c listnewconfig
Quoted 27 lines
--- scripts/kconfig/Makefile | 4 ++++ 1 file changed, 4 insertions(+)scripts/kconfig/Makefile +4
-1@@ -81,6 +81,9 @@ PHONY += savedefconfig defconfig savedefconfig: $(obj)/conf $(Q)$< $(silent) --$@=defconfig $(Kconfig) +checkconfig: $(obj)/conf + $(Q)KCONFIG_WARN_UNKNOWN_SYMBOLS=true $< --listnewconfig $(Kconfig) + defconfig: $(obj)/conf ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),) @$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'"@@ -144,6 +147,7 @@ help: @echo ' default value without prompting' @echo ' tinyconfig - Configure the tiniest possible kernel' @echo ' testconfig - Run Kconfig unit tests (requires python3 and pytest)' + @echo ' checkconfig - Check current config for unrecognized and new symbols' @echo '' @echo 'Configuration topic targets:' @$(foreach f, $(all-config-fragments), \ --
Quoted 2 lines
2.43.0.472.g3155946c3a-goog
--
Best Regards
Masahiro Yamada
Quoted 8 lines · Masahiro Yamada
Quoted 6 lines · Tomasz Figa
The new target is called 'checkconfig' and currently is basically an alias for
listnewconfigwithKCONFIG_WARN_UNKNOWN_SYMBOLSset to true. It can be used to validate if the current config is directly compatible with the current kernel version or needs some manual adjustment.
Quoted 7 lines
Quoted 1 line
Signed-off-by Tomasz Figa <[email protected]>I rejected a new target in the past.
https://lore.kernel.org/all/[email protected]/T/#m55c37e3091158f8cb008d9e0b5c6bf3f5ead225a
That was specifically for the unrecognized symbols warning. What I'm proposing is a universal target that would include any possible diagnostics.
Quoted 11 lines
Instead, you can run
KCONFIG_WARN_UNKNOWN_SYMBOLS=1 make listnewconfig
or
make W=c listnewconfig
I can do so, because my team member implemented it and told me and other team members about it. But how would someone who hasn't heard about it be aware of the existence of this useful feature?
Best regards,
Tomasz
Quoted 30 lines · Tomasz Figa
Quoted 8 lines · Masahiro Yamada
Quoted 6 lines · Tomasz Figa
The new target is called 'checkconfig' and currently is basically an alias for
listnewconfigwithKCONFIG_WARN_UNKNOWN_SYMBOLSset to true. It can be used to validate if the current config is directly compatible with the current kernel version or needs some manual adjustment.Quoted 7 lines
Quoted 1 line
Signed-off-by Tomasz Figa <[email protected]>I rejected a new target in the past.
https://lore.kernel.org/all/[email protected]/T/#m55c37e3091158f8cb008d9e0b5c6bf3f5ead225a
That was specifically for the unrecognized symbols warning. What I'm proposing is a universal target that would include any possible diagnostics.
Quoted 8 lines
Instead, you can run
KCONFIG_WARN_UNKNOWN_SYMBOLS=1 make listnewconfig
or
Quoted 7 lines
Quoted 3 lines
make W=c listnewconfig
I can do so, because my team member implemented it and told me and other team members about it. But how would someone who hasn't heard about it be aware of the existence of this useful feature?
People are not aware of your 'checkconfig' until
they run 'make help'.
The same for W=c.
'make help' explains it.
c: extra checks in the configuration stage (Kconfig)
Signature · 2 lines
Best Regards Masahiro Yamada
Quoted 44 lines · Masahiro Yamada
Quoted 30 lines · Tomasz Figa
Quoted 8 lines · Masahiro Yamada
Quoted 6 lines · Tomasz Figa
The new target is called 'checkconfig' and currently is basically an alias for
listnewconfigwithKCONFIG_WARN_UNKNOWN_SYMBOLSset to true. It can be used to validate if the current config is directly compatible with the current kernel version or needs some manual adjustment.Quoted 7 lines
Quoted 1 line
Signed-off-by Tomasz Figa <[email protected]>I rejected a new target in the past.
https://lore.kernel.org/all/[email protected]/T/#m55c37e3091158f8cb008d9e0b5c6bf3f5ead225a
That was specifically for the unrecognized symbols warning. What I'm proposing is a universal target that would include any possible diagnostics.
Quoted 8 lines
Instead, you can run
KCONFIG_WARN_UNKNOWN_SYMBOLS=1 make listnewconfig
or
Quoted 7 lines
Quoted 3 lines
make W=c listnewconfig
I can do so, because my team member implemented it and told me and other team members about it. But how would someone who hasn't heard about it be aware of the existence of this useful feature?
People are not aware of your 'checkconfig' until
they run 'make help'.
Quoted 6 lines
The same for W=c.
'make help' explains it.
c: extra checks in the configuration stage (
Kconfig)
Okay, that wasn't something present in Linux 6.7-rc7 that I used as my base. I checked out the current linux-next and it's indeed there, which I guess resolves the original problem somewhat. I still don't think it would be very clear from the description for a new user, especially given that it's far below the config-related targets, but at least it's there. Thanks for adding it.
Best regards,
Tomasz