Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Fabio Estevam <festevam@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	buildroot <buildroot@buildroot.org>
Subject: Re: [Buildroot] [PATCH RESEND] imx/genimage: Place the rootfs at a proper offset when BR2_LINUX_KERNEL_INSTALL_TARGET=y
Date: Sat, 13 Nov 2021 22:09:11 +0100	[thread overview]
Message-ID: <20211113210911.GV247986@scaer> (raw)
In-Reply-To: <20211113210219.GU247986@scaer>

Fabio, All,

On 2021-11-13 22:02 +0100, Yann E. MORIN spake thusly:
> On 2021-11-13 15:11 -0300, Fabio Estevam spake thusly:
> > On Sat, Nov 13, 2021 at 2:06 PM Thomas Petazzoni
> > <thomas.petazzoni@bootlin.com> wrote:
> > > I don't see the relationship between BR2_LINUX_KERNEL_INSTALL_TARGET=y
> > > and changing the offset of the rootfs to avoid 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 is 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.
> 
> Ah, that indeed explains the case. This type of exp[lanations definitely
> should be in the commit log.
> 
> However, please not that there are two cases for

s/not/note/

> BR2_LINUX_KERNEL_INSTALL_TARGET=y:
> 
>     if grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then
>         echo "genimage.cfg.template_no_boot_part_spl"
>     else
>         echo "genimage.cfg.template_no_boot_part"
>     fi
> 
> And this patch only addresses the second one.

Of course, I checked the case where we do not put the kernel in target/,
and both the SPL and non-SPL cases do have an 8MiB offset for the 'boot'
partition...

Regards,
Yann E. MORIN.

> Could you respin, fixing the second template, and including these
> extended explanations in the commit log, please?
> 
> Regards,
> Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      reply	other threads:[~2021-11-13 21:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-13 14:38 [Buildroot] [PATCH RESEND] imx/genimage: Place the rootfs at a proper offset when BR2_LINUX_KERNEL_INSTALL_TARGET=y Fabio Estevam
2021-11-13 17:06 ` Thomas Petazzoni
2021-11-13 18:11   ` Fabio Estevam
2021-11-13 21:02     ` Yann E. MORIN
2021-11-13 21:09       ` Yann E. MORIN [this message]

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