<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hey Scott,</p>
<div class="moz-cite-prefix">On 12/5/2018 8:38 AM, Scott Rifenbark
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAFNP8Ous2ZkGuxWQ=z3FyCOG39AGX4KGZF7FzUcztyKoCaNCoA@mail.gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr">
<div>Hi, <br>
</div>
<div><br>
</div>
<div>This probably has documentation ramifications yes? See <a
href="https://yoctoproject.org/docs/2.6/mega-manual/mega-manual.html#ref-devtool-reference"
moz-do-not-send="true">https://yoctoproject.org/docs/2.6/mega-manual/mega-manual.html#ref-devtool-reference</a>.</div>
</div>
</div>
</blockquote>
<p><br>
</p>
<p>Yup, this should be documented, we can provide you a draft for
you to review, expect it within the next few days.</p>
<p><br>
</p>
<p>Cheers,<br>
</p>
<p>Alejandro<br>
</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:CAFNP8Ous2ZkGuxWQ=z3FyCOG39AGX4KGZF7FzUcztyKoCaNCoA@mail.gmail.com">
<div dir="ltr">
<div dir="ltr">
<div><br>
</div>
<div>Thanks, <br>
</div>
<div>Scott<br>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Wed, Dec 5, 2018 at 8:27 AM Sai Hari Chandana
Kalluri <<a href="mailto:chandana.kalluri@xilinx.com"
moz-do-not-send="true">chandana.kalluri@xilinx.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">All packages
that support the menuconfig task will be able to run devtool<br>
menuconfig command. This would allow the user to modify the
current<br>
configure options and create a config fragment which can be
added to a<br>
recipe using devtool finish.<br>
<br>
1. The patch checks if devtool menuconfig command is called
for a valid<br>
package.<br>
2. It checks for oe-local-files dir within source and creates
one<br>
if needed, this directory is needed to store the final
generated config<br>
fragment so that devtool finish can update the recipe.<br>
3. Menuconfig command is called for users to make necessary
changes. After<br>
saving the changes, diffconfig command is run to generate the
fragment.<br>
<br>
Syntax:<br>
devtool menuconfig <package name><br>
Ex: devtool menuconfig linux-yocto<br>
<br>
The config fragment is saved as devtool-fragment.cfg within<br>
oe-local-files dir.<br>
<br>
Ex:
<workspace_path>/sources/linux-yocto/oe-local-files/devtool-fragment.cfg<br>
<br>
Run devtool finish to update the recipe by appending the
config fragment<br>
to SRC_URI and place a copy of the fragment within the layer
where the<br>
recipe resides.<br>
Ex: devtool finish linux-yocto meta<br>
<br>
[YOCTO #10416]<br>
<br>
Signed-off-by: Sai Hari Chandana Kalluri <<a
href="mailto:chandana.kalluri@xilinx.com" target="_blank"
moz-do-not-send="true">chandana.kalluri@xilinx.com</a>><br>
Signed-off-by: Alejandro Enedino Hernandez Samaniego <<a
href="mailto:alejandr@xilinx.com" target="_blank"
moz-do-not-send="true">alejandr@xilinx.com</a>><br>
---<br>
scripts/lib/devtool/menuconfig.py | 80
+++++++++++++++++++++++++++++++++++++++<br>
1 file changed, 80 insertions(+)<br>
create mode 100644 scripts/lib/devtool/menuconfig.py<br>
<br>
diff --git a/scripts/lib/devtool/menuconfig.py
b/scripts/lib/devtool/menuconfig.py<br>
new file mode 100644<br>
index 0000000..38133db<br>
--- /dev/null<br>
+++ b/scripts/lib/devtool/menuconfig.py<br>
@@ -0,0 +1,80 @@<br>
+# OpenEmbedded Development tool - menuconfig command plugin<br>
+#<br>
+# Copyright (C) 2018 Xilinx<br>
+# Written by: Chandana Kalluri <<a
href="mailto:ckalluri@xilinx.com" target="_blank"
moz-do-not-send="true">ckalluri@xilinx.com</a>><br>
+#<br>
+# This program is free software; you can redistribute it
and/or modify<br>
+# it under the terms of the GNU General Public License
version 2 as<br>
+# published by the Free Software Foundation.<br>
+#<br>
+# This program is distributed in the hope that it will be
useful,<br>
+# but WITHOUT ANY WARRANTY; without even the implied warranty
of<br>
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
the<br>
+# GNU General Public License for more details.<br>
+#<br>
+# You should have received a copy of the GNU General Public
License along<br>
+# with this program; if not, write to the Free Software
Foundation, Inc.,<br>
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.<br>
+<br>
+"""Devtool menuconfig plugin"""<br>
+<br>
+import os<br>
+import bb<br>
+import logging<br>
+import argparse<br>
+import re<br>
+import glob<br>
+from devtool import setup_tinfoil, parse_recipe,
DevtoolError, standard, exec_build_env_command<br>
+<br>
+logger = logging.getLogger('devtool')<br>
+<br>
+def menuconfig(args, config, basepath, workspace):<br>
+ """Entry point for the devtool 'menuconfig' subcommand"""<br>
+<br>
+ rd = "" <br>
+ kconfigpath = ""<br>
+ pn_src = ""<br>
+ localfilesdir = ""<br>
+ workspace_dir = ""<br>
+ tinfoil = setup_tinfoil(basepath=basepath)<br>
+ try:<br>
+ rd = parse_recipe(config, tinfoil, args.component,
appends=True, filter_workspace=False)<br>
+ if not rd:<br>
+ return 1<br>
+<br>
+ pn = rd.getVar('PN', True)<br>
+ if pn not in workspace:<br>
+ raise DevtoolError("Run devtool modify before
calling menuconfig for %s" %pn)<br>
+<br>
+ if not rd.getVarFlag('do_menuconfig','task'):<br>
+ raise DevtoolError("This package does not support
menuconfig option")<br>
+<br>
+ workspace_dir =
os.path.join(basepath,'workspace/sources')<br>
+ kconfigpath = rd.getVar('B')<br>
+ pn_src = os.path.join(workspace_dir,pn)<br>
+<br>
+ #add check to see if oe_local_files exists or not<br>
+ localfilesdir = os.path.join(pn_src,'oe-local-files') <br>
+ if not os.path.exists(localfilesdir):<br>
+ bb.utils.mkdirhier(localfilesdir)<br>
+ #Add gitignore to ensure source tree is clean<br>
+ gitignorefile =
os.path.join(localfilesdir,'.gitignore')<br>
+ with open(gitignorefile, 'w') as f:<br>
+ f.write('# Ignore local files, by default.
Remove this file if you want to commit the directory to
Git\n')<br>
+ f.write('*\n')<br>
+<br>
+ finally:<br>
+ tinfoil.shutdown()<br>
+<br>
+ <a href="http://logger.info" rel="noreferrer"
target="_blank" moz-do-not-send="true">logger.info</a>('Launching
menuconfig')<br>
+ exec_build_env_command(config.init_path, basepath,
'bitbake -c menuconfig %s' % pn, watch=True) <br>
+ fragment = os.path.join(localfilesdir,
'devtool-fragment.cfg')<br>
+ res = standard._create_kconfig_diff(pn_src,rd,fragment)<br>
+<br>
+ return 0<br>
+<br>
+def register_commands(subparsers, context):<br>
+ """register devtool subcommands from this plugin"""<br>
+ parser_menuconfig =
subparsers.add_parser('menuconfig',help='allows altering the
system component configuration', description='launches the
make menuconfig command, allows user to make changes to
configuration. creates a config fragment', group='advanced') <br>
+ parser_menuconfig.add_argument('component',
help='compenent to alter config')<br>
+
parser_menuconfig.set_defaults(func=menuconfig,fixed_setup=context.fixed_setup)<br>
-- <br>
2.7.4<br>
<br>
-- <br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org"
target="_blank" moz-do-not-send="true">Openembedded-core@lists.openembedded.org</a><br>
<a
href="http://lists.openembedded.org/mailman/listinfo/openembedded-core"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
</blockquote>
</body>
</html>