public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot, v2] env: don't generate callback list entries for SPL
Date: Fri, 8 Mar 2013 15:59:47 -0500	[thread overview]
Message-ID: <513A5143.5030609@ti.com> (raw)
In-Reply-To: <1362774853.29198.2@snotra>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/08/2013 03:34 PM, Scott Wood wrote:
> On 03/08/2013 02:27:48 PM, Tom Rini wrote:
>> On Thu, Dec 20, 2012 at 11:51:05AM -0000, Scott Wood wrote:
>> 
>>> SPL doesn't write to the environment.  These list entries 
>>> prevent the functions from being garbage-collected, even
>>> though nothing will
>> look at
>>> the list.  This caused several SPL builds (e.g. 
>>> P2020RDB-PC_NAND) to break due to size limitations and/or 
>>> unresolved symbols.
>>> 
>>> A static inline function is used to provide a context in which 
>>> we can consume the callback, and thus avoid unused function 
>>> warnings.
>>> 
>>> Signed-off-by: Scott Wood <scottwood@freescale.com> Acked-by: 
>>> Joe Hershberger <joe.hershberger@gmail.com> Acked-by: Kim 
>>> Phillips <kim.phillips@freescale.com>
>> 
>> OK, this isn't quite right. On am335x_evm where SPL does use the 
>> "full" version of the environment, rather than the restricted 
>> version that say a3m071 we need these these callbacks to be 
>> generated.  We usually build successfully since in these cases 
>> our #include of <u-boot.lst> picks up the one in include that the
>> main SPL generates.   But with enough cores we build SPL before
>> we build this list for non-SPL, and the build fails.  I shall
>> submit a patch shortly for this.
> 
> What does am335x_evm do in the SPL that requires modifying the 
> environment, and how does omitting the callbacks cause a build 
> break?

It requires the full network stack which in turn means we can't just
discard most of the environment related functions.  And some parts of
the callback infrastructure aren't opt-in'able.

> The u-boot.lst issue sounds unrelated to this patch.

The problem is undefined references at link time to
_u_boot_env_clbk__start/__end from common/env_callbacks.c where it
tries to look at our empty list of callbacks (we are able to discard
all of those).  And part of the issue is that we're always using the
wrong u-boot.lst file for SPL.  It's just that in most cases the wrong
one (the main U-Boot one) is also fine enough for SPL since it's just
a few extra symbols and we aren't so constrained for space that we've
noticed.

- -- 
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJROlFDAAoJENk4IS6UOR1WEvwQAJtEjtnUs/Zu38rQ5oFV/W2V
a/MX3hTmFF1bhJ9oiP52j1liB/V+hLCAhzveGllWLnvICFvv6F5nFrDwhhlUIRkX
ZC99JvkYFHbQexnpwWqwR35reXsQWIhISLN9yeKtQ3GF0b9nztIXARLwpcLRJp95
fctdiTPrWi/jqLsmX63BkQyhbfpc5ltgDu1kn7PQSgzDt49OJUlqvMrMGM9xY98h
wfKkuUE8Ez4Xq9rsTwa21oECEcgNRuAbsHyePMyuNeVuSfyjwin4d8y3xK7H0Kp5
Z12tnSNet4G4e06Hz+NRdpEa6DqSbyvQpX8rhctEYBxEaA/VpGUIFrrUOEa8jdDh
J49/rF8xhYBTeKfpbYrfCS5iQUKnuJxGW7+2PYH8+y1RxQdLkkhuJdQVoAJ4cNsL
HP3AeoI7Urc7QYVINyBNCG8Ak6/skDI9Ia6eFqJbNm1X0jDnvV6wh1JoK0lxgJio
Uw2NdFIlIHUMHAGMW8R/Zj1eCqaLkwWtTRPqgENPwcOtTdaf/Y/57R2yYRDvz52l
Dl9AikeDu8tr0y431b3WJo5aXi5XXAeQiEJzWj48nExSv29fh48gc3IEVO6+Xnnp
2tQbUarWwoptp1QALmuMJlPeIdfGNg1/AoQeise8WtoS0GSl868QG+NJVpmKhEl+
GYiBfxNk+pGlJZmRjHhQ
=Bx5L
-----END PGP SIGNATURE-----

  reply	other threads:[~2013-03-08 20:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-20 21:51 [U-Boot] [PATCH v2] env: don't generate callback list entries for SPL Scott Wood
2012-12-20 22:49 ` Kim Phillips
2012-12-22 15:19   ` Tom Rini
2013-03-08 20:27 ` [U-Boot] [U-Boot, " Tom Rini
2013-03-08 20:34   ` Scott Wood
2013-03-08 20:59     ` Tom Rini [this message]
2013-03-09  0:35       ` Scott Wood
2013-03-12 15:30         ` Tom Rini
2013-03-12 16:55           ` Scott Wood
2013-03-12 17:02             ` Tom Rini
2013-03-12 17:06               ` Scott Wood
2013-03-12 17:19                 ` Albert ARIBAUD
2013-03-12 17:47                   ` Tom Rini
2013-03-12 22:07                     ` Albert ARIBAUD
2013-03-13 18:40                       ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=513A5143.5030609@ti.com \
    --to=trini@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox