From 75fc3dfc82f6e3b141b05cd2099a90f32f2d0752 Mon Sep 17 00:00:00 2001 From: Laukik Hase Date: Wed, 1 Jul 2026 12:42:33 +0530 Subject: [PATCH] fix(partition_table): Exclude TEE partitions from the REE app size check - Remove the invalid check that compared the TEE app partition size against the user application (REE) binary size --- components/partition_table/check_sizes.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/partition_table/check_sizes.py b/components/partition_table/check_sizes.py index 489de810070..ca06c7c2461 100755 --- a/components/partition_table/check_sizes.py +++ b/components/partition_table/check_sizes.py @@ -23,6 +23,9 @@ import gen_esp32part import rich_click as click from esp_pylib.cli_types import AnyIntType from esp_pylib.logger import log +from gen_esp32part import APP_TYPE +from gen_esp32part import MIN_PARTITION_SUBTYPE_APP_TEE +from gen_esp32part import NUM_PARTITION_SUBTYPE_APP_TEE from gen_esp32part import PartitionTable from gen_esp32part import get_ptype_as_int from gen_esp32part import get_subtype_as_int @@ -66,11 +69,14 @@ def check_partition(ptype, subtype, partition_table_file, bin_file): # type: (s ptype_str = str(ptype) ptype = get_ptype_as_int(ptype) partitions = [p for p in table if p.type == ptype] + tee_subtypes = range(MIN_PARTITION_SUBTYPE_APP_TEE, MIN_PARTITION_SUBTYPE_APP_TEE + NUM_PARTITION_SUBTYPE_APP_TEE) if subtype is not None: ptype_str += f' ({subtype})' subtype = get_subtype_as_int(ptype, subtype) partitions = [p for p in partitions if p.subtype == subtype] + elif ptype == APP_TYPE: + partitions = [p for p in partitions if p.subtype not in tee_subtypes] if len(partitions) == 0: log.warn(f'Partition table does not contain any partitions matching {ptype_str}')