[U-Boot] [PATCH] new tool mkenvimage: generates an env image from an arbitrary config file
Mike Frysinger
vapier at gentoo.org
Mon Aug 22 03:09:47 CEST 2011
On Tuesday, August 09, 2011 06:31:29 David Wagner wrote:
> +extern uint32_t crc32 (uint32_t, const unsigned char *, unsigned int);
does including u-boot/crc.h work ?
> +static void usage(char *exec_name)
const char *exec_name
> + char *txt_filename = NULL, *bin_filename = NULL;
mark them both const ?
> + dataptr = calloc(datasize, sizeof(*dataptr));
you zero-ed it out here ...
> + /* Pad the environnment with the padding byte */
> + memset(envptr, padbyte, envsize);
... then manually filled it with a byte. just use malloc() instead of
calloc() and avoid that zero.
> + memcpy((uint32_t*) dataptr, &targetendian_crc, sizeof(uint32_t));
i dont think that cast is necessary. just punt it.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110821/d79e0d6e/attachment.pgp
More information about the U-Boot
mailing list