[U-Boot] [PATCH 1/5] tools: mkimage: add support for gpimage format

Wolfgang Denk wd at denx.de
Tue Jan 21 20:34:26 CET 2014


Dear Murali,

In message <3E54258959B69E4282D79E01AB1F32B70466CE4A at DFLE11.ent.ti.com> you wrote:
>
> >> +	if (do_swap32) {
> >> +		gph_size = gpimage_swap32(gph->size);
> >> +		gph_load_addr = gpimage_swap32(gph->load_addr);
> >> +	} else {
> >> +		gph_size = gph->size;
> >> +		gph_load_addr = gph->load_addr;
> >> +	}
> >
> >I think it should be possible top write this code in such a way that you can avoid both the if-
> >else and passing the  do_swap32  parameter.
> >It is my impression that the whole endianess handling needs some refinemant.
> >
> >Actually I cannot see a place where do_swap32=0 is used..
> 
> This is done to keep the omapimage usage of this variable.

Is this actually used?  It appear the omapimage handling would set
do_swap32=1 only when imagename == "byteswap" (see "tools/omapimage.c").
Is this a practical usecase anywhere?


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Q:  Do you know what the death rate around here is?
A:  One per person.


More information about the U-Boot mailing list