Lines Matching +full:- +full:- +full:quiet

3 # SPDX-License-Identifier: Apache-2.0
28 sys.path.insert(0, str(ZEPHYR_SCRIPTS / 'dts' / 'python-devicetree' / 'src'))
32 binaries for chain-loading by a bootloader.
36 west sign -t your_tool -- ARGS_FOR_YOUR_TOOL
40 which sort of ARGS_FOR_YOUR_TOOLS you use, the `--` separator/sentinel may
42 understand POSIX 12.2 Guideline 10, always use `--`.
44 See tool-specific help below for details.'''
48 -------
53 west sign -t imgtool -- --key YOUR_SIGNING_KEY.pem
56 or you must pass the path to imgtool.py using the -p option.
64 As shown above, extra arguments after a '--' are passed to imgtool
68 ------
73 west sign -t rimage -- -k YOUR_SIGNING_KEY.pem
76 the path to rimage using the -p option.
87 setattr(args, self.dest, not option.startswith('--no-'))
94 # Keep this in sync with the string in west-commands.yml.
95 'sign a Zephyr binary for bootloader chain-loading',
107 parser.add_argument('-d', '--build-dir',
109 parser.add_argument('-q', '--quiet', action='store_true',
110 help='suppress non-error output')
115 group.add_argument('-t', '--tool', choices=['imgtool', 'rimage'],
118 group.add_argument('-p', '--tool-path', default=None,
120 group.add_argument('-D', '--tool-data', default=None,
121 … help='''path to a tool-specific data/configuration directory, if needed''')
122 group.add_argument('--if-tool-available', action='store_true',
130 group.add_argument('--bin', '--no-bin', dest='gen_bin', nargs=0,
135 group.add_argument('-B', '--sbin', metavar='BIN',
142 group.add_argument('--hex', '--no-hex', dest='gen_hex', nargs=0,
147 group.add_argument('-H', '--shex', metavar='HEX',
174 '--bin given but CONFIG_BUILD_OUTPUT_BIN not set '
184 '--hex given but CONFIG_BUILD_OUTPUT_HEX not set '
194 self.die('imgtool does not support --if-tool-available')
201 self.die('one --tool is required')
242 flash = self.edt_flash_node(command, b, args.quiet)
266 if not args.quiet:
274 '--version', str(appver),
275 '--align', str(align),
276 '--header-size', str(vtoff),
277 '--slot-size', str(size)]
280 if not args.quiet:
285 if not args.quiet:
289 subprocess.check_call(sign_bin, stdout=subprocess.PIPE if args.quiet else None)
293 if not args.quiet:
297 subprocess.check_call(sign_hex, stdout=subprocess.PIPE if args.quiet else None)
304 cmd.die(f'--tool-path {imgtool}: no such file')
309 '(e.g. "pip3 install imgtool") or provide --tool-path')
317 # https://github.com/zephyrproject-rtos/zephyr/issues/31876
332 def edt_flash_node(cmd, b, quiet=False): argument
339 if not quiet:
363 # when available, because in swap-move mode it can be one sector
386 if "write-block-size" not in flash.props:
387 cmd.die('DT zephyr,flash node has no write-block-size;',
389 align = flash.props['write-block-size'].val
392 'DT flash device write-block-size {}'.format(align))
425 'Runs the C pre-processor on config_dir/toml_basename.h'
428 preproc_cmd = [compiler_path, '-E', str(config_dir / (toml_basename + '.h'))]
429 # -P removes line markers to keep the .toml output reproducible. To
430 # trace #includes, temporarily comment out '-P' (-f*-prefix-map
432 # gcc-specific)
433 preproc_cmd += ['-P']
442 preproc_cmd += ['-DREM=']
444 preproc_cmd += ['-I', str(self.sof_src_dir / 'src')]
445 preproc_cmd += ['-imacros',
449 …full_preproc_cmd = preproc_cmd + ['-o', str(subdir / 'rimage_config_full.toml'), '-DLLEXT_FORCE_AL…
450 preproc_cmd += ['-o', str(subdir / 'rimage_config.toml')]
499 # Clean any stale output. This is especially important when using --if-tool-available
508 err_prefix = '--tool-path' if args.tool_path else 'west config'
516 err_msg = 'rimage not found; either install it or provide --tool-path'
524 #### -c sof/rimage/config/signing_schema.toml ####
526 if not args.quiet:
540 # FIXME: deprecate --no-manifest and replace it with a much
541 # simpler and more direct `-- -e` which the user can _already_
543 if '--no-manifest' in args.tool_args:
545 args.tool_args.remove('--no-manifest')
549 # Non-SOF build does not have extended manifest data for
559 extra_ri_args = ['-e']
564 # Sub-command arg 'west sign -q' takes precedence over west '-v'
565 if not args.quiet and args.verbose:
566 sign_base += ['-v'] * args.verbose
574 sign_config_extra_args = command.config_get_words('rimage.extra-args', [])
576 if '-k' not in sign_config_extra_args + args.tool_args:
579 extra_ri_args += [ '-k', str(sof_src_dir / 'keys' / cmake_default_key) ]
581 if args.tool_data and '-c' in args.tool_args:
582 command.wrn('--tool-data ' + args.tool_data + ' ignored! Overridden by: -- -c ... ')
584 if '-c' not in sign_config_extra_args + args.tool_args:
594 extra_ri_args += ['-c', str(b / generated_subdir / 'rimage_config.toml')]
597 extra_ri_args += ['-c', str(toml_dir / toml_basename)]
599 # Warning: while not officially supported (yet?), the rimage --option that is last
602 sign_base += (['-o', out_bin] + sign_config_extra_args +
612 if not args.quiet: