Skip to content

Commit 602e675

Browse files
iuliana-prodannashif
authored andcommitted
west: sign: add support for NXP i.MX8MP
Add support for signing i.MX8MP SOF with Zephyr images with rimage. Signed-off-by: Iuliana Prodan <[email protected]>
1 parent 8bbb11d commit 602e675

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

scripts/west_commands/sign.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -400,10 +400,12 @@ def edt_get_rimage_target(board):
400400
return 'icl'
401401
if 'intel_adsp_cavs25' in board:
402402
return 'tgl'
403-
if 'nxp_adsp_imx8' in board:
404-
return 'imx8'
403+
if 'nxp_adsp_imx8m' in board:
404+
return 'imx8m'
405405
if 'nxp_adsp_imx8x' in board:
406406
return 'imx8'
407+
if 'nxp_adsp_imx8' in board:
408+
return 'imx8'
407409

408410
log.die('Signing not supported for board ' + board)
409411

@@ -433,7 +435,7 @@ def sign(self, command, build_dir, build_conf, formats):
433435
if not args.quiet:
434436
log.inf('Signing with tool {}'.format(tool_path))
435437

436-
if 'imx8' in target:
438+
if target in ('imx8', 'imx8m'):
437439
kernel = str(b / 'zephyr' / 'zephyr.elf')
438440
out_bin = str(b / 'zephyr' / 'zephyr.ri')
439441
out_xman = str(b / 'zephyr' / 'zephyr.ri.xman')
@@ -466,14 +468,11 @@ def sign(self, command, build_dir, build_conf, formats):
466468
else:
467469
extra_ri_args = ['-i', '3', '-e']
468470

469-
if 'imx8' in target:
470-
sign_base = ([tool_path] + args.tool_args +
471-
['-o', out_bin] + conf_path_cmd + extra_ri_args +
472-
[kernel])
473-
else:
474-
sign_base = ([tool_path] + args.tool_args +
475-
['-o', out_bin] + conf_path_cmd + extra_ri_args +
476-
[bootloader, kernel])
471+
components = [ ] if (target in ('imx8', 'imx8m')) else [ bootloader ]
472+
components += [ kernel ]
473+
sign_base = ([tool_path] + args.tool_args +
474+
['-o', out_bin] + conf_path_cmd + extra_ri_args +
475+
components)
477476

478477
if not args.quiet:
479478
log.inf(quote_sh_list(sign_base))

0 commit comments

Comments
 (0)