[PATCH 3/3] binman: etype: collection: Set build_done on the referenced entries

yan wang yan.wang at softathome.com
Wed Apr 1 17:35:25 CEST 2026


The collection etype uses phandles in the 'content' property to
reference other entries. Resolve each phandle to its Entry and mark
it with build_done to avoid rebuilding the same entry data multiple
times.

This is important for certain cases where rebuilding may change
the data content, e.g. due to timestamp or random IVs.

Signed-off-by: yan wang <yan.wang at softathome.com>
---
 tools/binman/etype/collection.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tools/binman/etype/collection.py b/tools/binman/etype/collection.py
index c532aafe3e7..20e2640026f 100644
--- a/tools/binman/etype/collection.py
+++ b/tools/binman/etype/collection.py
@@ -51,6 +51,14 @@ class Entry_collection(Entry):
                 self.Info('Contents not available yet')
                 # Data not available yet
                 return None
+
+            # Mark referenced entries as build_done to avoid rebuilding
+            node = self.section._node.GetFdt().LookupPhandle(entry_phandle)
+            if node:
+                entry = self.section.FindEntryByNode(node)
+                if entry:
+                    entry.build_done = True
+
             data += entry_data
 
         self.Info('Returning contents size %x' % len(data))
-- 
2.25.1



More information about the U-Boot mailing list