[U-Boot] [PATCH 3/3] env: Implement support for AES encryption into fw_* tools

Wolfgang Denk wd at denx.de
Thu Feb 6 13:16:31 CET 2014


Dear Marek Vasut,

In message <1391658352-24754-3-git-send-email-marex at denx.de> you wrote:
> Implement support for encrypting/decrypting the environment block
> into the tools/env/fw_* tools. The cipher used is AES 128 CBC and
> the implementation depends solely on components internal to U-Boot.
...

> +#ifdef USE_HOSTCC
> +/* Define compat stuff for use in fw_* tools. */
> +typedef unsigned char u8;
> +typedef unsigned int u32;
> +#define debug(...) do {} while(0)

If we need this for the host environment, then you should provide a
useful implementation (output to STDERR).

Also, this is causing checkpatch warnings: space required before the
open parenthesis '('


> --- a/tools/env/fw_env.c
> +++ b/tools/env/fw_env.c
...
> +#define DIV_ROUND_UP(n,d)      (((n) + (d) - 1) / (d))

Checkpatch says: space required after that ',' (ctx:VxV)


> +static int aes_flag = 0;

ERROR: do not initialise statics to 0 or NULL


> +			fprintf (stderr, "## Error: "
> +				"`-a' option requires valid AES key\n");

WARNING: space prohibited between function name and open parenthesis '('

More checkpatch issues suppressed.  Please fix all of these!

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A fanatic is a person who can't change his mind and won't change  the
subject.                                          - Winston Churchill


More information about the U-Boot mailing list