[ICXD] Move Tcc binaries to Utilities (#1726)
Update Script files to move tcc binaries. Signed-off-by: cshur <cs.hur@intel.com> Signed-off-by: cshur <cs.hur@intel.com>
This commit is contained in:
parent
e81a4872a9
commit
0372e199d2
|
@ -1,7 +1,7 @@
|
|||
## @ StitchIfwi.py
|
||||
# This is a python stitching script for Slim Bootloader IDV build
|
||||
#
|
||||
# Copyright (c) 2020 - 2021, Intel Corporation. All rights reserved. <BR>
|
||||
# Copyright (c) 2020 - 2022, Intel Corporation. All rights reserved. <BR>
|
||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
#
|
||||
##
|
||||
|
@ -239,7 +239,7 @@ def replace_component (ifwi_src_path, flash_path, file_path, comp_alg, pri_key):
|
|||
pri_key = os.path.join (work_dir, pri_key)
|
||||
cmd_line = [sys.executable, gen_container, 'replace', '-i', container_file, '-o', container_file, '-n', comp_name,
|
||||
'-f', comp_file, '-c', comp_alg, '-k', pri_key, '-td', tool_bin_dir]
|
||||
run_process_wrapper (cmd_line, True)
|
||||
run_process_wrapper (cmd_line)
|
||||
comp_bin = bytearray (get_file_data (container_file))
|
||||
else:
|
||||
# replace directly in flash map
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
## @ StitchIfwi.py
|
||||
# This is a python stitching script for Slim Bootloader IDV build
|
||||
#
|
||||
# Copyright (c) 2020 - 2021, Intel Corporation. All rights reserved. <BR>
|
||||
# Copyright (c) 2020 - 2022, Intel Corporation. All rights reserved. <BR>
|
||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
#
|
||||
##
|
||||
|
@ -158,6 +158,7 @@ def main():
|
|||
ap.add_argument('-b', dest='btg_profile', default = 'legacy', choices=['legacy', 'vm', 'fve', 'fvme'], help='specify Boot Guard profile type')
|
||||
ap.add_argument('-r', dest='remove', action = "store_true", default = False, help = "delete temporary files after stitch")
|
||||
ap.add_argument('-t', dest='tpm', default = 'dtpm', choices=['ptt', 'dtpm', 'none'], help='specify TPM type')
|
||||
ap.add_argument('-k', dest='key_dir', type=str, required=False, help='specify the path to Sbl Keys directory')
|
||||
ap.add_argument('-d', dest='plat_data', type=hexstr, default=None, help='Specify a platform specific data (HEX, DWORD) for customization')
|
||||
ap.add_argument('-o', dest='option', default = '', help = "Platform specific stitch option. Format: '-o option1;option2;...' For each option its format is 'parameter:data'. Try -o help for more information")
|
||||
ap.add_argument('-i', dest='igfw', default = '', help = "Stitch IGN FW flag. Give '-i igfw' if stitching Ignition Firmware")
|
||||
|
@ -184,6 +185,11 @@ def main():
|
|||
curr_dir = os.getcwd()
|
||||
sbl_file = os.path.abspath(os.path.join (curr_dir, args.sbl_file))
|
||||
|
||||
if args.key_dir:
|
||||
os.environ['SBL_KEY_DIR'] = os.path.abspath(args.key_dir)
|
||||
else:
|
||||
raise Exception ('SBL Keys dir is not set. Use -k to set directory!')
|
||||
|
||||
work_dir = os.path.abspath (args.work_dir)
|
||||
os.chdir(work_dir)
|
||||
if stitch (work_dir, stitch_cfg_file, sbl_file, args.btg_profile, args.platform, args.tpm, args.plat_data, plt_params_list, args.igfw):
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
##
|
||||
|
||||
from abc import abstractmethod
|
||||
from StitchLoader import *
|
||||
|
||||
class StitchIfwiConfigBase:
|
||||
extra_usage_txt = \
|
||||
|
@ -59,7 +60,22 @@ class StitchIfwiConfigBase:
|
|||
# Path file name compress Key
|
||||
('IFWI/BIOS/TS0/ACM0', 'Input/acm0.bin', 'dummy', ''),
|
||||
('IFWI/BIOS/TS1/ACM0', 'Input/acm0.bin', 'dummy', ''),
|
||||
]
|
||||
]
|
||||
if os.path.exists('IPFW/TccCacheCfg.bin'):
|
||||
print ("TccCacheCfg.bin found")
|
||||
replace_list.append (
|
||||
('IFWI/BIOS/NRD/IPFW/TCCC', 'IPFW/TccCacheCfg.bin', 'lz4', 'KEY_ID_CONTAINER_COMP_RSA3072'), # TCC Cache Cfg binary
|
||||
)
|
||||
if os.path.exists('IPFW/TccCrlBinary.bin'):
|
||||
print ("TccCrlBinary.bin found")
|
||||
replace_list.append (
|
||||
('IFWI/BIOS/NRD/IPFW/TCCM', 'IPFW/TccCrlBinary.bin', 'lz4', 'KEY_ID_CONTAINER_COMP_RSA3072'), # TCC Crl Cfg binary
|
||||
)
|
||||
if os.path.exists('IPFW/TccStreamCfg.bin'):
|
||||
print ("TccStreamCfg found")
|
||||
replace_list.append (
|
||||
('IFWI/BIOS/NRD/IPFW/TCCT', 'IPFW/TccStreamCfg.bin', 'lz4', 'KEY_ID_CONTAINER_COMP_RSA3072'), # TCC Stream Cfg binary
|
||||
)
|
||||
return replace_list
|
||||
|
||||
def get_btGuard_xml_change_dict (self):
|
||||
|
|
Loading…
Reference in New Issue