
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