[U-Boot] [PATCH V2 1/9] mkimage: Add Freescale imx Boot Image support (imximage)

Stefano Babic sbabic at denx.de
Fri Jan 15 16:01:43 CET 2010


Fabio Estevam wrote:
> Hi Stefano,
> 

Hi Fabio,

> Yes, it is still the same binary, but just needs a different offset.
> 

This is not what I have understood from the manual. In the chapter
regarding the flash header ("Flash header structure", figure 2.9), there
is the field "app_dest_ptr". This pointer must be set to the start
address of the flash/storage media. This means we have different
binaries due only to the value of this field. To set this field we need
to know the media where the system boots.

> BTW, I don't see the following offset defines used anywhere in the code:
> 
> +#define FLASH_OFFSET_STANDARD    0x400
> +#define FLASH_OFFSET_NAND    FLASH_OFFSET_STANDARD
> +#define FLASH_OFFSET_SD        FLASH_OFFSET_STANDARD
> +#define FLASH_OFFSET_SPI    FLASH_OFFSET_STANDARD
> +#define FLASH_OFFSET_ONENAND    0x100

They are used in the imximage_bootops structure in imximage.c. This
field is later used to set the app_dest_ptr field:

239         fhdr->app_dest_ptr = params->ep - hdr->flash_offset -
240                 sizeof(struct imx_header);

Regards,
Stefano

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================


More information about the U-Boot mailing list