All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH] env: another attempt at fixing SPL build failures
Date: Thu, 23 Jan 2020 16:58:08 -0500	[thread overview]
Message-ID: <20200123215808.GG26536@bill-the-cat> (raw)
In-Reply-To: <20191215222928.15321-1-rasmus.villemoes@prevas.dk>

On Sun, Dec 15, 2019 at 10:29:39PM +0000, Rasmus Villemoes wrote:

> I'm also seeing the build failure that commit
> 
> 7d4776545b env: solve compilation error in SPL
> 
> tried to fix, namely that the reference to env_flags_validate from
> env_htab cannot be satisfied when flags.o is not built in. However,
> that commit got reverted by
> 
> d90fc9c3de Revert "env: solve compilation error in SPL"
> 
> Necessary, but not sufficient conditions to see this are
> 
> CONFIG_SPL=y (obviously)
> CONFIG_SPL_ENV_SUPPORT=n (so flags.o does not get compiled)
> CONFIG_SPL_LIBCOMMON_SUPPORT=y (so env/built-in.o is part of the SPL link)
> 
> Now, these are satisfied for e.g. imx6q_logic_defconfig. But that
> builds just fine, and spl/u-boot-spl.map lists .data.env_htab among
> the discarded (garbage collected) sections. Yet, on our
> mpc8309-derived board, we do see the build failure, so perhaps the
> linker works a bit differently on ppc than on ARM, or there's yet some
> other configuration option needed to observe the break.
> 
> This is another attempt at solving it, which also cleans up
> env/Makefile a bit: Introduce a def_bool y symbol CONFIG_ENV_SUPPORT
> which complements CONFIG_(SPL/TPL)_SUPPORT. Then use
> CONFIG_$(SPL_TPL_)ENV_SUPPORT to decide whether to include the five
> basic env/*.o files. For attr.o, flags.o and callback.o, this
> shouldn't change anything. Also, common.o and env.o still get
> unconditionally built for U-boot proper. But for TPL/SPL, those two
> are only included if CONFIG_(SPL/TPL)_SUPPORT is set.
> 
> Having that symbol should also allow simplifying conditionals such as
> 
> #if !defined(CONFIG_SPL_BUILD) || CONFIG_IS_ENABLED(ENV_SUPPORT)
> 
> found in drivers/reset/reset-socfpga.c to just
> CONFIG_IS_ENABLED(ENV_SUPPORT).
> 
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>

Applied to u-boot/master, thanks!

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

      parent reply	other threads:[~2020-01-23 21:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-15 22:29 [PATCH] env: another attempt at fixing SPL build failures Rasmus Villemoes
2020-01-10 14:28 ` Rasmus Villemoes
2020-01-10 14:34   ` Tom Rini
2020-01-11 22:44     ` Rasmus Villemoes
2020-01-12 20:23       ` Rasmus Villemoes
2020-01-22 19:03         ` Tom Rini
2020-01-23 21:58 ` Tom Rini [this message]

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=20200123215808.GG26536@bill-the-cat \
    --to=trini@konsulko.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.