]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
binman: Allow zero-size sections
authorSimon Glass <sjg@chromium.org>
Fri, 14 Sep 2018 10:57:27 +0000 (04:57 -0600)
committerSimon Glass <sjg@chromium.org>
Sat, 29 Sep 2018 17:49:35 +0000 (11:49 -0600)
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@chromium.org>
tools/binman/bsection.py

index 44adb82795bbe015d53558ec5399bb6d85b00e59..1c37d84e99a55bbbd0fd0801c9d0b363d5376949 100644 (file)
@@ -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,