Skip to content

Commit 739aa95

Browse files
marc-hbcarlescufi
authored andcommitted
scripts: intel_adsp: don't invoke west sign with --tool-path None
When there is no rimage found in the path, don't invoke west sign with "-tool-path None". This enhances the error message from the somewhat cryptic: ERROR: --tool-path None: not an executable ... to the user friendlier: FATAL ERROR: rimage not found; either install it or provide --tool-path Also log the complete west sign command at the "info" level before running it to show that no signed firmware was found, to show which rimage is used and in case other rimage problems arise. Invoking an external command is an important "checkpoint". Signed-off-by: Marc Herbert <[email protected]>
1 parent bea139f commit 739aa95

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

scripts/west_commands/runners/intel_adsp.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,12 @@ def do_run(self, command, **kwargs):
9898
sys.exit(1)
9999

100100
def sign(self, **kwargs):
101-
sign_cmd = ['west', 'sign', '-d', f'{self.cfg.build_dir}', '-t', 'rimage', '-p', f'{self.rimage_tool}',
102-
'-D', f'{self.config_dir}', '--', '-k', f'{self.key}']
103-
101+
path_opt = ['-p', f'{self.rimage_tool}'] if self.rimage_tool else []
102+
sign_cmd = (
103+
['west', 'sign', '-d', f'{self.cfg.build_dir}', '-t', 'rimage']
104+
+ path_opt + ['-D', f'{self.config_dir}', '--', '-k', f'{self.key}']
105+
)
106+
self.logger.info(" ".join(sign_cmd))
104107
self.check_call(sign_cmd)
105108

106109
def flash(self, **kwargs):

0 commit comments

Comments
 (0)