[Buildroot] [PATCH] fs: allow extra arguments to common tarball extraction

Carlos Santos casantos at datacom.com.br
Sun Jun 10 23:48:34 UTC 2018


> From: "Yann Morin" <yann.morin.1998 at free.fr>
> To: "Arnout Vandecappelle" <arnout at mind.be>
> Cc: "DATACOM" <casantos at datacom.com.br>, "Thomas De Schampheleire" <thomas.de_schampheleire at nokia.com>, "buildroot"
> <buildroot at buildroot.org>
> Sent: Friday, June 8, 2018 6:06:41 PM
> Subject: Re: [Buildroot] [PATCH] fs: allow extra arguments to common tarball extraction

> Arnout, Carlos, All,
[...]
> And as an example of a split-var filesytem, see the attached br2-external
> tree. It ultimagtely creates $(BINARIES_DIR)/rootfs.meh, a squashfs
> image of /) and $(BINARIES_DIR)/rootfs.meh-var.tar, a tarball of /var.
> The only missing pieve is the runtime startup scripts that will format
> the on-board partition, extact /var.tar in there, and mount it.

Thanks for your example. I transformed it on an example of what I'm
attempting to achieve. Please use the contents of the attached file as
a br2_external and use the defconfig contained there; then run

    $ make rootfs-cpio rootfs-var-{lib,log}-ext4

It will create three image files files under $(BINARIES_DIR): rootfs.cpio,
rootfs.var-lib.ext4 and rootfs.var-log-ext4.

If you apply on buildroot the patch contained there the names will be
rootfs.cpio, rootfs-var-lib.ext4 and rootfs-var-log.ext4, which looks
better, IMO.

Extracting rootfs.common.tar for rootfs-var-log-ext4 is a waste of time
and disk space, since it creates an empty filesystem. Perhaps we could
add a BR2_TARGET_ROOTFS_<FOO>_START_EMPTY knob for filesystems that
populate $(TARGET_DIR) by themselves.

The example does not install a /etc/fstab with entries for /var/lib and
/var/log but of it would be necessary in a real system, of course.

-- 
Carlos Santos (Casantos) - DATACOM, P&D
“Marched towards the enemy, spear upright, armed with the certainty
that only the ignorant can have.” — Epitaph of a volunteer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: br2-multi-fs.tar.xz
Type: application/x-xz-compressed-tar
Size: 3780 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180610/2beefde8/attachment.bin>


More information about the buildroot mailing list