Skip to content

Commit

Permalink
Fixed default and made max-align consistent with other options.
Browse files Browse the repository at this point in the history
Adding required sign-off.

Signed-off-by: Kristine Jassmann <[email protected]>
  • Loading branch information
kjassmann-renesas committed Feb 24, 2021
1 parent d0378c8 commit dea04b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion scripts/imgtool/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def __init__(self, version=None, header_size=IMAGE_HEADER_SIZE,
self.enckey = None
self.save_enctlv = save_enctlv
self.enctlv_len = 0
self.max_align = int(max_align)
self.max_align = DEFAULT_MAX_ALIGN if max_align is None else int(max_align)

if security_counter == 'auto':
# Security counter has not been explicitly provided,
Expand Down
6 changes: 3 additions & 3 deletions scripts/imgtool/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,16 +285,16 @@ def convert(self, value, param, ctx):
@click.option('--align', type=click.Choice(['1', '2', '4', '8', '16', '32',
'64', '128', '256', '512', '1024', '2048', '4096']),
required=True)
@click.option('--max-align', type=click.Choice(['1', '2', '4', '8', '16', '32',
'64', '128', '256', '512', '1024', '2048', '4096']),
required=False)
@click.option('--public-key-format', type=click.Choice(['hash', 'full']),
default='hash', help='In what format to add the public key to '
'the image manifest: full key or hash of the key.')
@click.option('-k', '--key', metavar='filename')
@click.command(help='''Create a signed or unsigned image\n
INFILE and OUTFILE are parsed as Intel HEX if the params have
.hex extension, otherwise binary format is used''')
@click.option('--max_align', type=click.Choice(['1', '2', '4', '8', '16', '32',
'64', '128', '256', '512', '1024', '2048', '4096']),
default=8)
def sign(key, public_key_format, align, version, pad_sig, header_size,
pad_header, slot_size, pad, confirm, max_sectors, overwrite_only,
endian, encrypt, infile, outfile, dependencies, load_addr, hex_addr,
Expand Down

0 comments on commit dea04b6

Please sign in to comment.