[PATCH 8/8] cmd: config: allow simple filtering of output
Tom Rini
trini at konsulko.com
Wed Jul 1 20:15:33 CEST 2026
On Wed, Jul 01, 2026 at 07:15:35PM +0200, Rasmus Villemoes wrote:
> When doing development, it can be quite useful to enable
> CONFIG_CMD_CONFIG, so that one can always check whether a config knob
> one has just enabled has actually made it to target.
>
> Because sometimes, one doesn't flash the right binary, or maybe one
> has just done CONFIG_FOO=y in some config fragment, but that had no
> effect because one would also have to do CONFIG_BAR=y.
>
> However, 2400+ lines of text are rather hard to read through. One
> probably uses a terminal emulator with capturing enabled, but
> searching back through the capture file is a little tedious, and one
> easily ends up finding something that doesn't pertain to the most
> recent 'config' command invocation.
>
> So make it possible to limit the output to those lines containing a
> given string. Like the search functionality in menuconfig, make it
> case insensitive, because it is much more convenient to type "config
> pinctrl" than "config PINCTRL".
>
> Since enabling CONFIG_CMD_CONFIG by itself adds over 10K of data, and
> that increases with every U-Boot release even if one doesn't add any
> new features to one's own defconfig (because the .config grows lots of
> "is not set"), I don't see any point in guarding this by some
> CONFIG_CMD_CONFIG_GREP.
>
> Signed-off-by: Rasmus Villemoes <rv at rasmusvillemoes.dk>
> ---
> cmd/config.c | 25 ++++++++++++++++++++++---
> 1 file changed, 22 insertions(+), 3 deletions(-)
Reasonable addition and explanation (and having switched to tmux from
screen, I don't have an easy capture anymore, the one regret I have) so
this is very useful. My only feedback is that you should add
doc/usage/cmd/config.rst now too.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260701/bec443f4/attachment.sig>
More information about the U-Boot
mailing list