Skip to content

Commit

Permalink
board: cavs15: Add a option to control signing ways
Browse files Browse the repository at this point in the history
Zephyr testcases(not SOF case) not use kernel DSP driver to load image
on ADSP board, thus do not need signing with xman. So add a input
'--no-manifest' to specify signing without xman in image. If use DSP
driver load image, we should not specify this.

Signed-off-by: Jian Kang <[email protected]>
Signed-off-by: Anas Nashif <[email protected]>
  • Loading branch information
KangJianX authored and nashif committed Feb 11, 2021
1 parent fb24ded commit 8c9b06a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion boards/xtensa/intel_adsp_cavs15/tools/flash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if [ -z "$2" ]
elif [ -n "$3" ] && [ -n "$4" ]
then
echo "Signing with key " $key
west sign -d ${BUILD} -t rimage -p $4 -D $3 -- -k $2
west sign -d ${BUILD} -t rimage -p $4 -D $3 -- -k $2 --no-manifest
fi
echo ${FLASHER} -f ${FIRMWARE}
${FLASHER} -f ${FIRMWARE} || /bin/true 2>&1
10 changes: 9 additions & 1 deletion scripts/west_commands/sign.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,11 @@ def sign(self, command, build_dir, bcfg, formats):
conf_path_cmd = ['-c', conf_path]
else:
log.die('Configuration not found')
if '--no-manifest' in args.tool_args:
no_manifest = True
args.tool_args.remove('--no-manifest')
else:
no_manifest = False

sign_base = ([tool_path] + args.tool_args +
['-o', out_bin] + conf_path_cmd + ['-i', '3', '-e'] +
Expand All @@ -462,7 +467,10 @@ def sign(self, command, build_dir, bcfg, formats):
log.inf(quote_sh_list(sign_base))
subprocess.check_call(sign_base)

filenames = [out_xman, out_bin]
if no_manifest:
filenames = [out_bin]
else:
filenames = [out_xman, out_bin]
with open(out_tmp, 'wb') as outfile:
for fname in filenames:
with open(fname, 'rb') as infile:
Expand Down

0 comments on commit 8c9b06a

Please sign in to comment.