tools: imximage: refactor header length calculations for imximage v1
authorMartin Kaiser <martin@kaiser.cx>
Mon, 2 Jan 2017 21:24:17 +0000 (22:24 +0100)
committerStefano Babic <sbabic@denx.de>
Fri, 27 Jan 2017 09:27:32 +0000 (10:27 +0100)
commit97f17fa6278747d059fccb8eef7f79ec3dfc9502
tree36a84caece2a456c8031a7aa36f35731b4de1d80
parentcf4128e53caa4f7b0a6586fc3f10690d5c05db31
tools: imximage: refactor header length calculations for imximage v1

We can use the same header length calculations for both imximage v1 and
v2. This addresses TODO comments about imximage v1 in the current code.

With this patch applied, *header_size_ptr in imximage_set_header() will
have the correct value for both imximage v1 and v2. This is necessary
for people wanting to add proprietary data behind the created imximage.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Cc: sbabic@denx.de
tools/imximage.c