west: sign.py: de-duplicate the bootloader condition
De-duplicate the `if target in ('imx8', 'imx8m'):` copy/paste/diverge
before someone updates one and not the other. Also better to define
bootloader always.
Zero functional change.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
diff --git a/scripts/west_commands/sign.py b/scripts/west_commands/sign.py
index e57b880..a61f78a 100644
--- a/scripts/west_commands/sign.py
+++ b/scripts/west_commands/sign.py
@@ -430,7 +430,9 @@
if not target:
log.die('rimage target not defined')
+ # TODO: make this a new sign.py --bootloader option.
if target in ('imx8', 'imx8m'):
+ bootloader = None
kernel = str(b / 'zephyr' / 'zephyr.elf')
out_bin = str(b / 'zephyr' / 'zephyr.ri')
out_xman = str(b / 'zephyr' / 'zephyr.ri.xman')
@@ -516,7 +518,7 @@
if not args.quiet and args.verbose:
sign_base += ['-v'] * args.verbose
- components = [ ] if (target in ('imx8', 'imx8m')) else [ bootloader ]
+ components = [ ] if bootloader is None else [ bootloader ]
components += [ kernel ]
sign_config_extra_args = config_get_words(command.config, 'rimage.extra-args', [])