Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1492144

[PATCH v3 1/2] initramfs: Select builtin initram compression algorithm on KConfig instead of Makefile

From klondike <klondike@klondike.es>
Newsgroups linux.kernel
Subject [PATCH v3 1/2] initramfs: Select builtin initram compression algorithm on KConfig instead of Makefile
Date 2016-09-27 22:40 +0200
Message-ID <sm7kt-5JY-3@gated-at.bofh.it> (permalink)
References <o49a9-8kJ-5@gated-at.bofh.it> <sm6oq-58G-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
I'm sorry for the noise. I'm resending this as a new version because
Thunderbird likes to word wrap things it shouldn't be word wrapping.
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

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 1/2] initramfs: allow again choice of the embedded  compression algorithm klondike <klondike@klondike.es> - 2016-09-27 21:40 +0200
  [PATCH v2 2/2] initramfs: allow again choice of the embedded  compression algorithm klondike <klondike@klondike.es> - 2016-09-27 21:40 +0200
  [PATCH v3 1/2] initramfs: Select builtin initram compression  algorithm on KConfig instead of Makefile klondike <klondike@klondike.es> - 2016-09-27 22:40 +0200
  [PATCH v3 2/2] initramfs: Allow again choice of the embedded initram  compression algorithm klondike <klondike@klondike.es> - 2016-09-27 22:40 +0200

csiph-web