Commit acdcd10c authored by stroese's avatar stroese
Browse files

Update for esd auto_update and hh405 board

parent 89c02e2c
......@@ -2,6 +2,9 @@
Changes for U-Boot 1.1.3:
======================================================================
* Patch by Stefan Roese, 16 Mar 2005:
Update for esd auto_update and hh405 board
* Adapt for U-Boot image size (new features enabled) on TQM5200
* Update code for TQM8540 board (and 85xx in general):
......
......@@ -224,6 +224,25 @@ int au_do_update(int i, long sz)
start = au_image[i].start;
end = au_image[i].start + au_image[i].size - 1;
/*
* do not update firmware when image is already in flash.
*/
if (au_image[i].type == AU_FIRMWARE) {
char *orig = (char*)start;
char *new = (char *)((char *)hdr + sizeof(*hdr));
nbytes = ntohl(hdr->ih_size);
while(--nbytes) {
if (*orig++ != *new++) {
break;
}
}
if (!nbytes) {
printf("Skipping firmware update - images are identical\n");
break;
}
}
/* unprotect the address range */
/* this assumes that ONLY the firmware is protected! */
if (au_image[i].type == AU_FIRMWARE) {
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment