Reactivate '--chroot-filesystem plain'.

This previously undocumented value for '--chroot-filesystem' creates the
uncompressed folder 'live/filesystem.dir'.
This will speed up the generation of live images a lot, because the
squashfs compression is skipped.

Example command line:
  lb config -b hdd --chroot-filesystem plain --binary-filesystem ext4
This commit is contained in:
Roland Clobus 2022-01-17 15:33:48 +01:00
parent 2bfdb3cb44
commit 06ee64b16a
No known key found for this signature in database
GPG Key ID: 62C57C6AA61495BD
4 changed files with 18 additions and 6 deletions

View File

@ -675,7 +675,7 @@ Validate_config_permitted_values ()
done
fi
if ! In_list "${LB_CHROOT_FILESYSTEM}" ext2 ext3 ext4 squashfs jffs2 none; then
if ! In_list "${LB_CHROOT_FILESYSTEM}" ext2 ext3 ext4 squashfs jffs2 none plain; then
Echo_error "You have specified an invalid value for LB_CHROOT_FILESYSTEM (--chroot-filesystem)."
exit 1
fi

View File

@ -64,7 +64,7 @@
.br
[\fB\-\-checksums\fR md5|sha1|sha224|sha256|sha384|sha512|none]
.br
[\fB\-\-chroot\-filesystem\fR ext2|ext3|ext4|squashfs|jffs2|none]
[\fB\-\-chroot\-filesystem\fR ext2|ext3|ext4|squashfs|jffs2|none|plain]
.br
[\fB\-\-chroot\-squashfs\-compression\-level\fR LEVEL]
.br
@ -296,8 +296,8 @@ defines if downloaded packages files should be cached. This is true by default.
sets which stages should be cached (a comma or space separated list). By default this is set to 'bootstrap'. As an exception to the normal stage names, 'rootfs' can also be used here which means only cache the generated root filesystem in filesystem.{dir,ext*,squashfs}. This is useful during development if you want to rebuild the binary stage but not regenerate the root filesystem all the time.
.IP "\fB\-\-checksums\fR md5|sha1|sha224|sha256|sha384|sha512|none" 4
defines if the binary image should contain a file called XXXsums.txt, where XXX is one of the mentioned checksum types. This file lists all files on the image together with their checksums. This in turn can be used by \fIlive\-boot\fR(7)'s built\-in integrity\-check to verify the medium if specified at boot prompt. In general, this should not be 'none' and is an important feature of live system released to the public. However, during development of very big images it can save some time by not calculating the checksums.
.IP "\fB\-\-chroot\-filesystem\fR ext2|ext3|ext4|squashfs|jffs2|none" 4
defines which filesystem type should be used for the root filesystem image. If you use none, then no filesystem image is created and the root filesystem content is copied on the binary image filesystem as flat files. Depending on what binary filesystem you have chosen, it may not be possible to build with such a plain root filesystem, e.g. fat16/fat32 will not work as linux does not support running directly on them.
.IP "\fB\-\-chroot\-filesystem\fR ext2|ext3|ext4|squashfs|jffs2|none|plain" 4
defines which filesystem type should be used for the root filesystem image. If you use 'none' or 'plain', then no filesystem image is created and the root filesystem content is copied on the binary image filesystem as flat files. Depending on what binary filesystem you have chosen, it may not be possible to build with such a plain root filesystem, e.g. fat16/fat32 will not work as linux does not support running directly on them.
.IP "\fB\-\-chroot\-squashfs\-compression\-level\fR LEVEL" 4
defines the compression level that is used for the root filesystem image if squashfs is used. Each compression algorithm supports different levels (or none). You can look them up in the \fImksquashfs\fR help. Defaults to the default setting in \fImksquashfs\fR.
.IP "\fB\-\-chroot\-squashfs\-compression\-type\fR gzip|lzma|lzo|lz4|xz|zstd" 4

View File

@ -60,7 +60,7 @@ rm -rf chroot/chroot
rm -rf chroot.tmp
# Copying new chroot
if [ -d cache/bootstrap ] && [ "${LB_CHROOT_FILESYSTEM}" != "none" ] && [ "${LB_CHROOT_FILESYSTEM}" != "plain" ]
if [ -d cache/bootstrap ] && [ "${LB_CHROOT_FILESYSTEM}" != "none" ]
then
mv chroot chroot.tmp
cp -a cache/bootstrap chroot

View File

@ -239,7 +239,19 @@ case "${LB_CHROOT_FILESYSTEM}" in
case "${LB_BUILD_WITH_CHROOT}" in
true)
mv chroot/chroot binary/${INITFS}/filesystem.dir
if [ -e chroot/chroot.cache ]
then
# Different from the other LB_CHROOT_FILESYSTEM values:
# continue working in the bootstrap chroot, not the generated chroot.
# This saves the time to create a full copy of the generated chroot.
cp -a chroot/chroot/boot chroot
mv chroot/chroot binary/${INITFS}/filesystem.dir
else
rm -fr chroot/chroot
# Removing depends
Remove_packages
fi
;;
false)