[U-Boot] [PATCH] ARM: mxs: tools: Add mkimage support for MXS bootstream

Tom Rini trini at ti.com
Tue Aug 6 15:48:08 CEST 2013


On Wed, Jul 31, 2013 at 03:50:55PM +0200, Marek Vasut wrote:

> Add mkimage support for generating and verifying MXS bootstream.
> The implementation here is mostly a glue code between MXSSB v0.4
> and mkimage, but the long-term goal is to rectify this and merge
> MXSSB with mkimage more tightly. Once this code is properly in
> U-Boot, MXSSB shall be deprecated in favor of mkimage-mxsimage
> support.
> 
> Note that the mxsimage generator needs libcrypto from OpenSSL, I
> therefore enabled the libcrypto/libssl unconditionally.

OK, we need to figure out something here.  Can we start by just enabling
this for MX platforms and see what the fallout is?  And like the FIT
code, have a "not supported" print happen when it's not enabled.

[snip]
> --- a/tools/mkimage.h
> +++ b/tools/mkimage.h
> @@ -112,6 +112,7 @@ struct image_type_params {
>  	int (*verify_header) (unsigned char *, int, struct mkimage_params *);
>  	/* Prints image information abstracting from image header */
>  	void (*print_header) (const void *);
> +
>  	/*
>  	 * The header or image contents need to be set as per image type to
>  	 * be generated using this callback function.

Extra space change.

[snip]
> +/*
> + * CRC32
> + */
> +static uint32_t crc32(uint8_t *data, uint32_t len)
> +{
> +	const uint32_t poly = 0x04c11db7;

Please comment a bit more about how we need to use the following
polynomial as documented by Freescale ... somewhere ...

> +/*
> + * Code
> + */
> +static time_t sb_get_timestamp(void)
> +{
> +#if 0
> +	struct tm time_2000 = {
> +		.tm_yday	= 1,	/* Jan. 1st */
> +		.tm_year	= 100,	/* 2000 */
> +	};
> +	time_t seconds_to_2000 = mktime(&time_2000);
> +	time_t seconds_to_now = time(NULL);
> +
> +	return seconds_to_now - seconds_to_2000;
> +#endif
> +	return 427398871;
> +}

What?  If we need to use a magic timestamp, please say why.  And in
general, the file could use some further commenting on what/why.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130806/413453cc/attachment.pgp>


More information about the U-Boot mailing list