From 73d8a12f05292d86623b4ec7bf5fd75d5ad5f687 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Sat, 28 Mar 2009 15:49:08 -0700 Subject: bzip2/lzma: move CONFIG_RD_* options under CONFIG_EMBEDDED Impact: reduce Kconfig noise Move the options that control possible initramfs/initrd compressions underneath CONFIG_EMBEDDED. The only impact of leaving these options set to y is additional code in the init section of the kernel; there is no reason to burden non-embedded users with these options. Signed-off-by: H. Peter Anvin --- usr/Kconfig | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/usr/Kconfig b/usr/Kconfig index 43a3a0fe8f2..5166078d45f 100644 --- a/usr/Kconfig +++ b/usr/Kconfig @@ -46,27 +46,27 @@ config INITRAMFS_ROOT_GID If you are not sure, leave it set to "0". config RD_GZIP - bool "Initial ramdisk compressed using gzip" + bool "Initial ramdisk compressed using gzip" if EMBEDDED default y - depends on BLK_DEV_INITRD=y + depends on BLK_DEV_INITRD select DECOMPRESS_GZIP help Support loading of a gzip encoded initial ramdisk or cpio buffer. If unsure, say Y. config RD_BZIP2 - bool "Initial ramdisk compressed using bzip2" - default n - depends on BLK_DEV_INITRD=y + bool "Initial ramdisk compressed using bzip2" if EMBEDDED + default !EMBEDDED + depends on BLK_DEV_INITRD select DECOMPRESS_BZIP2 help Support loading of a bzip2 encoded initial ramdisk or cpio buffer If unsure, say N. config RD_LZMA - bool "Initial ramdisk compressed using lzma" - default n - depends on BLK_DEV_INITRD=y + bool "Initial ramdisk compressed using lzma" if EMBEDDED + default !EMBEDDED + depends on BLK_DEV_INITRD select DECOMPRESS_LZMA help Support loading of a lzma encoded initial ramdisk or cpio buffer -- cgit v1.2.3 From 337bed413e9c134c5bf45ad3ec50012a593c603a Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Sat, 28 Mar 2009 16:07:13 -0700 Subject: bzip2/lzma: clarify the meaning of the CONFIG_RD_ options Impact: Kconfig clarification Make it clear that the CONFIG_RD_* options are about what formats are supported, not about what formats are actually being used. Signed-off-by: H. Peter Anvin --- usr/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr/Kconfig b/usr/Kconfig index 5166078d45f..fb9a6460f45 100644 --- a/usr/Kconfig +++ b/usr/Kconfig @@ -46,7 +46,7 @@ config INITRAMFS_ROOT_GID If you are not sure, leave it set to "0". config RD_GZIP - bool "Initial ramdisk compressed using gzip" if EMBEDDED + bool "Support initial ramdisks compressed using gzip" if EMBEDDED default y depends on BLK_DEV_INITRD select DECOMPRESS_GZIP @@ -55,7 +55,7 @@ config RD_GZIP If unsure, say Y. config RD_BZIP2 - bool "Initial ramdisk compressed using bzip2" if EMBEDDED + bool "Support initial ramdisks compressed using bzip2" if EMBEDDED default !EMBEDDED depends on BLK_DEV_INITRD select DECOMPRESS_BZIP2 @@ -64,7 +64,7 @@ config RD_BZIP2 If unsure, say N. config RD_LZMA - bool "Initial ramdisk compressed using lzma" if EMBEDDED + bool "Support initial ramdisks compressed using lzma" if EMBEDDED default !EMBEDDED depends on BLK_DEV_INITRD select DECOMPRESS_LZMA -- cgit v1.2.3 From 55d1d26f23383163a256d0de2aaf2b8fca83e611 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Sat, 28 Mar 2009 16:10:59 -0700 Subject: bzip2/lzma: consistently capitalize LZMA in Kconfig Impact: message formatting Consistently spell LZMA in all capitals, since it (unlike gzip or bzip2) is an acronym. Signed-off-by: H. Peter Anvin --- usr/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr/Kconfig b/usr/Kconfig index fb9a6460f45..a529b4d0530 100644 --- a/usr/Kconfig +++ b/usr/Kconfig @@ -64,12 +64,12 @@ config RD_BZIP2 If unsure, say N. config RD_LZMA - bool "Support initial ramdisks compressed using lzma" if EMBEDDED + bool "Support initial ramdisks compressed using LZMA" if EMBEDDED default !EMBEDDED depends on BLK_DEV_INITRD select DECOMPRESS_LZMA help - Support loading of a lzma encoded initial ramdisk or cpio buffer + Support loading of a LZMA encoded initial ramdisk or cpio buffer If unsure, say N. choice @@ -83,7 +83,7 @@ choice Compression speed is only relevant when building a kernel. Decompression speed is relevant at each boot. - If you have any problems with bzip2 or lzma compressed + If you have any problems with bzip2 or LZMA compressed initramfs, mail me (Alain Knaff) . High compression options are mostly useful for users who -- cgit v1.2.3 From 40297927575a50b1d0d308d735c445924d33fba6 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Sat, 28 Mar 2009 17:24:03 -0700 Subject: bzip2/lzma: don't ask for compression mode for the default initramfs Impact: Kconfig noise reduction, documentation The default initramfs is so small that it makes no sense to worry about the additional memory taken by not double-compressing it. Therefore, don't bug the user with it. Also, improve the description of the option, which was downright incorrect. Signed-off-by: H. Peter Anvin --- usr/Kconfig | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/usr/Kconfig b/usr/Kconfig index a529b4d0530..588c588791e 100644 --- a/usr/Kconfig +++ b/usr/Kconfig @@ -72,23 +72,24 @@ config RD_LZMA Support loading of a LZMA encoded initial ramdisk or cpio buffer If unsure, say N. +if INITRAMFS_SOURCE!="" + choice prompt "Built-in initramfs compression mode" help - This setting is only meaningful if the INITRAMFS_SOURCE is - set. It decides by which algorithm the INITRAMFS_SOURCE will - be compressed. - Several compression algorithms are available, which differ - in efficiency, compression and decompression speed. - Compression speed is only relevant when building a kernel. - Decompression speed is relevant at each boot. + This option decides by which algorithm the builtin initramfs + will be compressed. Several compression algorithms are + available, which differ in efficiency, compression and + decompression speed. Compression speed is only relevant + when building a kernel. Decompression speed is relevant at + each boot. If you have any problems with bzip2 or LZMA compressed initramfs, mail me (Alain Knaff) . - High compression options are mostly useful for users who - are low on disk space (embedded systems), but for whom ram - size matters less. + High compression options are mostly useful for users who are + low on RAM, since it reduces the memory consumption during + boot. If in doubt, select 'gzip' @@ -133,3 +134,14 @@ config INITRAMFS_COMPRESSION_LZMA smaller with LZMA in comparison to gzip. endchoice + +endif + +if INITRAMFS_SOURCE="" +# The builtin initramfs is so small so we don't want to bug the user... + +config INITRAMFS_COMPRESSION_NONE + bool + default y + +endif -- cgit v1.2.3