Lines Matching refs:footer
1781 magic: Magic for identifying the footer, see |MAGIC|.
1782 version_major: The major version of avbtool that wrote the footer.
1783 version_minor: The minor version of avbtool that wrote the footer.
1801 """Initializes a new footer object.
1807 LookupError: If the given footer is malformed.
1808 struct.error: If the given data has no footer.
1817 raise LookupError('Given data does not look like a AVB footer.')
1827 """Gets a string representing the binary encoding of the footer.
1830 A bytearray() with a binary representation of the footer.
1986 image_filename: File to extract vbmeta data from (with a footer).
1990 AvbError: If there's no footer in the image.
1994 (footer, _, _, _) = self._parse_image(image)
1996 if not footer:
1997 raise AvbError('Given image does not have a footer.')
1999 image.seek(footer.vbmeta_offset)
2000 vbmeta_blob = image.read(footer.vbmeta_size)
2012 image_filename: File to erase a footer from.
2016 AvbError: If there's no footer in the image.
2021 (footer, _, descriptors, _) = self._parse_image(image)
2023 if not footer:
2024 raise AvbError('Given image does not have a footer.')
2028 new_image_size = footer.original_image_size
2054 image_filename: File with footer to resize.
2058 AvbError: If there's no footer in the image.
2068 (footer, vbmeta_header, descriptors, _) = self._parse_image(image)
2070 if not footer:
2071 raise AvbError('Given image does not have a footer.')
2074 # image amounts to just moving the footer around.
2076 vbmeta_end_offset = footer.vbmeta_offset + footer.vbmeta_size
2093 # Just reuse the same footer - only difference is that we're
2095 footer_blob = footer.encode()
2146 (footer, header, descriptors, image_size) = self._parse_image(image)
2148 if footer:
2149 o.write('Footer version: {}.{}\n'.format(footer.version_major,
2150 footer.version_minor))
2153 footer.original_image_size))
2154 o.write('VBMeta offset: {}\n'.format(footer.vbmeta_offset))
2155 o.write('VBMeta size: {} bytes\n'.format(footer.vbmeta_size))
2217 (footer, header, descriptors, image_size) = self._parse_image(image)
2219 if footer:
2220 offset = footer.vbmeta_offset
2240 if footer:
2241 print ('vbmeta: Successfully verified footer and {} vbmeta struct in {}'
2283 (footer, header, descriptors, image_size) = self._parse_image(image)
2285 if footer:
2286 offset = footer.vbmeta_offset
2357 The image can either be a vbmeta or an image with a footer.
2360 image: An ImageHandler (vbmeta or footer) with a hashtree descriptor.
2364 is no footer on the image), the second argument is a
2370 footer = None
2373 footer = AvbFooter(image.read(AvbFooter.SIZE))
2379 if footer:
2380 vbmeta_offset = footer.vbmeta_offset
2391 return footer, h, descriptors, image.image_size
2396 The image can either be a vbmeta.img or an image with a footer.
2399 image: An ImageHandler (vbmeta or footer).
2405 footer = None
2408 footer = AvbFooter(image.read(AvbFooter.SIZE))
2414 if footer:
2415 vbmeta_offset = footer.vbmeta_offset
2488 image: An ImageHandler (vbmeta or footer) with a hashtree descriptor.
2851 image_filename: File to add the footer to.
2865 # If there's already a footer, truncate the image to its original
2870 footer = AvbFooter(image.read(AvbFooter.SIZE))
2871 # Existing footer found. Just truncate.
2872 original_image_size = footer.original_image_size
2873 image.truncate(footer.original_image_size)
2877 # Image size is too small to possibly contain a footer.
2896 # footer.
2902 # Append vbmeta blob and footer
2911 # Generate the Footer that tells where the VBMeta footer
2912 # is. Also put enough padding in the front of the footer since
2914 footer = AvbFooter()
2915 footer.original_image_size = original_image_size
2916 footer.vbmeta_offset = vbmeta_offset
2917 footer.vbmeta_size = len(vbmeta_blob)
2918 footer_blob = footer.encode()
2943 image_filename: File to add the footer to.
2961 calc_max_image_size: Don't store the footer - instead calculate the
2988 # this size + metadata (footer + vbmeta struct) fits in
3009 # If there's already a footer, truncate the image to its original
3015 footer = AvbFooter(image.read(AvbFooter.SIZE))
3016 # Existing footer found. Just truncate.
3017 original_image_size = footer.original_image_size
3018 image.truncate(footer.original_image_size)
3022 # Image size is too small to possibly contain a footer.
3066 # Generate the VBMeta footer.
3080 # Append vbmeta blob and footer, unless requested not to.
3093 # footer.
3108 # Generate the Footer that tells where the VBMeta footer
3109 # is. Also put enough padding in the front of the footer since
3111 footer = AvbFooter()
3112 footer.original_image_size = original_image_size
3113 footer.vbmeta_offset = vbmeta_offset
3114 footer.vbmeta_size = len(vbmeta_blob)
3115 footer_blob = footer.encode()
3146 image_filename: File to add the footer to.
3169 calc_max_image_size: Don't store the hashtree or footer - instead
3199 # size such that an image this size + the hashtree + metadata (footer +
3233 # If there's already a footer, truncate the image to its original
3239 footer = AvbFooter(image.read(AvbFooter.SIZE))
3240 # Existing footer found. Just truncate.
3241 original_image_size = footer.original_image_size
3242 image.truncate(footer.original_image_size)
3246 # Image size is too small to possibly contain a footer.
3339 # Generate the VBMeta footer and add padding as needed.
3356 # Append vbmeta blob and footer, unless requested not to.
3366 # Generate the Footer that tells where the VBMeta footer
3367 # is. Also put enough padding in the front of the footer since
3369 footer = AvbFooter()
3370 footer.original_image_size = original_image_size
3371 footer.vbmeta_offset = vbmeta_offset
3372 footer.vbmeta_size = len(vbmeta_blob)
3373 footer_blob = footer.encode()
3650 raise ValueError('Unexpected magic in FEC footer')
3786 help=('Don\'t store the footer - '
3874 help='Add hashes and footer to image.')
3890 help=('Don\'t store the footer - '
3899 help=('Do not append vbmeta struct or footer '
3921 help='Add hashtree and footer to image.')
3957 help=('Don\'t store the hashtree or footer - '
3967 help=('Do not append vbmeta struct or footer '
3981 help='Erase footer from an image.')
3983 help='Image with a footer',
3992 help='Extracts vbmeta from an image with a footer.')
3994 help='Image with footer',
4009 help='Resize image with a footer.')
4011 help='Image with a footer',
4021 help='Show information about vbmeta or footer.')