[Buildroot] [PATCH 1/1] support/scripts/genimage.sh: allow setting rootpath from parameters.

Thomas Petazzoni thomas.petazzoni at bootlin.com
Wed Sep 18 08:42:23 UTC 2019


Hello Raphael,

On Tue,  3 Sep 2019 14:09:51 +0200
raphael.melotte at essensium.com wrote:

> From: Raphaël Mélotte <raphael.melotte at essensium.com>
> 
> Previously the rootpath was always set to $TARGET_DIR.
> This patch allows using other directories as rootpath.
> 
> When you use genimage's mountpoints to generate an image with
> multiple (non-empty) partitions, it does two things:
> - copy $TARGET_DIR to $GENIMAGE_TMP/root
> - move any mountpoint from GENIMAGE_TMP/root to $GENIMAGE_TMP/<mountpoint>
> 
> If you want to have an additional partition besides the rootfs, you
> will have to make sure it's content is in $TARGET_DIR so that genimage
> can find it.
> 
> If you also use rootfs generated by buildroot, you will end up
> with two copies of the mountpoint: once in the rootfs itself, and once
> in the partition using the mountpoint.

Thanks for your contribution. While I understand the issue, I am not
sure we want to extend support/scripts/genimage.sh for this.
support/scripts/genimage.sh is meant to be a simple wrapper to
genimage, for the simple cases.

For the more complicated cases, your post-image script should call the
genimage tool directly. support/scripts/genimage.sh was only added in
Buildroot to avoid duplicating for our zillion defconfigs the same
logic over and over again. I don't think it should be extended to cover
more complicated cases: such complicated cases should call genimage
directly.

Arnout, Peter, any feedback on this ? I see that Raphael works at
Essensium, so I would imagine that perhaps this contribution has been
discussed with you Arnout before it was posted ? Or maybe not.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


More information about the buildroot mailing list