All of lore.kernel.org
 help / color / mirror / Atom feed
From: Valentine Barshak <gvaxon@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] linux: Fix initramfs compression
Date: Mon, 08 Oct 2012 00:22:13 +0400	[thread overview]
Message-ID: <5071E475.5070908@gmail.com> (raw)
In-Reply-To: <50716829.7010004@mind.be>

On 10/07/2012 03:31 PM, Arnout Vandecappelle wrote:
> On 06/10/12 21:22, Valentine Barshak wrote:
>> -        $(call
>> KCONFIG_DISABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_NONE,$(@D)/.config)
>> -        $(call
>> KCONFIG_ENABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_GZIP,$(@D)/.config))
>> +        for c in GZIP BZIP2 LZMA XZ LZO; do \
>> +            if grep -qm1 "CONFIG_RD_$$c=y" $(@D)/.config; then \
>> +                $(call
>> KCONFIG_DISABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_NONE,$(@D)/.config); \
>> +                $(call
>> KCONFIG_ENABLE_OPT,CONFIG_INITRAMFS_COMPRESSION_$$c,$(@D)/.config); \
>> +                break; \
>> +            fi; \
>> +        done)
>
>   I think this is a bit too complex for something that won't really be
> used by
> most people.  Why not just remove the COMPRESSION lines from linux.mk?
> Then
> we fall back on the default if the user hasn't configured it
> explicitly.  Gives
> the user the possibility to choose something else than the default,
> without adding
> complexity to buildroot.

The problem here is that we can't set initramfs compression mode unless 
the initramfs source (CONFIG_INITRAMFS_SOURCE) is set. We can only set 
RAM disk compression modes that should be supported by the kernel 
(CONFIR_RD_...).

The source is set by buildroot. So the user has no capability to 
configure compression explicitly, unless he (she) sets a fake initramfs 
source file, which will be overridden by buildroot. IMHO, this is a bit 
hackish way to set anything other than default, which is COMPRESSION_NONE.

Yes, that is what most people want. I just didn't want to drop other 
options in case somebody wants a compressed initramfs image.
This could be needed for systems with low memory, for example.

>
>   Regards,
>   Arnout

Thanks,
Val.

  reply	other threads:[~2012-10-07 20:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-06 19:22 [Buildroot] [PATCH] linux: Fix initramfs compression Valentine Barshak
2012-10-07 11:31 ` Arnout Vandecappelle
2012-10-07 20:22   ` Valentine Barshak [this message]
2012-10-08  7:43     ` Arnout Vandecappelle
2012-10-09 22:44       ` Valentine Barshak

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=5071E475.5070908@gmail.com \
    --to=gvaxon@gmail.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.