]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
initramfs: do not show compression mode choice if INITRAMFS_SOURCE is empty
authorMasahiro Yamada <masahiroy@kernel.org>
Mon, 3 Feb 2020 16:47:08 +0000 (01:47 +0900)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 3 Feb 2020 17:31:43 +0000 (17:31 +0000)
Since commit ddd09bcc899f ("initramfs: make compression options not
depend on INITRAMFS_SOURCE"), Kconfig asks the compression mode for
the built-in initramfs regardless of INITRAMFS_SOURCE.

It is technically simpler, but pointless from a UI perspective,
Linus says [1].

When INITRAMFS_SOURCE is empty, usr/Makefile creates a tiny default
cpio, which is so small that nobody cares about the compression.

This commit hides the Kconfig choice in that case. The default cpio
is embedded without compression, which was the original behavior.

[1]: https://lkml.org/lkml/2020/2/1/160

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
usr/Kconfig
usr/Makefile

index 529caab1a328b3d56eeccbd6c7ae62a6cff6debd..bdf5bbd40727e7bd3af324ea8c37894c732d5993 100644 (file)
@@ -102,6 +102,7 @@ config RD_LZ4
 
 choice
        prompt "Built-in initramfs compression mode"
+       depends on INITRAMFS_SOURCE != ""
        help
          This option allows you to decide by which algorithm the builtin
          initramfs will be compressed.  Several compression algorithms are
index 244862bfb765a8d66dcf20a5daacf3d759e7a969..b6081bb2cc720892378539477f7e2dc279501a7f 100644 (file)
@@ -8,7 +8,7 @@
 # with unpack_to_rootfs(). Make size_append no-op.
 override size_append := :
 
-compress-$(CONFIG_INITRAMFS_COMPRESSION_NONE)  := shipped
+compress-y                                     := shipped
 compress-$(CONFIG_INITRAMFS_COMPRESSION_GZIP)  := gzip
 compress-$(CONFIG_INITRAMFS_COMPRESSION_BZIP2) := bzip2
 compress-$(CONFIG_INITRAMFS_COMPRESSION_LZMA)  := lzma