mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-09 04:39:34 +00:00
acrn-config: support '--out' option for board/scenario/launch config
Currently, config tool generate board files and scenario files in acrn-hypervisor directory, the origin souce code would be corrupted by the config tool. Config tool add '--out' option for user to give a path to store the generated files, without this option, tool will generate files in origin source code. Tracked-On: #4517 Signed-off-by: Wei Liu <weix.w.liu@intel.com> Acked-by: Victor Sun <victor.sun@intel.com>
This commit is contained in:
@@ -11,7 +11,7 @@ import launch_cfg_lib
|
||||
import com
|
||||
|
||||
ACRN_PATH = launch_cfg_lib.SOURCE_ROOT_DIR
|
||||
XML_PATH = ACRN_PATH + '/misc/acrn-config/xmls/config-xmls/'
|
||||
ACRN_CONFIG_TARGET = ACRN_PATH + '/misc/acrn-config/xmls/config-xmls/'
|
||||
|
||||
|
||||
def get_launch_item_values(board_info):
|
||||
@@ -142,12 +142,15 @@ def main(args):
|
||||
This is main function to start generate launch script
|
||||
:param args: it is a command line args for the script
|
||||
"""
|
||||
|
||||
global ACRN_CONFIG_TARGET
|
||||
# get parameters
|
||||
(err_dic, board_info_file, scenario_info_file, launch_info_file, vm_th) = launch_cfg_lib.get_param(args)
|
||||
(err_dic, board_info_file, scenario_info_file, launch_info_file, vm_th, output_folder) = launch_cfg_lib.get_param(args)
|
||||
if err_dic:
|
||||
return err_dic
|
||||
|
||||
if output_folder:
|
||||
ACRN_CONFIG_TARGET = os.path.abspath(output_folder) + '/'
|
||||
|
||||
# check env
|
||||
err_dic = launch_cfg_lib.prepare()
|
||||
if err_dic:
|
||||
@@ -197,9 +200,8 @@ def main(args):
|
||||
|
||||
# create output directory
|
||||
board_name = names['board_name']
|
||||
output = XML_PATH + '/' + board_name + '/output/'
|
||||
if not os.path.exists(output):
|
||||
os.makedirs(output)
|
||||
output = ACRN_CONFIG_TARGET + '/' + board_name + '/output/'
|
||||
launch_cfg_lib.mkdir(output)
|
||||
|
||||
# generate launch script
|
||||
if vm_th:
|
||||
|
Reference in New Issue
Block a user