All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: yann.morin.1998@free.fr, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2] imx/genimage: Place the rootfs at a proper offset when BR2_LINUX_KERNEL_INSTALL_TARGET=y
Date: Sun, 14 Nov 2021 15:15:48 +0100	[thread overview]
Message-ID: <20211114151548.79a357e8@windsurf> (raw)
In-Reply-To: <20211113214245.4067687-1-festevam@gmail.com>

On Sat, 13 Nov 2021 18:42:45 -0300
Fabio Estevam <festevam@gmail.com> wrote:

> Currently, when BR2_LINUX_KERNEL_INSTALL_TARGET=y is selected, issuing
> a "saveenv" command in the U-Boot prompt may lead to rootfs corruption.
> 
> When BR2_LINUX_KERNEL_INSTALL_TARGET is not selected, then
> board/freescale/common/imx/genimage.cfg.template is used as per the logic
> inside board/freescale/common/imx/post-image.sh.
> 
> board/freescale/common/imx/genimage.cfg.template correctly puts the
> rootfs at a safe offset.
> 
> With BR2_LINUX_KERNEL_INSTALL_TARGET=y, then
> board/freescale/common/imx/genimage.cfg.template_no_boot_part or
> board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl
> are used and no offset to the rootfs is given, which may cause U-Boot
> environment area to write into the rootfs area, causing the rootfs
> corruption.
> 
> Avoid this problem by placing the rootfs at an 8MB offset, just like
> it is done in board/freescale/common/imx/genimage.cfg.
> 
> Tested on a imx6qp-wandboard and also on a custom imx6ull based board.
> 
> "saveenv" does not corrupt the rootfs anymore after this change.
> 
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
> Changes since v1:
> - Improve commit log (Yann)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2021-11-14 14:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-13 21:42 [Buildroot] [PATCH v2] imx/genimage: Place the rootfs at a proper offset when BR2_LINUX_KERNEL_INSTALL_TARGET=y Fabio Estevam
2021-11-14 14:15 ` Thomas Petazzoni [this message]
2021-11-17 22:25 ` Peter Korsgaard

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=20211114151548.79a357e8@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@buildroot.org \
    --cc=festevam@gmail.com \
    --cc=yann.morin.1998@free.fr \
    /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.