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

Raphaël Mélotte raphael.melotte at essensium.com
Mon Sep 23 07:44:13 UTC 2019


Hello Thomas,

On 9/18/19 10:42 AM, Thomas Petazzoni wrote:
> 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.

Thanks for your feedback :-)

We indeed discussed it briefly together with Arnout, and one of the points was that the current value for the rootpath option does not make a lot of sense (but then, after thinking about it, choosing a better default value would probably be better than keeping the current one and making it customizable).

The problem is that if you make any use of the current rootpath option by adding a (non-empty) partition, it will contain data that is already contained in the rootfs generated by Buildroot (if you choose to use it) which is a bit confusing for users.

You could choose to not use the Buildroot-generated rootfs and use only genimage, but then you lack the fixes that are applied to the rootfs (changing ownership, setting special attributes, ...) and your rootfs will be unusable.

Also, I agree with your point about keeping genimage.sh for the simple cases, but I don't think the cases where you would want to make use of rootpath are that complex: it could be for example that you want to use the default configuration for the board, but you just want to add a (non-empty) data partition next to the rootfs.

However, if it didn't come up before, maybe it's not used as much as I would have thought...


Kind regards,

Raphaël



More information about the buildroot mailing list