diff mbox series

[U-Boot,038/126] binman: Take account of skip-at-start with image-header

Message ID 20190925145750.200592-39-sjg@chromium.org
State Accepted
Commit 0b7ebee38e5d9167360bc756fcfb72af8badc74f
Delegated to: Bin Meng
Headers show
Series x86: Add initial support for apollolake | expand

Commit Message

Simon Glass Sept. 25, 2019, 2:56 p.m. UTC
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>
---

 tools/binman/etype/image_header.py | 1 +
 1 file changed, 1 insertion(+)

Comments

Bin Meng Oct. 5, 2019, 2:42 p.m. UTC | #1
On Wed, Sep 25, 2019 at 10:58 PM Simon Glass <sjg@chromium.org> wrote:
>
> 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>
> ---
>
>  tools/binman/etype/image_header.py | 1 +
>  1 file changed, 1 insertion(+)
>

Acked-by: Bin Meng <bmeng.cn@gmail.com>
Bin Meng Oct. 6, 2019, 11:20 a.m. UTC | #2
On Sat, Oct 5, 2019 at 10:42 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Wed, Sep 25, 2019 at 10:58 PM Simon Glass <sjg@chromium.org> wrote:
> >
> > 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>
> > ---
> >
> >  tools/binman/etype/image_header.py | 1 +
> >  1 file changed, 1 insertion(+)
> >
>
> Acked-by: Bin Meng <bmeng.cn@gmail.com>

applied to u-boot-x86/next, thanks!
diff mbox series

Patch

diff --git a/tools/binman/etype/image_header.py b/tools/binman/etype/image_header.py
index 4b69eda1a22..b9327dd799b 100644
--- a/tools/binman/etype/image_header.py
+++ b/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):