From 54595887f62780a66e6311a3ca4e054df34f6929 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Mon, 23 Aug 2021 08:04:53 +0200 Subject: [PATCH] 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. --- components/partition_table/gen_esp32part.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/partition_table/gen_esp32part.py b/components/partition_table/gen_esp32part.py index a4a21526cf..6ae3399721 100755 --- a/components/partition_table/gen_esp32part.py +++ b/components/partition_table/gen_esp32part.py @@ -391,7 +391,7 @@ class PartitionDefinition(object): align = self.ALIGNMENT.get(self.type, 4) if 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)) if self.size is None: raise ValidationError(self, 'Size field is not set')