Skip to content

Commit

Permalink
initramfs: do not show compression mode choice if INITRAMFS_SOURCE is…
Browse files Browse the repository at this point in the history
… empty

Since commit ddd09bc ("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 <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
masahir0y authored and torvalds committed Feb 3, 2020
1 parent ad80142 commit d4e9056
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions usr/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion usr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d4e9056

Please sign in to comment.