[U-Boot] [PATCH 22/31] binman: Allow zero-size sections

Simon Glass sjg at chromium.org
Fri Sep 14 10:57:27 UTC 2018


At present if there is only a zero-size entry in a section this is
reported as an error, e.g.:

   Offset 0x0 (0) is outside the section starting at 0x0 (0)

Adjust the logic in CheckEntries() to avoid this.

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

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

diff --git a/tools/binman/bsection.py b/tools/binman/bsection.py
index 44adb82795b..1c37d84e99a 100644
--- a/tools/binman/bsection.py
+++ b/tools/binman/bsection.py
@@ -258,7 +258,7 @@ class Section(object):
         for entry in self._entries.values():
             entry.CheckOffset()
             if (entry.offset < self._skip_at_start or
-                entry.offset >= self._skip_at_start + self._size):
+                entry.offset + entry.size > self._skip_at_start + self._size):
                 entry.Raise("Offset %#x (%d) is outside the section starting "
                             "at %#x (%d)" %
                             (entry.offset, entry.offset, self._skip_at_start,
-- 
2.19.0.397.gdd90340f6a-goog



More information about the U-Boot mailing list