All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lokesh Vutla <lokeshvutla@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mkimage: fix generation of FIT image
Date: Tue, 3 May 2016 19:26:21 +0530	[thread overview]
Message-ID: <5728AE05.7070204@ti.com> (raw)
In-Reply-To: <1462281423-7649-1-git-send-email-andreas@biessmann.org>



On Tuesday 03 May 2016 06:47 PM, Andreas Bie?mann wrote:
> Commit 7a439cadcf3192eb012a2432ca34670b676c74d2 broke generation of SPL
> loadable FIT images (CONFIG_SPL_LOAD_FIT).
> Fix it by removing the unnecessary storage of expected image type. This was a
> left over of the previous implementation. It is not longer necessary since the
> mkimage -b switch always has one parameter.

Thanks for the Patch. This fixes the build with CONFIG_SPL_LOAD_FIT enabled.

Tested-by: Lokesh Vutla <lokeshvutla@ti.com>

Thanks and regards,
Lokesh

> 
> Signed-off-by: Andreas Bie?mann <andreas@biessmann.org>
> ---
> 
>  tools/mkimage.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/tools/mkimage.c b/tools/mkimage.c
> index b407aed..93d1c16 100644
> --- a/tools/mkimage.c
> +++ b/tools/mkimage.c
> @@ -133,10 +133,8 @@ static void process_args(int argc, char **argv)
>  	char *ptr;
>  	int type = IH_TYPE_INVALID;
>  	char *datafile = NULL;
> -	int expecting;
>  	int opt;
>  
> -	expecting = IH_TYPE_COUNT;	/* Unknown */
>  	while ((opt = getopt(argc, argv,
>  			     "a:A:b:cC:d:D:e:Ef:Fk:K:ln:O:rR:sT:vVx")) != -1) {
>  		switch (opt) {
> @@ -154,8 +152,7 @@ static void process_args(int argc, char **argv)
>  				usage("Invalid architecture");
>  			break;
>  		case 'b':
> -			expecting = IH_TYPE_FLATDT;
> -			if (add_content(expecting, optarg)) {
> +			if (add_content(IH_TYPE_FLATDT, optarg)) {
>  				fprintf(stderr,
>  					"%s: Out of memory adding content '%s'",
>  					params.cmdname, optarg);
> @@ -238,7 +235,6 @@ static void process_args(int argc, char **argv)
>  				show_image_types();
>  				usage("Invalid image type");
>  			}
> -			expecting = type;
>  			break;
>  		case 'v':
>  			params.vflag++;
> @@ -254,7 +250,8 @@ static void process_args(int argc, char **argv)
>  		}
>  	}
>  
> -	if (optind < argc && expecting == type)
> +	/* The last parameter is expected to be the imagefile */
> +	if (optind < argc)
>  		params.imagefile = argv[optind];
>  
>  	/*
> 

  reply	other threads:[~2016-05-03 13:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-01  1:01 [U-Boot] [PATCH] mkimage: fix argument parsing on BSD systems Andreas Bießmann
2016-05-01 19:35 ` Simon Glass
2016-05-02 23:32 ` [U-Boot] " Tom Rini
2016-05-03 12:21   ` Michal Simek
2016-05-03 13:17     ` [U-Boot] [PATCH] mkimage: fix generation of FIT image Andreas Bießmann
2016-05-03 13:56       ` Lokesh Vutla [this message]
2016-05-03 15:28       ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5728AE05.7070204@ti.com \
    --to=lokeshvutla@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.