[U-Boot] [PATCH 01/30] lib: Allow crc32 to be disabled.

Tom Rini trini at konsulko.com
Fri Nov 8 14:59:23 UTC 2019


On Sun, Oct 27, 2019 at 05:48:39PM +0100, Heinrich Schuchardt wrote:
> On 10/27/19 4:53 PM, Simon Glass wrote:
> > Unfortunately this table seems to appear in TPL with gcc 7.3 even if it
> > is not used. Fix it by creating a Kconfig that can be used to disable this
> > routine.
> > 
> > It is enabled by default, since most boards use it.
> > 
> > Signed-off-by: Simon Glass <sjg at chromium.org>
> > ---
> > 
> >   lib/Kconfig  | 29 +++++++++++++++++++++++++++++
> >   lib/Makefile |  2 +-
> >   2 files changed, 30 insertions(+), 1 deletion(-)
> > 
> > diff --git a/lib/Kconfig b/lib/Kconfig
> > index 135f0b372b..be5f9d343a 100644
> > --- a/lib/Kconfig
> > +++ b/lib/Kconfig
> > @@ -353,6 +353,35 @@ config SHA_PROG_HW_ACCEL
> >   config MD5
> >   	bool
> > 
> > +config CRC32
> > +	bool "Enable crc32 routine"
> 
> env/common.c uses crc32(). I could not find how to disable building it.
> So this configuration option seems to be superfluous. Otherwise please,
> add all reverse dependencies like EFI_LOADER, CMD_UBIFS, ...
> 
> > +	default y
> > +	help
> > +	  This enables a 32-bit CRC (cyclic-redundancy check) routine. It is
> > +	  typically used to check for changes in a group of bytes. Even a
> > +	  small change typically produces a very different CRC value. This
> > +	  algorithm is simple and quite fast.
> > +
> > +config SPL_CRC32
> > +	bool "Enable crc32 routine in SPL"
> > +	depends on SPL
> 
> Reverse dependencies are missing here, e.g.
> 
> selected by SPL_EFI_PARTITION

I think the problem is that for 'CRC32' itself, we need to not have it
be a visible symbol as it's non-optional in main U-Boot.  And then it
should be select'd as needed by SPL_xxx and TPL_xxx symbols.  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191108/f239a2b0/attachment.sig>


More information about the U-Boot mailing list