[PATCH 2/2] binman: Correct calculation for image-pos

Simon Glass sjg at chromium.org
Mon Nov 2 20:55:44 CET 2020


A recent change removed the base offset from the calculation. This is
used on coral to find the FSP-S binary. Fix it.

Fixes: a9fad07d4b8 ("binman: Avoid reporting image-pos with compression")

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 tools/binman/entry.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/binman/entry.py b/tools/binman/entry.py
index 68e694e7d15..2be0d8e0532 100644
--- a/tools/binman/entry.py
+++ b/tools/binman/entry.py
@@ -245,7 +245,7 @@ class Entry(object):
         state.SetInt(self._node, 'size', self.size)
         base = self.section.GetRootSkipAtStart() if self.section else 0
         if self.image_pos is not None:
-            state.SetInt(self._node, 'image-pos', self.image_pos)
+            state.SetInt(self._node, 'image-pos', self.image_pos - base)
         if self.GetImage().allow_repack:
             if self.orig_offset is not None:
                 state.SetInt(self._node, 'orig-offset', self.orig_offset, True)
-- 
2.29.1.341.ge80a0c044ae-goog



More information about the U-Boot mailing list