diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-11-07 13:31:53 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-11-07 13:31:53 +0000 |
| commit | 8c22ff0d8b70d9b12f0487ef696a7e915b9e3173 (patch) | |
| tree | efdc32587159d0050a69009bdf2330a531727d95 /scripts/lib/devtool/menuconfig.py | |
| parent | d412d2747595c1cc4a5e3ca975e3adc31b2f7891 (diff) | |
| download | poky-8c22ff0d8b70d9b12f0487ef696a7e915b9e3173.tar.gz | |
The poky repository master branch is no longer being updated.
You can either:
a) switch to individual clones of bitbake, openembedded-core, meta-yocto and yocto-docs
b) use the new bitbake-setup
You can find information about either approach in our documentation:
https://docs.yoctoproject.org/
Note that "poky" the distro setting is still available in meta-yocto as
before and we continue to use and maintain that.
Long live Poky!
Some further information on the background of this change can be found
in: https://lists.openembedded.org/g/openembedded-architecture/message/2179
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool/menuconfig.py')
| -rw-r--r-- | scripts/lib/devtool/menuconfig.py | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/scripts/lib/devtool/menuconfig.py b/scripts/lib/devtool/menuconfig.py deleted file mode 100644 index 1054960551..0000000000 --- a/scripts/lib/devtool/menuconfig.py +++ /dev/null | |||
| @@ -1,76 +0,0 @@ | |||
| 1 | # OpenEmbedded Development tool - menuconfig command plugin | ||
| 2 | # | ||
| 3 | # Copyright (C) 2018 Xilinx | ||
| 4 | # Written by: Chandana Kalluri <ckalluri@xilinx.com> | ||
| 5 | # | ||
| 6 | # SPDX-License-Identifier: MIT | ||
| 7 | # | ||
| 8 | # This program is free software; you can redistribute it and/or modify | ||
| 9 | # it under the terms of the GNU General Public License version 2 as | ||
| 10 | # published by the Free Software Foundation. | ||
| 11 | # | ||
| 12 | # This program is distributed in the hope that it will be useful, | ||
| 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | # GNU General Public License for more details. | ||
| 16 | # | ||
| 17 | # You should have received a copy of the GNU General Public License along | ||
| 18 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
| 19 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 20 | |||
| 21 | """Devtool menuconfig plugin""" | ||
| 22 | |||
| 23 | import os | ||
| 24 | import bb | ||
| 25 | import logging | ||
| 26 | from devtool import setup_tinfoil, parse_recipe, DevtoolError, standard, exec_build_env_command | ||
| 27 | from devtool import check_workspace_recipe | ||
| 28 | logger = logging.getLogger('devtool') | ||
| 29 | |||
| 30 | def menuconfig(args, config, basepath, workspace): | ||
| 31 | """Entry point for the devtool 'menuconfig' subcommand""" | ||
| 32 | |||
| 33 | rd = "" | ||
| 34 | pn_src = "" | ||
| 35 | localfilesdir = "" | ||
| 36 | workspace_dir = "" | ||
| 37 | tinfoil = setup_tinfoil(basepath=basepath) | ||
| 38 | try: | ||
| 39 | rd = parse_recipe(config, tinfoil, args.component, appends=True, filter_workspace=False) | ||
| 40 | if not rd: | ||
| 41 | return 1 | ||
| 42 | |||
| 43 | check_workspace_recipe(workspace, args.component) | ||
| 44 | pn = rd.getVar('PN') | ||
| 45 | |||
| 46 | if not rd.getVarFlag('do_menuconfig','task'): | ||
| 47 | raise DevtoolError("This recipe does not support menuconfig option") | ||
| 48 | |||
| 49 | workspace_dir = os.path.join(config.workspace_path,'sources') | ||
| 50 | pn_src = os.path.join(workspace_dir,pn) | ||
| 51 | |||
| 52 | # add check to see if oe_local_files exists or not | ||
| 53 | localfilesdir = os.path.join(pn_src,'oe-local-files') | ||
| 54 | if not os.path.exists(localfilesdir): | ||
| 55 | bb.utils.mkdirhier(localfilesdir) | ||
| 56 | # Add gitignore to ensure source tree is clean | ||
| 57 | gitignorefile = os.path.join(localfilesdir,'.gitignore') | ||
| 58 | with open(gitignorefile, 'w') as f: | ||
| 59 | f.write('# Ignore local files, by default. Remove this file if you want to commit the directory to Git\n') | ||
| 60 | f.write('*\n') | ||
| 61 | |||
| 62 | finally: | ||
| 63 | tinfoil.shutdown() | ||
| 64 | |||
| 65 | logger.info('Launching menuconfig') | ||
| 66 | exec_build_env_command(config.init_path, basepath, 'bitbake -c menuconfig %s' % pn, watch=True) | ||
| 67 | fragment = os.path.join(localfilesdir, 'devtool-fragment.cfg') | ||
| 68 | standard._create_kconfig_diff(pn_src,rd,fragment) | ||
| 69 | |||
| 70 | return 0 | ||
| 71 | |||
| 72 | def register_commands(subparsers, context): | ||
| 73 | """register devtool subcommands from this plugin""" | ||
| 74 | parser_menuconfig = subparsers.add_parser('menuconfig',help='Alter build-time configuration for a recipe', description='Launches the make menuconfig command (for recipes where do_menuconfig is available), allowing users to make changes to the build-time configuration. Creates a config fragment corresponding to changes made.', group='advanced') | ||
| 75 | parser_menuconfig.add_argument('component', help='compenent to alter config') | ||
| 76 | parser_menuconfig.set_defaults(func=menuconfig,fixed_setup=context.fixed_setup) | ||
