config utility for Buildroot

config utility for Buildroot

I'm using the ./scripts/config script in the Linux kernel tree a lot. The script is used to manipulate a .config file from the command line which is quite nice to be able to do.

I use it mostly to enable configurations from a script or as a part of automated tests.

Buildroot is also using KBuild as its configuration system so I adapted this script and submitted a patch. It is now part of the mainline.

commit f2c5c7a263d9d61faba80544e0f6ac6da03716ee
Author: Marcus Folkesson <marcus.folkesson@gmail.com>
Date:   Tue Sep 26 23:15:02 2017 +0200

utils/config: new script to manipulate .config files on the command line

Default prefix is set to `BR2_` but may be overidden by setting
BR2_PREFIX.

Example usage:

Enable `BR2_PACKAGE_GNUPG`:
./utils/config --package --enable GNUPG

Check state of config option `BR2_PACKAGE_GNUPG`:
./utils/config --package --state GNUPG
y

Enable `BR2_PACKAGE_GNUPG`:
./utils/config --package --disable GNUPG

Set `BR2_TARGET_GENERIC_ISSUE` to "Welcome":
./utils/config --set-str  TARGET_GENERIC_ISSUE "Welcome"

Copied from the Linux kernel (4.13-rc6) source code and adapted to
Buildroot.
Thanks to Andi Kleen who is the original author of this script.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
[Arnout: merge the two tr invications]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

In addition to all commands found in he Linux kernel version, I also addes the --package config as a shortcut to operate on packages.