Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion XBLConfig/commons.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def print_error_exit(error_msg="missing"):
exit(-1)

##############################################################################
# roundup - returns offset 'x' with aligment 'precision'
# roundup - returns offset 'x' with alignment 'precision'
##############################################################################
def roundup(x, precision):
if precision == 0:
Expand Down
8 changes: 4 additions & 4 deletions dtlogger.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@

def logger_init(log_file=None, log_level=logging.DEBUG, max_file_size_mb=1):
"""
Initialize dt logger
Initialize dt logger.

Args:
log_file (str): log file pathif it is None,only print to console
log_level (int): log level(logging.INFOlogging.DEBUG)
max_file_size_mb (int): Maxmin log file size(MB)
log_file (str): log file path.if it is None,only print to console.
log_level (int): log level(logging.INFO, logging.DEBUG).
max_file_size_mb (int): Maximum log file size(MB).
"""

logger.setLevel(log_level)
Expand Down
2 changes: 1 addition & 1 deletion get_qsahara_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def get_all_sahara_files(meta_root_path, flavor=None, storage='ufs', firehose_ty
Initializes meta_info and uses get_qsahara_files to list Sahara files.

Args:
contents_xml_path (str): Path to the contents.xml file of the meta-build.
meta_root_path (str): Path to the root of the meta-build containing contents.xml.
flavor (str, optional): The flavor to filter by. Defaults to None.
storage (str, optional): The storage type to filter by. Defaults to None.
firehose_type (str, optional): The firehose type to filter by. Defaults to None.
Expand Down
14 changes: 7 additions & 7 deletions sign.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: BSD-3-Clause-Clear
"""
@file sign.py
This file contains the interface of signature. it will call sectools v2 for signing.
This file contains the interface of signature. It will call sectools v2 for signing.
"""
#from asyncio import exceptions
from dis import disassemble
Expand Down Expand Up @@ -37,16 +37,16 @@ def sign_config_image(self):
dtlogger.info('Error of reading signing mode command json file.')
dtlogger.info(e)
return False
# If signing command doesn't contain --image-id option, fetch it from origninal DTB elf. If the orginal DTB elf is unsigned DTB elf.
# If the orginal DTB elf is unsigned DTB elf, it will popout a warning windows and termined signing process.
# If signing command doesn't contain --image-id option, fetch it from original DTB elf. If the original DTB elf is unsigned DTB elf.
# If the original DTB elf is unsigned DTB elf, it will pop out a warning window and terminate the signing process.
if '--image-id' not in data.keys():
# fetch Software ID from DTB elfs by sectools inspect command
sign_id_cmd = r'%s secure-image --inspect %s' % (os.path.join(gf['sectoolsDir'],self.sectool_name), gf['inputFile'])
proc = subprocess.Popen(sign_id_cmd,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
universal_newlines=True,shell=True)
dtlogger.info ('Waiting for secure inspect commnad excute done')
dtlogger.info ('Waiting for secure inspect command execute done')
while True:
out, err= proc.communicate()
dtlogger.info (out)
Expand All @@ -63,7 +63,7 @@ def sign_config_image(self):
dtlogger.info("{} err".format(line))
return False
if proc.poll() != None:
dtlogger.info ('secure inspect commnad excute done')
dtlogger.info ('secure inspect command execute done')
break
if sign_id_num:
# fetch image ID from profile xml according software ID.
Expand All @@ -80,7 +80,7 @@ def sign_config_image(self):
if gf['sign_id']== '':
raise Exception('ERROR:Signed DTB elf failed', 'Please provide sign ID for the DTB elf\n')

# excute sign command seperately
# execute sign command separately
# Debugged so signing works
outfile = ""
dtlogger.info("{}{}".format(gf['outputPath'],gf['outputFile']))
Expand All @@ -107,7 +107,7 @@ def sign_config_image(self):
cmd.append(command)
cmd.append(data["SigningCommand"][command])

dtlogger.info('Excute Signing Command:\n{}'.format(cmd))
dtlogger.info('Execute Signing Command:\n{}'.format(cmd))


proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
Expand Down