From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Fri, 15 Jan 2010 16:01:43 +0100 Subject: [U-Boot] [PATCH V2 1/9] mkimage: Add Freescale imx Boot Image support (imximage) In-Reply-To: <822809.94856.qm@web51005.mail.re2.yahoo.com> References: <822809.94856.qm@web51005.mail.re2.yahoo.com> Message-ID: <4B508357.9040407@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 =====================================================================