summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool/menuconfig.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/devtool/menuconfig.py')
-rw-r--r--scripts/lib/devtool/menuconfig.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/scripts/lib/devtool/menuconfig.py b/scripts/lib/devtool/menuconfig.py
index 95384c5333..1054960551 100644
--- a/scripts/lib/devtool/menuconfig.py
+++ b/scripts/lib/devtool/menuconfig.py
@@ -3,6 +3,8 @@
3# Copyright (C) 2018 Xilinx 3# Copyright (C) 2018 Xilinx
4# Written by: Chandana Kalluri <ckalluri@xilinx.com> 4# Written by: Chandana Kalluri <ckalluri@xilinx.com>
5# 5#
6# SPDX-License-Identifier: MIT
7#
6# This program is free software; you can redistribute it and/or modify 8# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License version 2 as 9# it under the terms of the GNU General Public License version 2 as
8# published by the Free Software Foundation. 10# published by the Free Software Foundation.
@@ -21,9 +23,6 @@
21import os 23import os
22import bb 24import bb
23import logging 25import logging
24import argparse
25import re
26import glob
27from devtool import setup_tinfoil, parse_recipe, DevtoolError, standard, exec_build_env_command 26from devtool import setup_tinfoil, parse_recipe, DevtoolError, standard, exec_build_env_command
28from devtool import check_workspace_recipe 27from devtool import check_workspace_recipe
29logger = logging.getLogger('devtool') 28logger = logging.getLogger('devtool')
@@ -32,7 +31,6 @@ def menuconfig(args, config, basepath, workspace):
32 """Entry point for the devtool 'menuconfig' subcommand""" 31 """Entry point for the devtool 'menuconfig' subcommand"""
33 32
34 rd = "" 33 rd = ""
35 kconfigpath = ""
36 pn_src = "" 34 pn_src = ""
37 localfilesdir = "" 35 localfilesdir = ""
38 workspace_dir = "" 36 workspace_dir = ""
@@ -43,13 +41,12 @@ def menuconfig(args, config, basepath, workspace):
43 return 1 41 return 1
44 42
45 check_workspace_recipe(workspace, args.component) 43 check_workspace_recipe(workspace, args.component)
46 pn = rd.getVar('PN', True) 44 pn = rd.getVar('PN')
47 45
48 if not rd.getVarFlag('do_menuconfig','task'): 46 if not rd.getVarFlag('do_menuconfig','task'):
49 raise DevtoolError("This recipe does not support menuconfig option") 47 raise DevtoolError("This recipe does not support menuconfig option")
50 48
51 workspace_dir = os.path.join(config.workspace_path,'sources') 49 workspace_dir = os.path.join(config.workspace_path,'sources')
52 kconfigpath = rd.getVar('B')
53 pn_src = os.path.join(workspace_dir,pn) 50 pn_src = os.path.join(workspace_dir,pn)
54 51
55 # add check to see if oe_local_files exists or not 52 # add check to see if oe_local_files exists or not
@@ -68,7 +65,7 @@ def menuconfig(args, config, basepath, workspace):
68 logger.info('Launching menuconfig') 65 logger.info('Launching menuconfig')
69 exec_build_env_command(config.init_path, basepath, 'bitbake -c menuconfig %s' % pn, watch=True) 66 exec_build_env_command(config.init_path, basepath, 'bitbake -c menuconfig %s' % pn, watch=True)
70 fragment = os.path.join(localfilesdir, 'devtool-fragment.cfg') 67 fragment = os.path.join(localfilesdir, 'devtool-fragment.cfg')
71 res = standard._create_kconfig_diff(pn_src,rd,fragment) 68 standard._create_kconfig_diff(pn_src,rd,fragment)
72 69
73 return 0 70 return 0
74 71