
11 Sep
2013
11 Sep
'13
12:14 a.m.
On 08/27/2013 08:17 AM, Stefano Babic wrote:
Implement function vrec_header to be able to pad the final data image file according the what has been calculated for boot_data.length.
Signed-off-by: Stefano Babic sbabic@denx.de
Changes in v4:
- fix crash when imximage_init_loadsize is not set
Found during regression tests with boards ima3-mx53 and m53evk (Stefano Babic)
Changes in v3:
- uses stat instead of open / fstat / close (Marek Vasut)
Changes in v2: None
tools/imximage.c | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 85 insertions(+), 3 deletions(-)
<snip>
+static int imximage_generate(struct mkimage_params *params,
- struct image_type_params *tparams)
+{
- struct imx_header *imxhdr;
- size_t alloc_len;
- struct stat sbuf;
- char *datafile = params->datafile;
- uint32_t pad_len;
- memset(&imximage_header, 0, sizeof(imximage_header));
- /*
* In order to not change the old imx cfg file
* by adding VERSION command into it, here need
* set up function ptr group to V1 by default.
*/
- imximage_version = IMXIMAGE_V1;
- /* Be able to detect if the cfg file has no BOOT_FROM tag */
- imximage_ivt_offset = FLASH_OFFSET_UNDEFINED;
- imximage_csf_size = 0;
- set_hdr_func(imxhdr);
Doesn't this line has compiling warning for you?
imximage.c: In function ‘imximage_generate’: imximage.c:634: warning: ‘imxhdr’ is used uninitialized in this function
York