From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Date: Wed, 18 Sep 2019 10:42:23 +0200 Subject: [Buildroot] [PATCH 1/1] support/scripts/genimage.sh: allow setting rootpath from parameters. In-Reply-To: <20190903120951.3318-1-raphael.melotte@essensium.com> References: <20190903120951.3318-1-raphael.melotte@essensium.com> Message-ID: <20190918104223.2222432b@windsurf> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net Hello Raphael, On Tue, 3 Sep 2019 14:09:51 +0200 raphael.melotte at essensium.com wrote: > From: Rapha?l M?lotte > > 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/ > > 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