From: Scott Wood <oss@buserror.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/7] spl: nand: support redundant u-boot image
Date: Fri, 03 Jun 2016 20:15:16 -0500 [thread overview]
Message-ID: <1465002916.22191.65.camel@buserror.net> (raw)
In-Reply-To: <1464780204-17737-4-git-send-email-boris.brezillon@free-electrons.com>
On Wed, 2016-06-01 at 13:23 +0200, Boris Brezillon wrote:
> On modern NAND it's more than recommended to have a backup copy of the
> u-boot binary to recover from corruption: bitflips are quite common on
> MLC NANDs, and the read-disturbance will corrupt your u-boot partitition
> more quickly than what you would see on an SLC NAND.
Wouldn't the same happen to the SPL itself? Or is the boot block implemented
in a different, more robust manner?
> Add an extra Kconfig option to specify the offset of the redundant u-boot
> image.
>
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> Acked-by: Hans de Goede <hdegoede@redhat.com>
> ---
> common/spl/spl_nand.c | 8 ++++++++
> drivers/mtd/nand/Kconfig | 6 ++++++
> 2 files changed, 14 insertions(+)
>
> diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c
> index 612bd4a..0bf0848 100644
> --- a/common/spl/spl_nand.c
> +++ b/common/spl/spl_nand.c
> @@ -12,6 +12,9 @@
>
> #ifndef CONFIG_SYS_NAND_U_BOOT_OFFS
> #define CONFIG_SYS_NAND_U_BOOT_OFFS CONFIG_SPL_NAND_U_BOOT_OFFS
> +#define CONFIG_SYS_NAND_U_BOOT_OFFS_REDUND
> CONFIG_SPL_NAND_U_BOOT_OFFS_REDUND
> +#else
> +#define CONFIG_SYS_NAND_U_BOOT_OFFS_REDUND CONFIG_SYS_NAND_U_BOOT_OFFS
> #endif
>
> #if defined(CONFIG_SPL_NAND_RAW_ONLY)
> @@ -111,6 +114,11 @@ int spl_nand_load_image(void)
> #endif
> /* Load u-boot */
> err = spl_nand_load_element(CONFIG_SYS_NAND_U_BOOT_OFFS, header);
> +#if CONFIG_SYS_NAND_U_BOOT_OFFS != CONFIG_SYS_NAND_U_BOOT_OFFS_REDUND
> + if (err)
> + err =
> spl_nand_load_element(CONFIG_SYS_NAND_U_BOOT_OFFS_REDUND,
> + header);
> +#endif
If one of the images has failed, doesn't it need to be reflashed before the
other one goes bad as well? How does the failure get communicated to later
parts of the system that would be responsible for such reflashing?
-Scott
next prev parent reply other threads:[~2016-06-04 1:15 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-01 11:23 [U-Boot] [PATCH v2 0/7] spl: nand: sunxi: implement auto-detection Boris Brezillon
2016-06-01 11:23 ` [U-Boot] [PATCH v2 1/7] spl: nand: sunxi: remove support for so-called 'syndrome' mode Boris Brezillon
2016-06-01 11:23 ` [U-Boot] [PATCH v2 2/7] spl: nand: rename the SYS_NAND_U_BOOT_OFFS Kconfig option Boris Brezillon
2016-06-04 1:08 ` Scott Wood
2016-06-04 6:06 ` Boris Brezillon
2016-06-04 7:14 ` Scott Wood
2016-06-04 11:06 ` Boris Brezillon
2016-06-06 17:16 ` Scott Wood
2016-06-06 18:40 ` Boris Brezillon
2016-06-01 11:23 ` [U-Boot] [PATCH v2 3/7] spl: nand: support redundant u-boot image Boris Brezillon
2016-06-04 1:15 ` Scott Wood [this message]
2016-06-04 6:15 ` Boris Brezillon
2016-06-04 7:17 ` Scott Wood
2016-06-01 11:23 ` [U-Boot] [PATCH v2 4/7] spl: nand: sunxi: stop guessing the redundant u-boot offset Boris Brezillon
2016-06-01 11:23 ` [U-Boot] [PATCH v2 5/7] spl: nand: sunxi: rework status polling loop Boris Brezillon
2016-06-01 11:23 ` [U-Boot] [PATCH v2 6/7] spl: nand: sunxi: split 'load page' and 'read page' logic Boris Brezillon
2016-06-01 11:23 ` [U-Boot] [PATCH v2 7/7] spl: nand: sunxi: add support for NAND config auto-detection Boris Brezillon
2016-06-01 12:35 ` [U-Boot] [linux-sunxi] " Siarhei Siamashka
2016-06-01 13:22 ` Boris Brezillon
2016-06-01 13:22 ` Maxime Ripard
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=1465002916.22191.65.camel@buserror.net \
--to=oss@buserror.net \
--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