From patchwork Mon Aug 8 03:57:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1664417 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=xM5+pZpa; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ventanamicro.com header.i=@ventanamicro.com header.a=rsa-sha256 header.s=google header.b=b0z94Bk/; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4M1Msb5p8Gz9s2R for ; Mon, 8 Aug 2022 13:59:47 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LThEoi+PI6OQPhbK+/THM2yM1W1MZBzUs3VRCkBopqk=; b=xM5+pZpaTOnjMo yrjua1rb/o3ZZjmNjOlGU0hb0xRMgj+thEHOHXl9QTdimzALg3yYq3VnwcTmjIlnITCOrP7myytBO ONfzMU+3ZZyHmNGOt1uFCvcuzjqCEpW2rtZ6433UvUnp3Fvy93oNYJ04fuyASLN41djB7kMHo37Ua c52vOvC+1FHZUCoOLsl4n+yH+aecAHu8tkPae3Ytr/upWYFIt1Mkfs+r5im4OrgWQLKtE3Aik3X14 Ghv8+ZTDohwd6X/ukIVwbrjYl2G55UkjWwvM9h5NACLoDv4157GgbKiIJYRPr3bjjGUohgSOgJNtY ihMlAuQLhEp+ApCMa2FQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oKtvC-008xnL-K1; Mon, 08 Aug 2022 03:59:18 +0000 Received: from mail-oa1-x30.google.com ([2001:4860:4864:20::30]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oKttz-008ve2-Sj for opensbi@lists.infradead.org; Mon, 08 Aug 2022 03:58:10 +0000 Received: by mail-oa1-x30.google.com with SMTP id 586e51a60fabf-10ea30a098bso9283956fac.8 for ; Sun, 07 Aug 2022 20:58:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=rhiqYwmLL22hI0x7eFwS1SgXwTmHXNRNKy4Z1bJNSGM=; b=b0z94Bk/SqkrEzAwV49KKbh7EOFTNomaEcVVNc/gax/Bh667QM/ttLtJWB0sY8A7A4 aN2V7vDE+8Mya8+4WlE//SWunaQWLWIw8ReZehgnfsZAi+X7iSqpydxcwVfRbpcYG5vb +yzJVwMhYMf0I3GI1geoQLWBajsCcB78NW94OQwJ+grJdmbHlMBUIhK4TJYtI0bQLJPT 6QoxhA7alfq7rAhHiAW2pTbEHuj/yOqENL98D7WDkzE4NsGepQ7G/D/AHUpy0ZQugCI+ sj8dottSfA885I77c5OmjY+n3gWsItKIpx+Y1DkTzATColtJo58tX5GCei1UW79XTPTb 9yKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=rhiqYwmLL22hI0x7eFwS1SgXwTmHXNRNKy4Z1bJNSGM=; b=wxcgt3NMZSNVCCjnWvZckyGy7daTQXXgy+27FIbxU1EHOfJA2Gn5dubOaoy+4R14Qc 8wkghpMzP5EFsx/6hZ/xuxVJBe0RlyIQrdpTArjtPDWLgqTq2kaESsTPZtkIssMQO+yC 3IP/qmijXpoxoEuifoPwrlFIeQocFrLOgZ+UI5nCoo6yLEOXnz4NjxvmnrmoWFxq42tg c4jx/5+lUM+DXpAuUgoO9NXrWNXmbNx1gdRUOhLyBgrjQLbsQQljV/jBGCny9W7dfonv U2nwDxTrbXO3mnP/8BjpJC85qogEYSVRMt1nAJvtEIsDeB8IyLEfGzHxcBNZC0oOG5Qp PuvA== X-Gm-Message-State: ACgBeo1j7gxsTzjeeJ368upoqnxkpodwM+9i7b9+KFXaizyYNpF4Ag8O K9coT8u9cLjpJBYONb3dWivxJA== X-Google-Smtp-Source: AA6agR4KMSxWjOnzKLOTM0aVfjvX8KN5eQFMtjYYCrysRxAJXj5WcVvld6mRXXsZy39X16Z17mA28Q== X-Received: by 2002:a05:6870:6493:b0:10e:8b4f:d3e6 with SMTP id cz19-20020a056870649300b0010e8b4fd3e6mr7835177oab.145.1659931081771; Sun, 07 Aug 2022 20:58:01 -0700 (PDT) Received: from anup-ubuntu64-vm.. ([103.97.165.210]) by smtp.gmail.com with ESMTPSA id r2-20020a9d30c2000000b0061dc5648bf6sm2008382otg.6.2022.08.07.20.57.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Aug 2022 20:58:00 -0700 (PDT) From: Anup Patel To: Atish Patra , Alistair Francis Cc: Andrew Jones , David Abdurachmanov , Heinrich Schuchardt , Andreas Schwab , Mark Kettenis , Emmanuel Vadot , Anup Patel , opensbi@lists.infradead.org, Anup Patel , Atish Patra Subject: [PATCH v8 01/17] scripts: Add Kconfiglib v14.1.0 under scripts directory Date: Mon, 8 Aug 2022 09:27:24 +0530 Message-Id: <20220808035740.69335-2-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220808035740.69335-1-apatel@ventanamicro.com> References: <20220808035740.69335-1-apatel@ventanamicro.com> MIME-Version: 1.0 X-Spam-Note: CRM114 run bypassed due to message size (405050 bytes) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: We adopt Kconfiglib v14.1.0 sources under scripts directory so that top-level OpenSBI makefile can directly use Kconfiglib scripts without expecting users to install a particular version of Kconfiglib [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2001:4860:4864:20:0:0:0:30 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-Mailman-Approved-At: Sun, 07 Aug 2022 20:59:16 -0700 X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org We adopt Kconfiglib v14.1.0 sources under scripts directory so that top-level OpenSBI makefile can directly use Kconfiglib scripts without expecting users to install a particular version of Kconfiglib on their build system. Signed-off-by: Anup Patel Tested-by: Andrew Jones Acked-by: Atish Patra Tested-by: Atish Patra --- scripts/Kconfiglib/LICENSE.txt | 5 + scripts/Kconfiglib/allnoconfig.py | 45 + scripts/Kconfiglib/allyesconfig.py | 56 + scripts/Kconfiglib/defconfig.py | 43 + scripts/Kconfiglib/genconfig.py | 154 + scripts/Kconfiglib/kconfiglib.py | 7160 +++++++++++++++++++++++++++ scripts/Kconfiglib/menuconfig.py | 3278 ++++++++++++ scripts/Kconfiglib/oldconfig.py | 246 + scripts/Kconfiglib/olddefconfig.py | 28 + scripts/Kconfiglib/savedefconfig.py | 49 + scripts/Kconfiglib/setconfig.py | 92 + 11 files changed, 11156 insertions(+) create mode 100644 scripts/Kconfiglib/LICENSE.txt create mode 100755 scripts/Kconfiglib/allnoconfig.py create mode 100755 scripts/Kconfiglib/allyesconfig.py create mode 100755 scripts/Kconfiglib/defconfig.py create mode 100755 scripts/Kconfiglib/genconfig.py create mode 100644 scripts/Kconfiglib/kconfiglib.py create mode 100755 scripts/Kconfiglib/menuconfig.py create mode 100755 scripts/Kconfiglib/oldconfig.py create mode 100755 scripts/Kconfiglib/olddefconfig.py create mode 100755 scripts/Kconfiglib/savedefconfig.py create mode 100755 scripts/Kconfiglib/setconfig.py diff --git a/scripts/Kconfiglib/LICENSE.txt b/scripts/Kconfiglib/LICENSE.txt new file mode 100644 index 0000000..8b31efc --- /dev/null +++ b/scripts/Kconfiglib/LICENSE.txt @@ -0,0 +1,5 @@ +Copyright (c) 2011-2019, Ulf Magnusson + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/scripts/Kconfiglib/allnoconfig.py b/scripts/Kconfiglib/allnoconfig.py new file mode 100755 index 0000000..de90d8b --- /dev/null +++ b/scripts/Kconfiglib/allnoconfig.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 + +# Copyright (c) 2018-2019, Ulf Magnusson +# SPDX-License-Identifier: ISC + +""" +Writes a configuration file where as many symbols as possible are set to 'n'. + +The default output filename is '.config'. A different filename can be passed +in the KCONFIG_CONFIG environment variable. + +Usage for the Linux kernel: + + $ make [ARCH=] scriptconfig SCRIPT=Kconfiglib/allnoconfig.py +""" + +# See examples/allnoconfig_walk.py for another way to implement this script + +import kconfiglib + + +def main(): + kconf = kconfiglib.standard_kconfig(__doc__) + + # Avoid warnings that would otherwise get printed by Kconfiglib for the + # following: + # + # 1. Assigning a value to a symbol without a prompt, which never has any + # effect + # + # 2. Assigning values invalid for the type (only bool/tristate symbols + # accept 0/1/2, for n/m/y). The assignments will be ignored for other + # symbol types, which is what we want. + kconf.warn = False + for sym in kconf.unique_defined_syms: + sym.set_value(2 if sym.is_allnoconfig_y else 0) + kconf.warn = True + + kconf.load_allconfig("allno.config") + + print(kconf.write_config()) + + +if __name__ == "__main__": + main() diff --git a/scripts/Kconfiglib/allyesconfig.py b/scripts/Kconfiglib/allyesconfig.py new file mode 100755 index 0000000..90eb9b8 --- /dev/null +++ b/scripts/Kconfiglib/allyesconfig.py @@ -0,0 +1,56 @@ +#!/usr/bin/env python3 + +# Copyright (c) 2018-2019, Ulf Magnusson +# SPDX-License-Identifier: ISC + +""" +Writes a configuration file where as many symbols as possible are set to 'y'. + +The default output filename is '.config'. A different filename can be passed +in the KCONFIG_CONFIG environment variable. + +Usage for the Linux kernel: + + $ make [ARCH=] scriptconfig SCRIPT=Kconfiglib/allyesconfig.py +""" +import kconfiglib + + +def main(): + kconf = kconfiglib.standard_kconfig(__doc__) + + # See allnoconfig.py + kconf.warn = False + + # Try to set all symbols to 'y'. Dependencies might truncate the value down + # later, but this will at least give the highest possible value. + # + # Assigning 0/1/2 to non-bool/tristate symbols has no effect (int/hex + # symbols still take a string, because they preserve formatting). + for sym in kconf.unique_defined_syms: + # Set choice symbols to 'm'. This value will be ignored for choices in + # 'y' mode (the "normal" mode), which will instead just get their + # default selection, but will set all symbols in m-mode choices to 'm', + # which is as high as they can go. + # + # Here's a convoluted example of how you might get an m-mode choice + # even during allyesconfig: + # + # choice + # tristate "weird choice" + # depends on m + sym.set_value(1 if sym.choice else 2) + + # Set all choices to the highest possible mode + for choice in kconf.unique_choices: + choice.set_value(2) + + kconf.warn = True + + kconf.load_allconfig("allyes.config") + + print(kconf.write_config()) + + +if __name__ == "__main__": + main() diff --git a/scripts/Kconfiglib/defconfig.py b/scripts/Kconfiglib/defconfig.py new file mode 100755 index 0000000..b179273 --- /dev/null +++ b/scripts/Kconfiglib/defconfig.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python3 + +# Copyright (c) 2019, Ulf Magnusson +# SPDX-License-Identifier: ISC + +""" +Reads a specified configuration file, then writes a new configuration file. +This can be used to initialize the configuration from e.g. an arch-specific +configuration file. This input configuration file would usually be a minimal +configuration file, as generated by e.g. savedefconfig. + +The default output filename is '.config'. A different filename can be passed in +the KCONFIG_CONFIG environment variable. +""" +import argparse + +import kconfiglib + + +def main(): + parser = argparse.ArgumentParser( + formatter_class=argparse.RawDescriptionHelpFormatter, + description=__doc__) + + parser.add_argument( + "--kconfig", + default="Kconfig", + help="Top-level Kconfig file (default: Kconfig)") + + parser.add_argument( + "config", + metavar="CONFIGURATION", + help="Input configuration file") + + args = parser.parse_args() + + kconf = kconfiglib.Kconfig(args.kconfig, suppress_traceback=True) + print(kconf.load_config(args.config)) + print(kconf.write_config()) + + +if __name__ == "__main__": + main() diff --git a/scripts/Kconfiglib/genconfig.py b/scripts/Kconfiglib/genconfig.py new file mode 100755 index 0000000..62f065b --- /dev/null +++ b/scripts/Kconfiglib/genconfig.py @@ -0,0 +1,154 @@ +#!/usr/bin/env python3 + +# Copyright (c) 2018-2019, Ulf Magnusson +# SPDX-License-Identifier: ISC + +""" +Generates a header file with #defines from the configuration, matching the +format of include/generated/autoconf.h in the Linux kernel. + +Optionally, also writes the configuration output as a .config file. See +--config-out. + +The --sync-deps, --file-list, and --env-list options generate information that +can be used to avoid needless rebuilds/reconfigurations. + +Before writing a header or configuration file, Kconfiglib compares the old +contents of the file against the new contents. If there's no change, the write +is skipped. This avoids updating file metadata like the modification time, and +might save work depending on your build setup. + +By default, the configuration is generated from '.config'. A different +configuration file can be passed in the KCONFIG_CONFIG environment variable. + +A custom header string can be inserted at the beginning of generated +configuration and header files by setting the KCONFIG_CONFIG_HEADER and +KCONFIG_AUTOHEADER_HEADER environment variables, respectively (this also works +for other scripts). The string is not automatically made a comment (this is by +design, to allow anything to be added), and no trailing newline is added, so +add '/* */', '#', and newlines as appropriate. + +See https://www.gnu.org/software/make/manual/make.html#Multi_002dLine for a +handy way to define multi-line variables in makefiles, for use with custom +headers. Remember to export the variable to the environment. +""" +import argparse +import os +import sys + +import kconfiglib + + +DEFAULT_SYNC_DEPS_PATH = "deps/" + + +def main(): + parser = argparse.ArgumentParser( + formatter_class=argparse.RawDescriptionHelpFormatter, + description=__doc__) + + parser.add_argument( + "--header-path", + metavar="HEADER_FILE", + help=""" +Path to write the generated header file to. If not specified, the path in the +environment variable KCONFIG_AUTOHEADER is used if it is set, and 'config.h' +otherwise. +""") + + parser.add_argument( + "--config-out", + metavar="CONFIG_FILE", + help=""" +Write the configuration to CONFIG_FILE. This is useful if you include .config +files in Makefiles, as the generated configuration file will be a full .config +file even if .config is outdated. The generated configuration matches what +olddefconfig would produce. If you use sync-deps, you can include +deps/auto.conf instead. --config-out is meant for cases where incremental build +information isn't needed. +""") + + parser.add_argument( + "--sync-deps", + metavar="OUTPUT_DIR", + nargs="?", + const=DEFAULT_SYNC_DEPS_PATH, + help=""" +Enable generation of symbol dependency information for incremental builds, +optionally specifying the output directory (default: {}). See the docstring of +Kconfig.sync_deps() in Kconfiglib for more information. +""".format(DEFAULT_SYNC_DEPS_PATH)) + + parser.add_argument( + "--file-list", + metavar="OUTPUT_FILE", + help=""" +Write a list of all Kconfig files to OUTPUT_FILE, with one file per line. The +paths are relative to $srctree (or to the current directory if $srctree is +unset). Files appear in the order they're 'source'd. +""") + + parser.add_argument( + "--env-list", + metavar="OUTPUT_FILE", + help=""" +Write a list of all environment variables referenced in Kconfig files to +OUTPUT_FILE, with one variable per line. Each line has the format NAME=VALUE. +Only environment variables referenced with the preprocessor $(VAR) syntax are +included, and not variables referenced with the older $VAR syntax (which is +only supported for backwards compatibility). +""") + + parser.add_argument( + "kconfig", + metavar="KCONFIG", + nargs="?", + default="Kconfig", + help="Top-level Kconfig file (default: Kconfig)") + + args = parser.parse_args() + + + kconf = kconfiglib.Kconfig(args.kconfig, suppress_traceback=True) + kconf.load_config() + + if args.header_path is None: + if "KCONFIG_AUTOHEADER" in os.environ: + kconf.write_autoconf() + else: + # Kconfiglib defaults to include/generated/autoconf.h to be + # compatible with the C tools. 'config.h' is used here instead for + # backwards compatibility. It's probably a saner default for tools + # as well. + kconf.write_autoconf("config.h") + else: + kconf.write_autoconf(args.header_path) + + if args.config_out is not None: + kconf.write_config(args.config_out, save_old=False) + + if args.sync_deps is not None: + kconf.sync_deps(args.sync_deps) + + if args.file_list is not None: + with _open_write(args.file_list) as f: + for path in kconf.kconfig_filenames: + f.write(path + "\n") + + if args.env_list is not None: + with _open_write(args.env_list) as f: + for env_var in kconf.env_vars: + f.write("{}={}\n".format(env_var, os.environ[env_var])) + + +def _open_write(path): + # Python 2/3 compatibility. io.open() is available on both, but makes + # write() expect 'unicode' strings on Python 2. + + if sys.version_info[0] < 3: + return open(path, "w") + return open(path, "w", encoding="utf-8") + + +if __name__ == "__main__": + main() diff --git a/scripts/Kconfiglib/kconfiglib.py b/scripts/Kconfiglib/kconfiglib.py new file mode 100644 index 0000000..c67895c --- /dev/null +++ b/scripts/Kconfiglib/kconfiglib.py @@ -0,0 +1,7160 @@ +# Copyright (c) 2011-2019, Ulf Magnusson +# SPDX-License-Identifier: ISC + +""" +Overview +======== + +Kconfiglib is a Python 2/3 library for scripting and extracting information +from Kconfig (https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt) +configuration systems. + +See the homepage at https://github.com/ulfalizer/Kconfiglib for a longer +overview. + +Since Kconfiglib 12.0.0, the library version is available in +kconfiglib.VERSION, which is a (, , ) tuple, e.g. +(12, 0, 0). + + +Using Kconfiglib on the Linux kernel with the Makefile targets +============================================================== + +For the Linux kernel, a handy interface is provided by the +scripts/kconfig/Makefile patch, which can be applied with either 'git am' or +the 'patch' utility: + + $ wget -qO- https://raw.githubusercontent.com/ulfalizer/Kconfiglib/master/makefile.patch | git am + $ wget -qO- https://raw.githubusercontent.com/ulfalizer/Kconfiglib/master/makefile.patch | patch -p1 + +Warning: Not passing -p1 to patch will cause the wrong file to be patched. + +Please tell me if the patch does not apply. It should be trivial to apply +manually, as it's just a block of text that needs to be inserted near the other +*conf: targets in scripts/kconfig/Makefile. + +Look further down for a motivation for the Makefile patch and for instructions +on how you can use Kconfiglib without it. + +If you do not wish to install Kconfiglib via pip, the Makefile patch is set up +so that you can also just clone Kconfiglib into the kernel root: + + $ git clone git://github.com/ulfalizer/Kconfiglib.git + $ git am Kconfiglib/makefile.patch (or 'patch -p1 < Kconfiglib/makefile.patch') + +Warning: The directory name Kconfiglib/ is significant in this case, because +it's added to PYTHONPATH by the new targets in makefile.patch. + +The targets added by the Makefile patch are described in the following +sections. + + +make kmenuconfig +---------------- + +This target runs the curses menuconfig interface with Python 3. As of +Kconfiglib 12.2.0, both Python 2 and Python 3 are supported (previously, only +Python 3 was supported, so this was a backport). + + +make guiconfig +-------------- + +This target runs the Tkinter menuconfig interface. Both Python 2 and Python 3 +are supported. To change the Python interpreter used, pass +PYTHONCMD= to 'make'. The default is 'python'. + + +make [ARCH=] iscriptconfig +-------------------------------- + +This target gives an interactive Python prompt where a Kconfig instance has +been preloaded and is available in 'kconf'. To change the Python interpreter +used, pass PYTHONCMD= to 'make'. The default is 'python'. + +To get a feel for the API, try evaluating and printing the symbols in +kconf.defined_syms, and explore the MenuNode menu tree starting at +kconf.top_node by following 'next' and 'list' pointers. + +The item contained in a menu node is found in MenuNode.item (note that this can +be one of the constants kconfiglib.MENU and kconfiglib.COMMENT), and all +symbols and choices have a 'nodes' attribute containing their menu nodes +(usually only one). Printing a menu node will print its item, in Kconfig +format. + +If you want to look up a symbol by name, use the kconf.syms dictionary. + + +make scriptconfig SCRIPT=