From 8c9b06ad823279e80f3259accd3164545a828242 Mon Sep 17 00:00:00 2001 From: Jian Kang Date: Wed, 3 Feb 2021 17:05:24 +0800 Subject: [PATCH] board: cavs15: Add a option to control signing ways 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 Signed-off-by: Anas Nashif --- boards/xtensa/intel_adsp_cavs15/tools/flash.sh | 2 +- scripts/west_commands/sign.py | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/boards/xtensa/intel_adsp_cavs15/tools/flash.sh b/boards/xtensa/intel_adsp_cavs15/tools/flash.sh index 0eda1dc9d143..3b3d5a295f00 100755 --- a/boards/xtensa/intel_adsp_cavs15/tools/flash.sh +++ b/boards/xtensa/intel_adsp_cavs15/tools/flash.sh @@ -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 diff --git a/scripts/west_commands/sign.py b/scripts/west_commands/sign.py index 4b947e3179b1..8a0fd7de01d5 100644 --- a/scripts/west_commands/sign.py +++ b/scripts/west_commands/sign.py @@ -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'] + @@ -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: