diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/binman/README.entries | 2 | ||||
-rw-r--r-- | tools/binman/etype/u_boot_with_ucode_ptr.py | 2 | ||||
-rw-r--r-- | tools/dumpimage.c | 15 | ||||
-rw-r--r-- | tools/fit_image.c | 9 |
4 files changed, 22 insertions, 6 deletions
diff --git a/tools/binman/README.entries b/tools/binman/README.entries index 0576e63a86..6a816bba6b 100644 --- a/tools/binman/README.entries +++ b/tools/binman/README.entries @@ -971,7 +971,7 @@ Entry: u-boot-with-ucode-ptr: U-Boot with embedded microcode pointer -------------------------------------------------------------------- Properties / Entry arguments: - - filename: Filename of u-boot-nodtb.dtb (default 'u-boot-nodtb.dtb') + - filename: Filename of u-boot-nodtb.bin (default 'u-boot-nodtb.bin') - optional-ucode: boolean property to make microcode optional. If the u-boot.bin image does not include microcode, no error will be generated. diff --git a/tools/binman/etype/u_boot_with_ucode_ptr.py b/tools/binman/etype/u_boot_with_ucode_ptr.py index cb7dbc68db..960a5efeb4 100644 --- a/tools/binman/etype/u_boot_with_ucode_ptr.py +++ b/tools/binman/etype/u_boot_with_ucode_ptr.py @@ -18,7 +18,7 @@ class Entry_u_boot_with_ucode_ptr(Entry_blob): """U-Boot with embedded microcode pointer Properties / Entry arguments: - - filename: Filename of u-boot-nodtb.dtb (default 'u-boot-nodtb.dtb') + - filename: Filename of u-boot-nodtb.bin (default 'u-boot-nodtb.bin') - optional-ucode: boolean property to make microcode optional. If the u-boot.bin image does not include microcode, no error will be generated. diff --git a/tools/dumpimage.c b/tools/dumpimage.c index ee3d41dda4..e5481435a7 100644 --- a/tools/dumpimage.c +++ b/tools/dumpimage.c @@ -35,14 +35,23 @@ static int dumpimage_extract_subimage(struct image_type_params *tparams, if (tparams->verify_header) { retval = tparams->verify_header((unsigned char *)ptr, sbuf->st_size, ¶ms); - if (retval != 0) + if (retval != 0) { + fprintf(stderr, "%s: failed to verify header of %s\n", + params.cmdname, tparams->name); return -1; + } + /* * Extract the file from the image * if verify is successful */ if (tparams->extract_subimage) { retval = tparams->extract_subimage(ptr, ¶ms); + if (retval != 0) { + fprintf(stderr, "%s: extract_subimage failed for %s\n", + params.cmdname, tparams->name); + return -3; + } } else { fprintf(stderr, "%s: extract_subimage undefined for %s\n", @@ -95,7 +104,6 @@ int main(int argc, char **argv) printf("dumpimage version %s\n", PLAIN_VERSION); exit(EXIT_SUCCESS); case 'h': - usage(); default: usage(); break; @@ -175,6 +183,9 @@ int main(int argc, char **argv) * image type. Returns the error code if not matched */ retval = dumpimage_extract_subimage(tparams, ptr, &sbuf); + if (retval) + fprintf(stderr, "%s: Can't extract subimage from %s\n", + params.cmdname, params.imagefile); } else { /* * Print the image information for matched image type diff --git a/tools/fit_image.c b/tools/fit_image.c index 0201cc44d8..114df5af30 100644 --- a/tools/fit_image.c +++ b/tools/fit_image.c @@ -741,9 +741,14 @@ static int fit_image_extract( { const void *file_data; size_t file_size = 0; + int ret; - /* get the "data" property of component at offset "image_noffset" */ - fit_image_get_data(fit, image_noffset, &file_data, &file_size); + /* get the data address and size of component at offset "image_noffset" */ + ret = fit_image_get_data_and_size(fit, image_noffset, &file_data, &file_size); + if (ret) { + fprintf(stderr, "Could not get component information\n"); + return ret; + } /* save the "file_data" into the file specified by "file_name" */ return imagetool_save_subimage(file_name, (ulong) file_data, file_size); |