diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/bmp_logo.c | 10 | ||||
-rw-r--r-- | tools/env/fw_env.c | 2 | ||||
-rw-r--r-- | tools/env/fw_env.h | 4 | ||||
-rw-r--r-- | tools/mkimage.c | 2 | ||||
-rw-r--r-- | tools/updater/flash.c | 2 | ||||
-rw-r--r-- | tools/updater/flash_hw.c | 2 |
6 files changed, 14 insertions, 8 deletions
diff --git a/tools/bmp_logo.c b/tools/bmp_logo.c index 8e728e23c3..98be617667 100644 --- a/tools/bmp_logo.c +++ b/tools/bmp_logo.c @@ -46,7 +46,7 @@ int main (int argc, char *argv[]) FILE *fp; bitmap_t bmp; bitmap_t *b = &bmp; - uint16_t n_colors; + uint16_t data_offset, n_colors; if (argc < 2) { fprintf (stderr, "Usage: %s file\n", argv[0]); @@ -67,7 +67,9 @@ int main (int argc, char *argv[]) * read width and height of the image, and the number of colors used; * ignore the rest */ - skip_bytes (fp, 16); + skip_bytes (fp, 8); + fread (&data_offset, sizeof (uint16_t), 1, fp); + skip_bytes (fp, 6); fread (&b->width, sizeof (uint16_t), 1, fp); skip_bytes (fp, 2); fread (&b->height, sizeof (uint16_t), 1, fp); @@ -78,6 +80,7 @@ int main (int argc, char *argv[]) /* * Repair endianess. */ + data_offset = le_short(data_offset); b->width = le_short(b->width); b->height = le_short(b->height); n_colors = le_short(n_colors); @@ -129,6 +132,9 @@ int main (int argc, char *argv[]) ); } + /* seek to offset indicated by file header */ + fseek(fp, (long)data_offset, SEEK_SET); + /* read the bitmap; leave room for default color map */ printf ("\n"); printf ("};\n"); diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c index 09b8b5d7a7..74c0498d5a 100644 --- a/tools/env/fw_env.c +++ b/tools/env/fw_env.c @@ -726,7 +726,7 @@ static int parse_config () if (HaveRedundEnv && stat (DEVNAME (1), &st)) { fprintf (stderr, "Cannot access MTD device %s: %s\n", - DEVNAME (2), strerror (errno)); + DEVNAME (1), strerror (errno)); return 1; } return 0; diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h index cc2ff09572..13c45a2780 100644 --- a/tools/env/fw_env.h +++ b/tools/env/fw_env.h @@ -43,8 +43,8 @@ #define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */ #define CONFIG_BOOTCOMMAND \ "bootp; " \ - "setenv bootargs root=/dev/nfs nfsroot=$(serverip):$(rootpath) " \ - "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname)::off; " \ + "setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} " \ + "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; " \ "bootm" extern void fw_printenv(int argc, char *argv[]); diff --git a/tools/mkimage.c b/tools/mkimage.c index fbc1a12549..70452db1c0 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -383,7 +383,7 @@ NXTARG: ; if (opt_type == IH_TYPE_MULTI || opt_type == IH_TYPE_SCRIPT) { char *file = datafile; - unsigned long size; + uint32_t size; for (;;) { char *sep = NULL; diff --git a/tools/updater/flash.c b/tools/updater/flash.c index 99b17195e5..32a17677aa 100644 --- a/tools/updater/flash.c +++ b/tools/updater/flash.c @@ -24,7 +24,7 @@ #include <common.h> #include <flash.h> -extern flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ +extern flash_info_t flash_info[]; /* info for FLASH chips */ /*----------------------------------------------------------------------- * Functions diff --git a/tools/updater/flash_hw.c b/tools/updater/flash_hw.c index 62d1083c46..2d9b8c8802 100644 --- a/tools/updater/flash_hw.c +++ b/tools/updater/flash_hw.c @@ -39,7 +39,7 @@ #endif /*---------------------------------------------------------------------*/ -flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; +flash_info_t flash_info[]; static ulong flash_get_size (ulong addr, flash_info_t *info); static int flash_get_offsets (ulong base, flash_info_t *info); |