diff mbox

[U-Boot] Allow imxtract to extract part of script image.

Message ID 1442384951-3856-1-git-send-email-p.aubert@staubli.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Pierre Aubert Sept. 16, 2015, 6:29 a.m. UTC
From: Pierre Aubert <p.aubert@staubli.com>

Scripts are multi-file images, the imxtract command should handle them
in the same manner.

Signed-off-by: Pierre Aubert <p.aubert@staubli.com>
---
 common/cmd_ximg.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Comments

Tom Rini Oct. 24, 2015, 9:15 p.m. UTC | #1
On Wed, Sep 16, 2015 at 08:29:11AM +0200, Pierre Aubert wrote:

> From: Pierre Aubert <p.aubert@staubli.com>
> 
> Scripts are multi-file images, the imxtract command should handle them
> in the same manner.
> 
> Signed-off-by: Pierre Aubert <p.aubert@staubli.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/common/cmd_ximg.c b/common/cmd_ximg.c
index 64b9186..abd94ec 100644
--- a/common/cmd_ximg.c
+++ b/common/cmd_ximg.c
@@ -87,7 +87,8 @@  do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
 		image_print_contents(hdr);
 #endif
 
-		if (!image_check_type(hdr, IH_TYPE_MULTI)) {
+		if (!image_check_type(hdr, IH_TYPE_MULTI) &&
+		    !image_check_type(hdr, IH_TYPE_SCRIPT)) {
 			printf("Wrong Image Type for %s command\n",
 					cmdtp->name);
 			return 1;