Browse Source

binman: Take account of skip-at-start with image-header

The image-header currently sets it offset assuming that skip-at-start is
zero. This does not work on x86 where offsets end at 4GB. Add in this
value so that the offset is correct.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass 4 years ago
parent
commit
0b7ebee38e
1 changed files with 1 additions and 0 deletions
  1. 1 0
      tools/binman/etype/image_header.py

+ 1 - 0
tools/binman/etype/image_header.py

@@ -100,6 +100,7 @@ class Entry_image_header(Entry):
                     offset = offset
                 else:
                     offset = image_size - IMAGE_HEADER_LEN
+        offset += self.section.GetStartOffset()
         return Entry.Pack(self, offset)
 
     def ProcessContents(self):