[Buildroot] [PATCH RESEND] imx/genimage: Place the rootfs at a proper offset when BR2_LINUX_KERNEL_INSTALL_TARGET=y

Fabio Estevam festevam at gmail.com
Sat Nov 13 18:11:43 UTC 2021


Hi Thomas,

On Sat, Nov 13, 2021 at 2:06 PM Thomas Petazzoni
<thomas.petazzoni at 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.
>
> All what BR2_LINUX_KERNEL_INSTALL_TARGET=y does it add the kernel image
> into the /boot directory of the rootfs. It makes the rootfs larger for
> sure, but it would still start at the same place.
>
> Are you sure there's any relationship with
> BR2_LINUX_KERNEL_INSTALL_TARGET=y here?

Yes, this problem only happens with BR2_LINUX_KERNEL_INSTALL_TARGET=y.

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.

Please let me know if you need more information as this problem is
easy to reproduce.

Regards,

Fabio Estevam


More information about the buildroot mailing list