linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: klondike <klondike@xiscosoft.net>
To: linux-kernel@vger.kernel.org
Cc: P J P <ppandit@redhat.com>, Paul Bolle <pebolle@tiscali.nl>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH v2 1/2] initramfs: allow again choice of the embedded compression algorithm
Date: Tue, 27 Sep 2016 21:30:20 +0200	[thread overview]
Message-ID: <57EAC8CC.3070602@klondike.es> (raw)
In-Reply-To: <54239E69.4050803@klondike.es>

[-- Attachment #1: Type: text/plain, Size: 1688 bytes --]

Select builtin initram compression algorithm on KConfig instead of Makefile

This patch moves the current builtin initram compression algorithm selection
from the Makefile into the INITRAMFS_COMPRESSION variable. This makes
deciding
algorithm precedence easier and would allow for overrides if new algorithms
want to be tested.

Signed-off-by: Francisco Blas Izquierdo Riera (klondike)
<klondike@klondike.es>
Cc: P J P <ppandit@redhat.com>
Cc: Paul Bolle <pebolle@tiscali.nl>
Cc: Andrew Morton <akpm@linux-foundation.org>
diff --git a/usr/Kconfig b/usr/Kconfig
index 572dcf7..bf8e8f1 100644
--- a/usr/Kconfig
+++ b/usr/Kconfig
@@ -98,3 +98,13 @@ config RD_LZ4
     help
       Support loading of a LZ4 encoded initial ramdisk or cpio buffer
       If unsure, say N.
+
+config INITRAMFS_COMPRESSION
+    string
+    default ".gz"   if RD_GZIP
+    default ".lz4"  if RD_LZ4
+    default ".lzo"  if RD_LZO
+    default ".xz"   if RD_XZ
+    default ".lzma" if RD_LZMA
+    default ".bz2"  if RD_BZIP2
+    default ""
diff --git a/usr/Makefile b/usr/Makefile
index e767f01..17a5132 100644
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -5,25 +5,7 @@
 klibcdirs:;
 PHONY += klibcdirs
 
-
-# Bzip2
-suffix_$(CONFIG_RD_BZIP2)  = .bz2
-
-# Lzma
-suffix_$(CONFIG_RD_LZMA)   = .lzma
-
-# XZ
-suffix_$(CONFIG_RD_XZ)     = .xz
-
-# Lzo
-suffix_$(CONFIG_RD_LZO)    = .lzo
-
-# Lz4
-suffix_$(CONFIG_RD_LZ4)    = .lz4
-
-# Gzip
-suffix_$(CONFIG_RD_GZIP)   = .gz
-
+suffix_y = $(CONFIG_INITRAMFS_COMPRESSION)
 AFLAGS_initramfs_data.o +=
-DINITRAMFS_IMAGE="usr/initramfs_data.cpio$(suffix_y)"
 
 # Generate builtin.o based on initramfs_data.o



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2016-09-27 19:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-25  4:47 [PATCH] initramfs: allow again choice of the embedded compression algorithm klondike
2014-09-29  8:08 ` P J P
2014-09-29 23:42   ` klondike
2016-09-27 19:30 ` klondike [this message]
2016-09-27 19:31   ` [PATCH v2 2/2] " klondike
2016-09-27 20:32   ` [PATCH v3 1/2] initramfs: Select builtin initram compression algorithm on KConfig instead of Makefile klondike
     [not found]   ` <57EAD3BC.9050802@klondike.es>
2016-09-27 20:32     ` [PATCH v3 2/2] initramfs: Allow again choice of the embedded initram compression algorithm klondike
2016-10-21 21:21       ` Andrew Morton
2016-10-21 21:29         ` Francisco Blas Izquierdo Riera (klondike)
2017-05-20 22:30       ` [v3, " Florian Fainelli
2017-05-21  2:48         ` Florian Fainelli

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=57EAC8CC.3070602@klondike.es \
    --to=klondike@xiscosoft.net \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pebolle@tiscali.nl \
    --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;
as well as URLs for NNTP newsgroup(s).