From 57beed1d30723d51f8299f898daeb4b42f849856 Mon Sep 17 00:00:00 2001 From: Sai Hari Chandana Kalluri Date: Wed, 10 Jul 2019 11:27:34 -0700 Subject: devtool: provide support for devtool menuconfig command All packages that support the menuconfig task will be able to run devtool menuconfig command. This would allow the user to modify the current configure options and create a config fragment which can be added to a recipe using devtool finish. 1. The patch checks if devtool menuconfig command is called for a valid package. 2. It checks for oe-local-files dir within source and creates one if needed, this directory is needed to store the final generated config fragment so that devtool finish can update the recipe. 3. Menuconfig command is called for users to make necessary changes. After saving the changes, diffconfig command is run to generate the fragment. Syntax: devtool menuconfig Ex: devtool menuconfig linux-yocto The config fragment is saved as devtool-fragment.cfg within oe-local-files dir. Ex: /sources/linux-yocto/oe-local-files/devtool-fragment.cfg Run devtool finish to update the recipe by appending the config fragment to SRC_URI and place a copy of the fragment within the layer where the recipe resides. Ex: devtool finish linux-yocto meta [YOCTO #10416] (From OE-Core rev: 417feb559a74b367315e8658d6ba868a4f8d1340) Signed-off-by: Sai Hari Chandana Kalluri Signed-off-by: Alejandro Enedino Hernandez Samaniego Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- scripts/lib/devtool/standard.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts/lib/devtool/standard.py') diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index 6661a21983..96af488798 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py @@ -938,6 +938,11 @@ def modify(args, config, basepath, workspace): ' cp ${B}/.config ${S}/.config.baseline\n' ' ln -sfT ${B}/.config ${S}/.config.new\n' '}\n') + if rd.getVarFlag('do_menuconfig','task'): + f.write('\ndo_configure_append() {\n' + ' cp ${B}/.config ${S}/.config.baseline\n' + ' ln -sfT ${B}/.config ${S}/.config.new\n' + '}\n') if initial_rev: f.write('\n# initial_rev: %s\n' % initial_rev) for commit in commits: -- cgit v1.2.3-54-g00ecf