From: Wolfgang Denk Date: Wed, 18 May 2011 23:03:08 +0200 Subject: [U-Boot] [PATCH v4 1/3] km/common: implement boardId HWkey checks as u-boot cmd In-Reply-To: <1305266364-8583-2-git-send-email-holger.brunck@keymile.com> References: <1305266364-8583-1-git-send-email-holger.brunck@keymile.com> <1305266364-8583-2-git-send-email-holger.brunck@keymile.com> Message-ID: <20110518210308.CEA6A1491B0C@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 Holger Brunck, In message <1305266364-8583-2-git-send-email-holger.brunck@keymile.com> you wrote: > From: Thomas Herzmann > > BoardId and HWKey are used to identify the HW class of a given board. > The correct values are stored in the inventory eeprom. During creation > time of a boot package the boardId and HWkey for the SW is stored in > the default environment and burned into the flash. During boottime > the values in the inventory and in the environment are compared to > avoid starting of a SW which is not authorized for this board. > > Some bootpackages are allowed to run on a set of different boardId > hwKey. In this case the environment variable boardIdListHex was added > to the default environment. In this case the command iterates over the > pair values and compares them with the values read from the inventory > eeprom. > > The syntax of such a boardIdListHex value is e.g.: 158_1 159_1 159_2 > > Signed-off-by: Thomas Herzmann > Signed-off-by: Holger Brunck > Signed-off-by: Valentin Longchamp > Acked-by: Heiko Schocher > cc: Wolfgang Denk > cc: Detlev Zundel > > --- > Changes for v4: > - fix small bug introduced in v3 due to the enhanced error handling, > return the return code (rc) and not 1 in any case > Changes for v3: > - add further error handling > - rework the patch with inputs from W.Denk: > - introduce emtpy line after varaiable declaration > - fix one checkpatch warning > - add comment why we use simple_strtoul > Changes for v2: > - split up first large patch series to three independent smaller > patch series > - give the cmd a more precise name > - rework the patch with inputs from W.Denk: > - adapt and enhance commit msg > - comment the code > - add error handling > > board/keymile/common/common.c | 156 +++++++++++++++++++++++++++++++++++ > include/configs/km/keymile-common.h | 30 +------- > 2 files changed, 157 insertions(+), 29 deletions(-) Applied, thanks. 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 If I had to live my life again, I'd make the same mistakes, only sooner. -- Tallulah Bankhead