KCONFIG-DIFF(1)

πŸ’– KCONFIG-DIFF β€” the kconfig toolkit, but make it make sense πŸ’–

okay bestie, gather round, because we're talking about kconfig-diff, which is literally a standalone implementation of the Linux Kconfig parser. yes, the whole thing. she's self-contained, she's iconic, and she's here to spill the tea on your .config files 🫢

This page lives in the kconfig-diff manual, section 1, and it's giving very October 2017 energy. iykyk ✨


🌸 NAME 🌸

kconfig-diff β€” a standalone implementation of the Linux Kconfig parser. periodt.


πŸŽ€ SYNOPSIS πŸŽ€

kconfig-diff [options] <KConfig_file>

that's it, that's the whole vibe. one file, some options, slay.


✨ DESCRIPTION ✨

so basically the kconfig toolkit supports the Kconfig language and implements the parser and the configuration support that goes with your KConfig files β€” and it respects the Linux kernel KConfig convention, no cap. πŸ‘‘

Here's the thing at configuration time, okay? each frontend is built on a different thing, and they all have their own little personality:

  • kconfig-mconf is based on ncurses (that's the menuconfig one)
  • kconfig-conf is based on dialog (that's config)
  • kconfig-gconf is based on GTK+ (that's gconfig, and she's pretty πŸ’…)

And then the associated tools, aka the side characters that ate:

  • kconfig-diff displays symbols diff between .config files πŸ”₯

like. it literally diffs your configs. what more do you want.


πŸ’… OPTIONS πŸ’…

okay so the options list is short but she's mighty:

  • --silentoldconfig β€” Only for kconfig-conf. it reloads a given .config and regenerates header and command files accordingly. (yes, only for kconfig-conf, don't try it elsewhere bestie πŸ™ˆ)
  • --allnoconfig β€” sets all boolean configuration to no. all of them. every single one. nope energy only.
  • --allyesconfig β€” sets all boolean configuration to yes. yes energy only. slay.
  • --randconfig β€” generates a random configuration. chaos mode activated 🎲

🌈 ENVIRONMENT 🌈

bestie this section is long, but every single variable matters, so buckle up and don't skip, fr fr.

🧚 Environment variables for *config

  • KCONFIG_CONFIG β€” you can use this one to specify a default kernel config file name, which overrides the default name of ".config". lowkey useful.
  • KCONFIG_OVERWRITECONFIG β€” if you set KCONFIG_OVERWRITECONFIG in the environment, Kconfig will not break symlinks when .config is a symlink to somewhere else. so if you're a symlink girlie, this is your moment πŸ’œ
  • CONFIG_ β€” if you set CONFIG_ in the environment, Kconfig will prefix all symbols with its value when saving the configuration, instead of using the default, "CONFIG_".

πŸ¦‹ Environment variables for {allyes/allmod/allno/rand}config

  • KCONFIG_ALLCONFIG β€” okay so the allyesconfig / allmodconfig / allnoconfig / randconfig variants can also use the environment variable KCONFIG_ALLCONFIG as a flag or a filename that contains config symbols the user requires to be set to a specific value.

If KCONFIG_ALLCONFIG is used without a filename β€” where KCONFIG_ALLCONFIG == "" or KCONFIG_ALLCONFIG == "1" β€” then "make *config" checks for a file named "all{yes/mod/no/def/random}.config" (corresponding to the *config command that was used) for symbol values that are to be forced. If this file is not found, it checks for a file named "all.config" to contain forced values.

This enables you to create "miniature" config (miniconfig) or custom config files containing just the config symbols that you are interested in. Then the kernel config system generates the full .config file, including symbols of your miniconfig file. ✨

Heads up though: this KCONFIG_ALLCONFIG file is a config file which contains (usually a subset of all) preset config symbols. These variable settings are still subject to normal dependency checks. so don't get cute.

Examples:

KCONFIG_ALLCONFIG=custom-notebook.config make allnoconfig or
KCONFIG_ALLCONFIG=mini.config make allnoconfig or
make KCONFIG_ALLCONFIG=mini.config allnoconfig

These examples will disable most options (allnoconfig) but enable or disable the options that are explicitly listed in the specified mini-config files. it's giving controlled chaos πŸ“

πŸ’œ Environment variables for randconfig

  • KCONFIG_SEED β€” you can set this to the integer value used to seed the RNG, if you want to somehow debug the behaviour of the kconfig parser/frontends. If not set, the current time will be used.
  • KCONFIG_PROBABILITY β€” this variable can be used to skew the probabilities. See /usr/share/doc/kconfig-frontends/kconfig.txt.gz. (yes, that exact path, go read it bestie πŸ“–)

πŸŽ€ Environment variables for silentoldconfig

  • KCONFIG_NOSILENTUPDATE β€” if this variable has a non-blank value, it prevents silent kernel config updates (requires explicit updates). so no sneaky updates, only intentional ones.
  • KCONFIG_AUTOCONFIG β€” this environment variable can be set to specify the path name of the "auto.conf" file. Its default value is "include/config/auto.conf".
  • KCONFIG_TRISTATE β€” this environment variable can be set to specify the path name of the "tristate.conf" file. Its default value is "include/config/tristate.conf".
  • KCONFIG_AUTOHEADER β€” this environment variable can be set to specify the path name of the "autoconf.h" (header) file. Its default value is "include/generated/autoconf.h".

πŸ“œ HISTORY πŸ“œ

June 2017, Man page originally compiled by Philippe Thierry (phil at reseau-libre dot com). iconic behavior, thank you Philippe 🫢


a tiny reminder before you go: these environment variables are exactly the ones listed above, with exactly those defaults, so don't go inventing new ones and blaming me, okay? 😭

and that's the whole page, bestie. this kconfig-diff man page was written by Philippe Thierry, it's the kconfig-diff Man Page, and it's dated October 2017 β€” go forth and diff your configs, you absolute main character πŸ‘‘πŸ’–