[U-Boot] [PATCH v4] socfpga: Add socfpga preloader signing to mkimage

Wolfgang Denk wd at denx.de
Thu Feb 27 22:23:11 CET 2014


Dear Charles,

sorry, I only send part of the message. Here is the rest.

In message <CAE21AQp2GSPedrDakio1wPa3vGTwjd-3D1wSQM0WhG9r-8Bzcg at mail.gmail.com> you wrote:
> 
> > > Both Gerhard and me asked before: Why exactly do we need another
> > > implementation of CRC32.  We already have some - why cannot we use
> > > these?
...
> The actual table values I am using are also found in lib/bzlib_crctable.c

So could you use the bzlib implementation for your purposes?

> This is, however, not exposed but is a private thing within bzlib.
> 
> The best choice would possibly be to expose this with a new crc function,
> but that means dragging bzlib (or parts thereof) into mkimage or at least
> putting "hooks" into bzlib that were never intended to be there.
> 
> The alternative is to maybe just add a new alt_crc.c to lib.

Code duplication is always bad.  Please factor out common code parts.

> > > > + * Copyright for the CRC code:
> > > > + *
> > > > + * COPYRIGHT (C) 1986 Gary S. Brown.  You may use this program, or
> > > > + *  code or tables extracted from it, as desired without restriction.
> > >
> > > I asked before:  Please provide _exact_ reference. See
...

Exact reference includes some URL plus version id, etc.

> > > I also commented before: If you really need this copied code (i. e.
> > > you canot use one of the already existing implementations of CRC32 -
> > > which I seriously doubt), then better move this into a separate file,
> > > and assign a separate license ID tag for it.
> >
> > You say "already exiting implementations". I see only one: lib/crc32.c.
> > Perhaps I am not looking in the right place?
> >
> > I shall split this code out and call it alt_crc32 and put it in lib with
> > one
> > of those proxy files in tools.

"alt" is a really bad name - you mentioned yourself that ther eis not
only one alternative, so please rather use a descriptive name.


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
Old programmers never die, they just branch to a new address.


More information about the U-Boot mailing list