
[PATCH] Fix bug in auto_update (trab board) Exclude image header from image size calculation (for firmware.img), because the image header is not stored to FLASH. Signed-off-by Martin Krause martin.krause@tqs.de
--- CHANGELOG entry:
* Fix bug in auto_update (trab board) Patch by Martin Krause, 16 Sep 2005
board/trab/auto_update.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
4111a69f46a7a264564a413521599d907a463b93 diff --git a/board/trab/auto_update.c b/board/trab/auto_update.c --- a/board/trab/auto_update.c +++ b/board/trab/auto_update.c @@ -296,7 +296,7 @@ au_check_header_valid(int idx, long nbyt /* recycle checksum */ checksum = ntohl(hdr->ih_size); /* for kernel and app the image header must also fit into flash */ - if (idx != IDX_DISK) + if ((idx != IDX_DISK) && (idx != IDX_FIRMWARE)) checksum += sizeof(*hdr); /* check the size does not exceed space in flash. HUSH scripts */ /* all have ausize[] set to 0 */
Regards, Martin
TQ-Systems GmbH Mühlstraße 2, Gut Delling, 82229 Seefeld Tel. +49 (8153) 93 08-157, Fax +49 (8153) 93 08-7157 martin.krause@tqs.de www.tq-group.com