[U-Boot-Users] [PATCH] Fix bug in auto_update (trab board)

[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

In message 47F3F98010FF784EBEE6526EAAB078D1C05D5F@tq-mailsrv.tq-net.de you wrote:
- Fix bug in auto_update (trab board)
Patch by Martin Krause, 16 Sep 2005
Added, but:
--- 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 =3D ntohl(hdr->ih_size); /* for kernel and app the image header must also fit into flash */
- if (idx !=3D IDX_DISK)
- if ((idx !=3D IDX_DISK) && (idx !=3D IDX_FIRMWARE)) checksum +=3D sizeof(*hdr); /* check the size does not exceed space in flash. HUSH scripts */ /* all have ausize[] set to 0 */
Note that the patch comes corrupted (quoted-printable encoded).
Please make sure to send plain, unencoded text.
Added.
Best regards,
Wolfgang Denk
participants (2)
-
Martin Krause
-
Wolfgang Denk