All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/4] fs/common.mk: support lz4 compression
Date: Sun, 15 Oct 2017 22:45:35 +0200	[thread overview]
Message-ID: <87shekw368.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <20171015130545.GB2918@scaer> (Yann E. MORIN's message of "Sun, 15 Oct 2017 15:05:45 +0200")

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

Hi,

 >> > Indeed. It does not make sense to get a compressedd ext2/3/4 (or
 >> > whatever other uncompressed filesystem). That is semantically useless.
 >> 
 >> I agree that we would most likely not introduce such options today, but
 >> they have been supported for a very long time. I have personally used
 >> the .gz option to save archival disk space for buildbot, so they are not
 >> completely useless ;)

 > But since the filesystem infra does not get rid of the uncompresed
 > image, surely you have a post-image (or post-buildroot) script that gets
 > rid of the uncompressed stuff, don't you? In which case that archival
 > script could very well be the one doing the compresion...

Correct. This was just a (poor) example where I personally have used the
option.


 > And Buildroot should not be concerned about the archiving requirements
 > of the users: there will be almost as many such archiving requirements
 > as there are users.

 >> It is not completely semantically useless as it can be used for
 >> old-style initrds (but yeah, using an initramfs makes more sense).

 > The external initrd is what I was talking about below, yes.

Ok. Keep in mind that there's 3 variants:

- Initramfs built into the kernel
- External initramfs (separate cpio archive)
- External initrd (filesystem image, E.G. extN)


 >> You are missing the external initramfs usecase (E.G. not built into the
 >> kernel) - How just about all PC distributions boot. This usecase
 >> probably doesn't make much sense for Buildroot, but such a setup does
 >> make sense when you use a dm-verity / dm-crypt rootfs and need to mount
 >> it in the initramfs.
 >> 
 >> For thes use cases, the compression options IMHO makes sense.

 > Well, the compression is indeed only valid when using an initrd (cpio,
 > ext, whatev') or an external initramfs.

 > But again, I still think that it's better to offload that to an external
 > script.

Tradeoffs, a script is more flexible, but an option is more user friendly.


 >> In concept I agree, but you could use that logic on a lot of the things
 >> Buildroot does. We have supported these options for a very long time,
 >> and they imho add very little complexity, so I suggest we keep them for
 >> compatibility reasons.

 > Well, we historically had support for the toolchain on the target as
 > well, but we did eventually get rid of it! ;-)

The reason why we got rid of it was that it was hard to test, nontrivial
to maintain and against the philosophy of Buildroot (cross compilation).

I don't think those things really applies here. Sure, it could be done
by a script, but so could E.G. the root password option, remount rw,
purge locales, ..


 >> Regarding the question of if we should add lz4 as well.  I'm fairly
 >> pragmatic about it. Most likely other people may also want it, so either
 >> we add it or create a visible (Config.in.host) host package so it can be
 >> used from post-image scripts.
 >> 
 >> For consistency I would prefer to add it to the compression options.

 > Note: I am not arguing against adding lz4. I'm arguing against keeping
 > the compresion options altogether. Slight difference.

I understand that.


 > What I find cumbersome to maintain is the duplication of compression
 > lists in each filesystem types.

I agree that it isn't very nice, but we only rarely add new filesystem
types or compression algorithms (and if we do, the patches are trivial
as this lz4 series).


 > Maybe a middle ground would be to remove all the compression options,
 > and move them to the top-level filesystem menu, something like:

 >     Image compression:
 >       (X) none
 >       ( ) gzip
 >       ( ) bzip2
 >       ( ) xz
 >       ( ) lzo
 >       ( ) lz4
 >       ( ) lzp

 > With this help text:

 >     For filesystems that inherently do not support compression
 >     (e.g. ext2, cpio, tarball...), compress them with this
 >     compresion algorithm (using the default compression level)

 >     Filesystem that already support internal compression (e.g.
 >     squashfs, cramfs...) are not impacted by this option.

Hmm, I don't really like this. It still breaks the build for existing
users, and it doesn't really simplify anything in our infrastructure
(except for a few Config.in entries).

-- 
Bye, Peter Korsgaard

  reply	other threads:[~2017-10-15 20:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-13 19:16 [Buildroot] [PATCH 1/4] fs/common.mk: support lz4 compression Peter Korsgaard
2017-10-13 19:16 ` [Buildroot] [PATCH 2/4] fs/cpio: add option for " Peter Korsgaard
2017-10-13 19:16 ` [Buildroot] [PATCH 3/4] fs/ext2: " Peter Korsgaard
2017-10-13 19:16 ` [Buildroot] [PATCH 4/4] fs/tar: " Peter Korsgaard
2017-10-13 22:05 ` [Buildroot] [PATCH 1/4] fs/common.mk: support " Thomas Petazzoni
2017-10-14  7:32   ` Yann E. MORIN
2017-10-15  9:03     ` Peter Korsgaard
2017-10-15 13:05       ` Yann E. MORIN
2017-10-15 20:45         ` Peter Korsgaard [this message]
2018-01-08 22:46 ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87shekw368.fsf@dell.be.48ers.dk \
    --to=peter@korsgaard.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.