[U-Boot] [PATCH v2 REPOST 2/3] image: Implement IH_TYPE_KERNEL_REL

Stephen Warren swarren at nvidia.com
Thu Oct 20 23:54:17 CEST 2011


Wolfgang Denk wrote at Thursday, October 20, 2011 3:47 PM:
> In message <74CDBE0F657A3D45AFBB94109FB122FF173D51C286 at HQMAIL01.nvidia.com> you wrote:
> >
> > > DOn;t give up to oearly.  My opinion is that #ifdef's are bad, and
> > > increased code size is bad either.  If we can trade off one for the
> > > other, we should know exactly what we can win here and how much we
> > > have to pay for that there.  That's all I want to know.
> >
> > Do you mean the total without /any/ ifdefs? If so, please see where I
> > answered this question earlier in the thread:
> >
> > http://lists.denx.de/pipermail/u-boot/2011-October/104427.html
> >
> > The first time I submitted this patch, there were no ifdefs, and you
> > stated that the additional 576 bytes text plus 136 bytes rodata was
> > unacceptable, so I rewrote the patch to add ifdefs everywhere.
> 
> The statement that triggered me was "Maybe relax that by a few 10s of
> bytes?", and my question was then ``how much is "a few 10s of bytes"''?
> 
> Obviously this must be something inbetween the 700+ bytes you state
> here, and the zero bytes you state elsewhere.
> 
> I wonder what exactly it was, then?

It could be anything.

There are many places in the patch where ifdefs are added. I think Simon's
comment was a general one that /some/ of those ifdefs (say the ones that
just add extra values in an if that checks an image header type) might
be candidates for not ifdefing. However, I don't believe it was targeted
at any one individual ifdef, or even a /specific/ set of ifdefs.

Hence, to answer the question of how many bytes we're talking about in
that case, either:

* Someone would have define exactly which specific set of ifdefs we want
to measure removing. It seems best for you to look at the patch and define
that set, since neither I nor Simon are currently pushing removing any of
the ifdefs.

Or:

* I'd have to build the code with every possible combination of each new
ifdef that was added being present or removed so that one of the builds I
do answers the undefined question you're asking; that's more building than
I'm willing to do.

-- 
nvpublic



More information about the U-Boot mailing list