X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=tools%2Fmkimage.c;h=fea3e5bc6b3079e3d2a915829f04a83c832797fb;hb=5720df78ad48cb98cff7cfb816565fb8a5d0d1b6;hp=b6e030e28e81a1c935619cad79d8bbc2971c48b3;hpb=466b74108f5344da0b9afb9b857a8f9e4cf4e656;p=u-boot diff --git a/tools/mkimage.c b/tools/mkimage.c index b6e030e28e..fea3e5bc6b 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -86,11 +86,14 @@ table_entry_t arch_name[] = { { IH_CPU_MICROBLAZE, "microblaze", "MicroBlaze", }, { IH_CPU_MIPS, "mips", "MIPS", }, { IH_CPU_MIPS64, "mips64", "MIPS 64 Bit", }, + { IH_CPU_NIOS, "nios", "NIOS", }, + { IH_CPU_NIOS2, "nios2", "NIOS II", }, { IH_CPU_PPC, "ppc", "PowerPC", }, { IH_CPU_S390, "s390", "IBM S390", }, { IH_CPU_SH, "sh", "SuperH", }, { IH_CPU_SPARC, "sparc", "SPARC", }, { IH_CPU_SPARC64, "sparc64", "SPARC 64 Bit", }, + { IH_CPU_BLACKFIN, "blackfin", "Blackfin", }, { -1, "", "", }, }; @@ -274,7 +277,8 @@ NXTARG: ; */ if (xflag) { if (ep != addr + sizeof(image_header_t)) { - fprintf (stderr, "%s: For XIP, the entry point must be the load addr + %lu\n", + fprintf (stderr, + "%s: For XIP, the entry point must be the load addr + %lu\n", cmdname, (unsigned long)sizeof(image_header_t)); exit (EXIT_FAILURE); @@ -344,8 +348,9 @@ NXTARG: ; if (crc32 (0, data, len) != checksum) { fprintf (stderr, - "*** Warning: \"%s\" has bad header checksum!\n", - imagefile); + "%s: ERROR: \"%s\" has bad header checksum!\n", + cmdname, imagefile); + exit (EXIT_FAILURE); } data = (char *)(ptr + sizeof(image_header_t)); @@ -353,8 +358,9 @@ NXTARG: ; if (crc32 (0, data, len) != ntohl(hdr->ih_dcrc)) { fprintf (stderr, - "*** Warning: \"%s\" has corrupted data!\n", - imagefile); + "%s: ERROR: \"%s\" has corrupted data!\n", + cmdname, imagefile); + exit (EXIT_FAILURE); } /* for multi-file images we need the data part, too */ @@ -381,7 +387,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; @@ -590,7 +596,7 @@ usage () { fprintf (stderr, "Usage: %s -l image\n" " -l ==> list image header information\n" - " %s -A arch -O os -T type -C comp " + " %s [-x] -A arch -O os -T type -C comp " "-a addr -e ep -n name -d data_file[:data_file...] image\n", cmdname, cmdname); fprintf (stderr, " -A ==> set architecture to 'arch'\n"