Home | History | Annotate | Download | only in releasetools

Lines Matching refs:image_size

42 def GetVerityFECSize(image_size):
43 cmd = ["fec", "-s", str(image_size)]
48 def GetVerityTreeSize(image_size):
49 cmd = ["build_verity_tree", "-s", str(image_size)]
54 def GetVerityMetadataSize(image_size):
55 cmd = ["build_verity_metadata.py", "size", str(image_size)]
60 def GetVeritySize(image_size, fec_supported):
61 verity_tree_size = GetVerityTreeSize(image_size)
62 verity_metadata_size = GetVerityMetadataSize(image_size)
65 fec_size = GetVerityFECSize(image_size + verity_size)
97 def BuildVerityMetadata(image_size, verity_metadata_path, root_hash, salt,
100 cmd = ["build_verity_metadata.py", "build", str(image_size),
221 def CalculateDynamicPartitionSize(self, image_size):
247 self.image_size = None
250 def CalculateDynamicPartitionSize(self, image_size):
292 self.image_size = result
296 "Calculated image size for verity: partition_size %d, image_size %d, "
310 image_size = int(self.image_size)
322 image_size, verity_metadata_path, root_hash, salt, self.block_device,
326 padding_size = self.partition_size - self.image_size - self.verity_size
346 if sparse_image_size > self.image_size:
349 "{}".format(sparse_image_size, self.image_size))
350 ZeroPadSimg(out_file, self.image_size - sparse_image_size)
370 self.image_size = None
372 def CalculateMinPartitionSize(self, image_size, size_calculator=None):
380 image_size: The size of the image in question.
391 image_ratio = size_calculator(image_size) / float(image_size)
394 lo = int(image_size / image_ratio) // BLOCK_SIZE * BLOCK_SIZE - BLOCK_SIZE
396 # Ensure lo is small enough: max_image_size should <= image_size.
399 while max_image_size > image_size:
401 lo = int(image_size / image_ratio) // BLOCK_SIZE * BLOCK_SIZE - delta
407 # Ensure hi is large enough: max_image_size should >= image_size.
410 while max_image_size < image_size:
412 hi = int(image_size / image_ratio) // BLOCK_SIZE * BLOCK_SIZE + delta
422 if max_image_size >= image_size: # if mid can accommodate image_size
430 "CalculateMinPartitionSize(%d): partition_size %d.", image_size,
435 def CalculateDynamicPartitionSize(self, image_size):
436 self.partition_size = self.CalculateMinPartitionSize(image_size)
468 image_size = int(output)
469 if image_size <= 0:
472 self.image_size = image_size
473 return image_size