From: Wolfgang Denk Date: Thu, 06 Feb 2014 13:16:31 +0100 Subject: [U-Boot] [PATCH 3/3] env: Implement support for AES encryption into fw_* tools In-Reply-To: <1391658352-24754-3-git-send-email-marex@denx.de> References: <1391658352-24754-1-git-send-email-marex@denx.de> <1391658352-24754-3-git-send-email-marex@denx.de> Message-ID: <20140206121631.243C8380761@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Marek Vasut, In message <1391658352-24754-3-git-send-email-marex@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