From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH] env: env_sf: don't set .init op if not needed
Date: Fri, 6 Nov 2020 15:45:57 -0500 [thread overview]
Message-ID: <20201106204557.GG5340@bill-the-cat> (raw)
In-Reply-To: <ac9500de-d236-be83-04a8-8f68be1c7672@prevas.dk>
On Fri, Nov 06, 2020 at 08:46:27AM +0100, Rasmus Villemoes wrote:
> On 05/11/2020 17.40, Wolfgang Denk wrote:
> > Dear Rasmus,
> >
> > In message <8ff3b8ad-8c4e-fe99-69c8-7c174e997a49@prevas.dk> you wrote:
> >>
> >>>> Not in a none standard way! Instead you can define more than one
> >>>> environment storage devices and load them in a board specific order
> >>>> (defined thorugh board specfif function env_get_location())
> >>>
> >>> Yes, agreed. But this logically impossible if there is no storage
> >>> at all, which is what CONFIG_ENV_IS_NOWHERE says.
> >>
> >> Then should all the current config options CONFIG_ENV_IS_ be renamed to
> >> CONFIG_ENV_MAY_BE_? Because that's really what they mean.
> >
> > This is not correct.
> >
> > The CONFIG_ENV_IS_FOO means: if you use "env save", then U-Boot will
> > write the config to external storage using the FOO storage device.
>
> Wolfgang, you're wrong. What you're saying was once true, when the
> location was a "choice" in Kconfig, but it hasn't been that since
> fb69464eae. Nowadays one can select multiple possible backends, and only
> one of them will be used when doing "env save".
>
> Later (208bd2b8), _NOWHERE was made non-mutually-exclusive with the real
> storage targets.
Yes. It's intentional that "NOWHERE" means that if this is our run-time
location for the environment, then you cannot save the environment. But
since we finally implemented the ability to have more than one option
enabled and pick the correct one at run time, we build both "mmc" and
"nowhere".
> > If you define CONFIG_ENV_IS_NOWHERE, I would for example expect that
> > all "env save" related code is omitted as we will never need it.
>
> I haven't checked, but that functionality does seem to exist - not
> depending on whether CONFIG_ENV_IS_NOWHERE is not selected, but whether
> any of the CONFIG_ENV_IS_<somehere> is. See the ENV_IS_IN_DEVICE logic
> in cmd/nvedit.c. So if you select CONFIG_ENV_IS_NOWHERE and not any of
> the others, I think the build works as you'd expect.
So, CMD_SAVEENV exists. If you don't enable that, I would expect
save-related code that can be garbage collected to be discarded. It's
unclear without further digging if there's code that could be discarded
that is not, but checking the map file for a "nowhere" only build would
probably be somewhat instructive.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20201106/b4a1c4be/attachment.sig>
next prev parent reply other threads:[~2020-11-06 20:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-01 13:38 [PATCH] env: env_sf: don't set .init op if not needed Michael Walle
2020-11-02 7:00 ` Heiko Schocher
2020-11-02 12:51 ` Wolfgang Denk
2020-11-03 5:15 ` Heiko Schocher
2020-11-03 7:52 ` Wolfgang Denk
2020-11-03 9:42 ` Rasmus Villemoes
2020-11-05 16:40 ` Wolfgang Denk
2020-11-06 7:46 ` Rasmus Villemoes
2020-11-06 20:45 ` Tom Rini [this message]
2020-11-08 13:25 ` Wolfgang Denk
2020-11-08 13:22 ` Wolfgang Denk
2020-11-02 20:15 ` Michael Walle
2020-11-03 4:40 ` Heiko Schocher
2020-11-03 12:30 ` 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=20201106204557.GG5340@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox