scripts: imx-image: Fix writing image with IVT offset = 0
When we have written the barebox header the next thing we do is to lseek
forward by the size of the header gap. This means our position is
already inside of the rest of the image and we have to skip this offset
from the rest of the image. This only works when the rest of the image
doesn't have anything needed in the first few bytes. Some newer SoCs
have the IVT at offset 0 though, so with the current approach we skip
writing the IVT.
Instead of doing this we should lseek to the end of the header gap.
With this we are at the right position to just write the full image
containing the IVT.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 03ecd70 commit 17c7e57f6e0a2401216951717eb9fa48ac3e97fd
@Sascha Hauer Sascha Hauer authored on 19 Jun 2020
Showing 1 changed file
View
scripts/imx/imx-image.c