All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joel Stanley <joel@jms.id.au>
To: "Cédric Le Goater" <clg@kaod.org>, openbmc@lists.ozlabs.org
Subject: Re: [PATCH uboot v2016.05-aspeed-openbmc 8/9] aspeed/ast-g4: add a force saveenv config
Date: Thu, 30 Jun 2016 16:41:18 +0930	[thread overview]
Message-ID: <1467270678.6386.30.camel@jms.id.au> (raw)
In-Reply-To: <1467216591-8616-9-git-send-email-clg@kaod.org>

On Wed, 2016-06-29 at 18:09 +0200, Cédric Le Goater wrote:
> That was a feature in the previous Aspeed branch which is was left
> out
> in the v2016.05 port. So let's use the new aspeed Kconfig to add it.

What does this gain us?

On a boot with an invalid set of settings, we use the defaults anyway.

Cheers,

Joel

> 
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> ---
>  arch/arm/Kconfig     | 1 +
>  board/aspeed/Kconfig | 6 ++++++
>  common/env_common.c  | 3 +++
>  3 files changed, 10 insertions(+)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index bfbeb4842380..b2c19b912834 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -756,6 +756,7 @@ config TARGET_WITHERSPOON_BMC
>  config TARGET_AST_G4
>         bool "Support ast2400"
>         select CPU_ARM926EJS
> +       select ASPEED_WRITE_DEFAULT_ENV
>  
>  endchoice
>  
> diff --git a/board/aspeed/Kconfig b/board/aspeed/Kconfig
> index a92b9bc0c934..fca65d0206f6 100644
> --- a/board/aspeed/Kconfig
> +++ b/board/aspeed/Kconfig
> @@ -1,3 +1,9 @@
> +config ASPEED_WRITE_DEFAULT_ENV
> +       bool "force  write of default environment"
> +       help
> +	 when the environment CRC is bad, force a saveenv to update
> +	 the flash with a sane default environment
> +
>  source "board/aspeed/ast-g5/Kconfig"
>  source "board/aspeed/ast-g4/Kconfig"
>  source "board/aspeed/witherspoon-bmc/Kconfig"
> diff --git a/common/env_common.c b/common/env_common.c
> index af59c72e1fd7..5d6aac551b26 100644
> --- a/common/env_common.c
> +++ b/common/env_common.c
> @@ -262,6 +262,9 @@ void env_relocate(void)
>  #else
>  		bootstage_error(BOOTSTAGE_ID_NET_CHECKSUM);
>  		set_default_env("!bad CRC");
> +#ifdef CONFIG_ASPEED_WRITE_DEFAULT_ENV
> +		saveenv();
> +#endif
>  #endif
>  	} else {
>  		env_relocate_spec();

  reply	other threads:[~2016-06-30  7:11 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-29 16:09 [PATCH uboot v2016.05-aspeed-openbmc 0/9] aspeed: fixes and cleanups Cédric Le Goater
2016-06-29 16:09 ` [PATCH uboot v2016.05-aspeed-openbmc 1/9] net: aspeednic: Create aspeed_write_hwaddr from set_mac_address Cédric Le Goater
2016-06-29 16:09 ` [PATCH uboot v2016.05-aspeed-openbmc 2/9] net: aspeednic: Do not start hardware in initialize Cédric Le Goater
2016-06-29 16:09 ` [PATCH uboot v2016.05-aspeed-openbmc 3/9] net: aspeednic: Do not fill in a random MAC address Cédric Le Goater
2016-06-29 16:09 ` [PATCH uboot v2016.05-aspeed-openbmc 4/9] net/aspeednic: start mac after ring buffers are initialized Cédric Le Goater
2016-06-30  7:13   ` Joel Stanley
2016-06-29 16:09 ` [PATCH uboot v2016.05-aspeed-openbmc 5/9] aspeed/ast-g4: select the correct cpu Cédric Le Goater
2016-06-30  7:14   ` Joel Stanley
2016-06-29 16:09 ` [PATCH uboot v2016.05-aspeed-openbmc 6/9] aspeed/ast-g4: use literal defines in misc_init_r() Cédric Le Goater
2016-06-30  7:16   ` Joel Stanley
2016-06-29 16:09 ` [PATCH uboot v2016.05-aspeed-openbmc 7/9] aspeed: add a common Kconfig file for Aspeed boards Cédric Le Goater
2016-06-30  7:17   ` Joel Stanley
2016-06-29 16:09 ` [PATCH uboot v2016.05-aspeed-openbmc 8/9] aspeed/ast-g4: add a force saveenv config Cédric Le Goater
2016-06-30  7:11   ` Joel Stanley [this message]
2016-06-30 16:32     ` Cédric Le Goater
2016-06-29 16:09 ` [PATCH uboot v2016.05-aspeed-openbmc 9/9] ast-g4/g5: large cleanup Cédric Le Goater
2016-06-30  6:29   ` Joel Stanley
2016-06-30  7:46     ` Cédric Le Goater
2016-06-30  8:34       ` Cédric Le Goater
2016-06-30 16:38         ` Cédric Le Goater
2016-07-01  7:06           ` Joel Stanley

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=1467270678.6386.30.camel@jms.id.au \
    --to=joel@jms.id.au \
    --cc=clg@kaod.org \
    --cc=openbmc@lists.ozlabs.org \
    /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.