Explorar el Código

partition_table: gen_esp32part.py --secure applies to app partitions

...only. Previously this check was done for both app and data
partitions. While checking that data partition size is aligned is
a _good thing_, the check would only occur when secure boot was on.
Ivan Grokhotkov hace 4 años
padre
commit
54595887f6
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      components/partition_table/gen_esp32part.py

+ 1 - 1
components/partition_table/gen_esp32part.py

@@ -391,7 +391,7 @@ class PartitionDefinition(object):
         align = self.ALIGNMENT.get(self.type, 4)
         align = self.ALIGNMENT.get(self.type, 4)
         if self.offset % align:
         if self.offset % align:
             raise ValidationError(self, 'Offset 0x%x is not aligned to 0x%x' % (self.offset, align))
             raise ValidationError(self, 'Offset 0x%x is not aligned to 0x%x' % (self.offset, align))
-        if self.size % align and secure:
+        if self.size % align and secure and self.type == APP_TYPE:
             raise ValidationError(self, 'Size 0x%x is not aligned to 0x%x' % (self.size, align))
             raise ValidationError(self, 'Size 0x%x is not aligned to 0x%x' % (self.size, align))
         if self.size is None:
         if self.size is None:
             raise ValidationError(self, 'Size field is not set')
             raise ValidationError(self, 'Size field is not set')