Loading scripts/imgtool.py −1 Changes for scripts/imgtool.py: 0 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -29,7 +29,6 @@ def do_getpub(args): key.emit_c() def do_sign(args): align = args.align if args.rsa_pkcs1_15: keys.sign_rsa_pss = False img = image.Image.load(args.infile, version=args.version, Loading scripts/imgtool/image.py +5 −6 Changes for scripts/imgtool/image.py: 5 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -27,12 +27,11 @@ TLV_VALUES = { TLV_HEADER_SIZE = 4 # Sizes of the image trailer, depending on image alignment. # Sizes of the image trailer, depending on flash write size. trailer_sizes = { 1: 402, 2: 788, 4: 1560, 8: 3104, } write_size: 128 * 3 * write_size + 8 * 2 + 16 for write_size in [1, 2, 4, 8] } boot_magic = bytes([ 0x77, 0xc2, 0x95, 0xf3, Loading Loading @@ -167,6 +166,6 @@ class Image(): len(self.payload), tsize, size) raise Exception(msg) pbytes = b'\xff' * padding pbytes += boot_magic pbytes += b'\xff' * (tsize - len(boot_magic)) pbytes += boot_magic self.payload += pbytes Loading
scripts/imgtool.py −1 Changes for scripts/imgtool.py: 0 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -29,7 +29,6 @@ def do_getpub(args): key.emit_c() def do_sign(args): align = args.align if args.rsa_pkcs1_15: keys.sign_rsa_pss = False img = image.Image.load(args.infile, version=args.version, Loading
scripts/imgtool/image.py +5 −6 Changes for scripts/imgtool/image.py: 5 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -27,12 +27,11 @@ TLV_VALUES = { TLV_HEADER_SIZE = 4 # Sizes of the image trailer, depending on image alignment. # Sizes of the image trailer, depending on flash write size. trailer_sizes = { 1: 402, 2: 788, 4: 1560, 8: 3104, } write_size: 128 * 3 * write_size + 8 * 2 + 16 for write_size in [1, 2, 4, 8] } boot_magic = bytes([ 0x77, 0xc2, 0x95, 0xf3, Loading Loading @@ -167,6 +166,6 @@ class Image(): len(self.payload), tsize, size) raise Exception(msg) pbytes = b'\xff' * padding pbytes += boot_magic pbytes += b'\xff' * (tsize - len(boot_magic)) pbytes += boot_magic self.payload += pbytes