sysgen: add --kernel_type argument
Needs to sort out differences between microkernel and unified MDEF syntax. Change-Id: I8f7cb192bdd90c0f9c40593cfbd0aa86b12c7c74 Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This commit is contained in:
parent
f6684147c1
commit
20f7ae47e4
1 changed files with 7 additions and 0 deletions
|
@ -78,6 +78,7 @@ copyright = \
|
||||||
|
|
||||||
output_dir = ""
|
output_dir = ""
|
||||||
input_mdef_file = ""
|
input_mdef_file = ""
|
||||||
|
kernel_type = 'micro'
|
||||||
|
|
||||||
def get_cmdline_args():
|
def get_cmdline_args():
|
||||||
""" Handle optional output directory argument """
|
""" Handle optional output directory argument """
|
||||||
|
@ -87,6 +88,7 @@ def get_cmdline_args():
|
||||||
|
|
||||||
output_dir_help='output directory for kernel_main.*, sysgen.h, etc'
|
output_dir_help='output directory for kernel_main.*, sysgen.h, etc'
|
||||||
input_mdef_file_help='input MDEF file'
|
input_mdef_file_help='input MDEF file'
|
||||||
|
kernel_type_help="'micro' or 'unified'"
|
||||||
|
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
|
|
||||||
|
@ -94,6 +96,8 @@ def get_cmdline_args():
|
||||||
required=True, help=input_mdef_file_help)
|
required=True, help=input_mdef_file_help)
|
||||||
parser.add_argument('-o', '--output-dir', action='store',
|
parser.add_argument('-o', '--output-dir', action='store',
|
||||||
help=output_dir_help)
|
help=output_dir_help)
|
||||||
|
parser.add_argument('-k', '--kernel-type', action='store',
|
||||||
|
help=kernel_type_help)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
@ -102,6 +106,9 @@ def get_cmdline_args():
|
||||||
if (args.output_dir != None):
|
if (args.output_dir != None):
|
||||||
output_dir = args.output_dir
|
output_dir = args.output_dir
|
||||||
|
|
||||||
|
if (args.kernel_type != None):
|
||||||
|
kernel_type = args.kernel_type
|
||||||
|
|
||||||
def write_file(filename, contents):
|
def write_file(filename, contents):
|
||||||
""" Create file using specified name and contents """
|
""" Create file using specified name and contents """
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue