]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
binman: fit: Avoid assuming that a FIT member is a section
authorSimon Glass <sjg@chromium.org>
Mon, 26 Aug 2024 19:11:35 +0000 (13:11 -0600)
committerSimon Glass <sjg@chromium.org>
Thu, 26 Sep 2024 10:40:30 +0000 (12:40 +0200)
Use the more generic variable name 'entry' to avoid confusion.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/binman/etype/fit.py

index 51c82c55e4a58e0ebb67e736e5853fc82aa96718..3adc4a959e8e54fa6923fc25ad3d4bc026b693ec 100644 (file)
@@ -904,7 +904,7 @@ class Entry_fit(Entry_section):
         fdt = Fdt.FromData(self.GetData())
         fdt.Scan()
 
-        for image_name, section in self._entries.items():
+        for image_name, entry in self._entries.items():
             path = f"/images/{image_name}"
             node = fdt.GetNode(path)
 
@@ -936,8 +936,8 @@ class Entry_fit(Entry_section):
                 size = None
                 self.Raise(f'{path}: missing data properties')
 
-            section.SetOffsetSize(offset, size)
-            section.SetImagePos(self.image_pos)
+            entry.SetOffsetSize(offset, size)
+            entry.SetImagePos(image_pos + self.offset)
 
     def AddBintools(self, btools):
         super().AddBintools(btools)