Article View: linux.kernel
Article #1[PATCH v1 04/10] kconfig: Introduce checkconfig target
From: Ahmed S. Darwish
Date: Fri, 06 Nov 2026 09:50
Date: Fri, 06 Nov 2026 09:50
59 lines
4262 bytes
4262 bytes
Add a checkconfig target to validate the current kernel .config against a set of rules. Select the rules using a mandatory RULES= make variable. Example usage: make RULES=preempt_rt checkconfig Use the kconfig-checker to perform all sanity checks. Document the new target at the 'make help' text. Signed-off-by: Ahmed S. Darwish <darwi@linutronix.de> --- scripts/kconfig/Makefile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 5baf1c44ffa2..d67a23730259 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -125,6 +125,26 @@ testconfig: $(obj)/conf $(if $(findstring 1,$(KBUILD_VERBOSE)),--capture=no) clean-files += tests/.cache +checkconfig := $(PYTHON3) -B $(srctree)/tools/kconfig-checker/check.py +list_checkconfig_rules = \ + echo -n >&2 "Available RULES: "; \ + $(checkconfig) list-rules >&2; \ + echo >&2 + +PHONY += checkconfig +checkconfig: + $(Q)if [ -z "$(RULES)" ]; then \ + echo >&2 "Usage: make RULES=<profile> checkconfig"; \ + $(list_checkconfig_rules); \ + exit 2; \ + fi + $(Q)if ! $(checkconfig) list-rules | grep -qw "$(RULES)"; then \ + echo >&2 "Unknown RULES profile = $(RULES)"; \ + $(list_checkconfig_rules); \ + exit 2; \ + fi + $(Q)$(checkconfig) check -r "$(RULES)" -c "$(KCONFIG_CONFIG)" + # Help text used by make help help: @echo 'Configuration targets:' @@ -154,6 +174,9 @@ 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 against sanity rules specified by RULES' + @echo ' Example usage: "make RULES=preempt_rt checkconfig"' + @echo ' (requires python3, PyYAML, and jsonschema)' @echo '' @echo 'Configuration topic targets:' @$(foreach f, $(all-config-fragments), \ -- 2.56.0
Technical Details
Message-ID:
<NWoK5-aaez-5@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!news.servidellagleba.it!bofh.it!news.nic.it!robomodReferences:
<NWoK5-aaez-7@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!news.servidellagleba.it!bofh.it!news.nic.it!robomod From: "Ahmed S. Darwish" <darwi@linutronix.de> Newsgroups: linux.debian.kernel,linux.kernel Subject: [PATCH v1 04/10] kconfig: Introduce checkconfig target Date: Fri, 06 Nov 2026 10:50:01 +0100 Message-ID: <NWoK5-aaez-5@gated-at.bofh.it> References: <NWoK5-aaez-7@gated-at.bofh.it> X-Mailbox-Line: From debian-kernel-request@lists.debian.org Fri Nov 6 09:43:14 2026 Old-Return-Path: <darwi@linutronix.de> X-Amavis-Spam-Status: No, score=-4.4 tagged_above=-10000 required=5.3 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate: -4.6 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailing-List: <debian-kernel@lists.debian.org> archive/latest/158075 List-ID: <debian-kernel.lists.debian.org> List-URL: <https://lists.debian.org/debian-kernel/> List-Archive: https://lists.debian.org/msgid-search/20261106091922.7560-5-darwi@linutronix.de Approved: robomod@news.nic.it Lines: 59 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>, Frederic Weisbecker <frederic@kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jonathan Corbet <corbet@lwn.net>, John Ogness <john.ogness@linutronix.de>, Derek Barbosa <debarbos@redhat.com>, Zbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>, Daan De Meyer <daan.j.demeyer@gmail.com>, Luca Boccassi <luca.boccassi@gmail.com>, linux-rt-devel@lists.linux.dev, debian-kernel@lists.debian.org, linux-kbuild@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, "Ahmed S. Darwish" <darwi@linutronix.de> X-Original-Date: Fri, 6 Nov 2026 10:19:16 +0100 X-Original-Message-ID: <20261106091922.7560-5-darwi@linutronix.de> X-Original-References: <20261106091922.7560-1-darwi@linutronix.de>