From: Andrew Morton <akpm@linux-foundation.org>
To: P J P <ppandit@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] Export initial ramdisk compression config
Date: Mon, 23 Sep 2013 12:52:56 -0700 [thread overview]
Message-ID: <20130923125256.e53b51a137a19a972c6026a2@linux-foundation.org> (raw)
In-Reply-To: <alpine.LFD.2.03.1309151434580.7830@erqung.pbz>
On Sun, 15 Sep 2013 14:49:05 +0530 (IST) P J P <ppandit@redhat.com> wrote:
> Make menuconfig allows one to choose compression format of an
> initial ramdisk image. But this choice does not result in duly
> compressed ramdisk image. Because - $ make install - does not
> pass on the selected compression choice to the dracut(8) tool,
> which creates the initramfs file. dracut(8) generates the image
> with the default compression, ie. gzip(1).
>
> This patch exports the selected compression option to a sub-shell
> environment, so that it could be used by dracut(8) tool to generate
> appropriately compressed initramfs images.
>
> There isn't a straight forward way to pass on options to dracut(8)
> via positional parameters. Because it is indirectly invoked at the
> end of a $ make install sequence.
>
> # make install
> -> arch/$arch/boot/Makefile
> -> arch/$arch/boot/install.sh
> -> /sbing/installkernel ...
> -> /sbin/new-kernel-pkg ...
> -> /sbin/dracut ...
>
It's a bit confusing whether all this appiles to initrd, to initramfs
or to both. Can you please clarify all this and be sure that it's all
consistent?
> --- a/arch/x86/Makefile
> +++ b/arch/x86/Makefile
> @@ -11,6 +11,23 @@ else
> KBUILD_DEFCONFIG := $(ARCH)_defconfig
> endif
>
> +# Select initial ramdisk compression format, default is gzip(1).
> +# This shall be used by the dracut(8) tool while creating an initramfs image.
> +#
> +INITRD_COMPRESS=gzip
> +ifeq ($(CONFIG_RD_BZIP2), y)
> + INITRD_COMPRESS=bzip2
> +else ifeq ($(CONFIG_RD_LZMA), y)
> + INITRD_COMPRESS=lzma
> +else ifeq ($(CONFIG_RD_XZ), y)
> + INITRD_COMPRESS=xz
> +else ifeq ($(CONFIG_RD_LZO), y)
> + INITRD_COMPRESS=lzo
> +else ifeq ($(CONFIG_RD_LZ4), y)
> + INITRD_COMPRESS=lz4
> +endif
> +export INITRD_COMPRESS
A few things...
- Why is it specific to x86? Other architcetures use initramfs?
- People add new compression schemes fairly regularly. We should add
a code comment somewhere in a place where such people are sure to
find it. That comment should explain what's going on, remind them to
update this environment varlaible and should explain to them the
process by which they get dracut(8) updated if needed.
- Can we avoid having to update dracut each time a new compression
scheme is added? I assume your dracut changes will just exec
"$INITRD_COMPRESS -d", so as long as any new decompression
application uses the expected -d argument in the expected way, it
should work seamlessly?
next prev parent reply other threads:[~2013-09-23 19:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-15 9:19 P J P
2013-09-23 19:52 ` Andrew Morton [this message]
2013-09-24 19:41 ` P J P
2013-09-25 16:56 ` Rob Landley
2013-09-26 7:30 ` P J P
2013-10-09 21:48 ` Andrew Morton
2013-10-10 7:05 ` P J P
2013-10-10 14:43 ` P J P
2013-10-10 15:14 ` P J P
2013-09-30 21:41 ` P J P
2013-10-05 20:43 ` P J P
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=20130923125256.e53b51a137a19a972c6026a2@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ppandit@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®