public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Bernhard Nortmann <bernhard.nortmann@web.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH 1/2] sunxi: retrieve FEL-provided values to environment variables
Date: Fri, 11 Sep 2015 11:08:28 +0200	[thread overview]
Message-ID: <55F29A0C.2070900@web.de> (raw)
In-Reply-To: <55F1CD2C.9080803@redhat.com>

Hi Hans!

Am 10.09.2015 um 20:34 schrieb Hans de Goede:
>
> What if the user interrupts auto-boot with a fel provided boot.scr
> and then does "saveenv" ?
>
> Then we end up with a fel_data_addr and fel_data_size permanently
> in the env.
>
> At a minimum this function must always do:
>
> setenv("fel_data_addr", NULL);
> setenv("fel_data_size", NULL);
>
> (rather then only when we've a spl fel header but no addr / size)
>
> So that we do not end up trying to interpret old values ever.

Good point.

>
> Ideally though we would find another way not involving putting these
> in the environment (not sure if that is easily doable).

I also have no idea how to achieve that, especially if we want to keep
the FEL case "in line" with other, more conventional ways of booting.

> Maybe clear all env variables here?
>
> Or even better clear them all unconditionally, and then set
> them when the checks succeed ?
>

That's something that may be best aligned somehow with the NAND and
MMC boot handling, if possible? I.e. have some centralized piece of
code that determines the active boot method and retrieves/presets the
environments accordingly. I'll have to re-examine that more closely.

Regards, B. Nortmann

  reply	other threads:[~2015-09-11  9:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-03 14:11 [U-Boot] [RFC PATCH 0/2] sunxi: support FEL-provided environment vars and "fel" boot target Bernhard Nortmann
2015-09-03 14:11 ` [U-Boot] [RFC PATCH 1/2] sunxi: retrieve FEL-provided values to environment variables Bernhard Nortmann
2015-09-10 18:34   ` Hans de Goede
2015-09-11  9:08     ` Bernhard Nortmann [this message]
2015-09-12 11:58     ` Ian Campbell
2015-09-12 12:24       ` Hans de Goede
2015-09-14 13:12         ` Bernhard Nortmann
2015-09-03 14:12 ` [U-Boot] [RFC PATCH 2/2] sunxi: add "fel" boot target Bernhard Nortmann
2015-09-10 18:36   ` Hans de Goede
2015-09-11  9:31     ` Bernhard Nortmann
2015-09-12 12:48       ` Hans de Goede
2015-09-13  7:15         ` Ian Campbell
2015-09-14 10:33       ` Siarhei Siamashka
2015-09-14 11:42         ` Hans de Goede
2015-09-14 11:46           ` Hans de Goede
2015-09-26 21:03             ` Siarhei Siamashka

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=55F29A0C.2070900@web.de \
    --to=bernhard.nortmann@web.de \
    --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