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

Carlos Santos unixmania at gmail.com
Sun Sep 22 00:55:19 UTC 2019


On Wed, Sep 18, 2019 at 5:42 AM Thomas Petazzoni
<thomas.petazzoni at bootlin.com> wrote:
>
> 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

Currently there are thirty board/*/post-image.sh files. Twenty of them
are variants of genimage.sh and three of them call it so I believe
that a more versatile genimage.sh would reduce some code duplication.

Just my 2¢.

-- 
Carlos Santos <unixmania at gmail.com>



More information about the buildroot mailing list