Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4027080ybl; Mon, 3 Feb 2020 11:07:05 -0800 (PST) X-Google-Smtp-Source: APXvYqwD6ColP4V+WxfEA3uoIa+GDbGly/GgempTjrUBRZojukq1Mx50gg1yDexIpphjczfo6p7q X-Received: by 2002:a9d:4c81:: with SMTP id m1mr18800498otf.5.1580756824784; Mon, 03 Feb 2020 11:07:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580756824; cv=none; d=google.com; s=arc-20160816; b=arT2M7+Gcu6UcaFe0B5742x2lv8CH0fGmctMyBfN6chpVMOo9QHytWPZ/yZENsI3ei oF9wpgPtdlT9mavT28dnPs+xmrX115ohpppXIMRhPLoDW1Ks0ppK6SH/PGVkUjXV+gGQ b3pEzyTghmBZYhSL4nIDrpKvIlAfROsF7GIsmW4F/uvmvwCkt6vc3OLTrfNWEd16SnWb DAp9wGUP/GjJoxgMwpB4ldp4Un2qM1l/cn3j/JfKVc8hoGaZNF3d9vd3Afx5zQ72+kNY b8C1aLs6tIDF2Ve1DiWPlc79UR1wzg5VYZk9ke5gjWldQ6egZi+Sh16/0D9zCaAls9XJ QQ3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=8mL42oRIQaZwSHKJpmCbjvxiZ9pQrs0tUPVRqgWsB3g=; b=KW8lKhZC2ouu3r153P0DRnSs9wspmj3lTkslShtldJR1GYZdNxMosjcnIKAcWmvLOD nvqxnfaiup+0PWK8JOVXQby+or6dlh15VYzpt5dvEsWypPYefFq83KCgJfp4frK4pm87 bweQQO4EjSnJ8PpvonW5i4dSE7zW32XZWqK9DAw5pjxVkGbnQC9zbPANpaX5ZPu+Qgpa 9ydauf5xl0zbHbA2sr4jql4k1IpxaCUsnU0b5XMOv3l8cDWSH4R5a+tD6ghDJtuohjcz HsjiivOeuAVZxSRcuN1ln6ECYU2iWb0SI8ukxMKwRh7ui7zyEmjAqq7Fb9BQLOcwIpnu XM1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Xf6D5Pz8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l5si9615591otn.35.2020.02.03.11.06.52; Mon, 03 Feb 2020 11:07:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Xf6D5Pz8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730956AbgBCQsy (ORCPT + 99 others); Mon, 3 Feb 2020 11:48:54 -0500 Received: from conuserg-07.nifty.com ([210.131.2.74]:39669 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728725AbgBCQst (ORCPT ); Mon, 3 Feb 2020 11:48:49 -0500 Received: from grover.flets-west.jp (softbank126093102113.bbtec.net [126.93.102.113]) (authenticated) by conuserg-07.nifty.com with ESMTP id 013GlTEe023349; Tue, 4 Feb 2020 01:47:29 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com 013GlTEe023349 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1580748450; bh=8mL42oRIQaZwSHKJpmCbjvxiZ9pQrs0tUPVRqgWsB3g=; h=From:To:Cc:Subject:Date:From; b=Xf6D5Pz8FLxjB0pUEniUL8d6Ed4jC+q9Ida4tAqk5kb10+teGeZ49/u/IwWsuhhWV M/jQKoFfkD3fUlYD7ld7oAddTE1/mdPlB0vR/m219WPjLBWMDKeswDdUSZdZlUxx+z zZNmN8u9dAXQUksICYcG3dyvsjL8tLXLcKvJT6wM2vTUqxqEhVE89ca1FfJOo7a9bU kA8DM2IulFoQrKjEqApSdSgHVSVwFipB/9af0t7BPeOlTUcxLz66xcD01EZgnbn4ZB 9I2QGjGI6505eg5Qqfi6P7ykfS8FEg8DnRPw3qWP21dchYjW+eOUEjGaQLk0tP11de 81KZ+ijPKQS0g== X-Nifty-SrcIP: [126.93.102.113] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org, Linus Torvalds Cc: Geert Uytterhoeven , linux-kernel@vger.kernel.org, Masahiro Yamada , Andrew Morton , Greg Thelen , Mauro Carvalho Chehab , Sam Ravnborg Subject: [PATCH] initramfs: do not show compression mode choice if INITRAMFS_SOURCE is empty Date: Tue, 4 Feb 2020 01:47:08 +0900 Message-Id: <20200203164708.17478-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Masahiro Yamada --- Linus, Will you directly pick up this if you are OK with it? usr/Kconfig | 1 + usr/Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/usr/Kconfig b/usr/Kconfig index 529caab1a328..bdf5bbd40727 100644 --- a/usr/Kconfig +++ b/usr/Kconfig @@ -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 diff --git a/usr/Makefile b/usr/Makefile index 18aed2ab98da..c12e6b15ce72 100644 --- a/usr/Makefile +++ b/usr/Makefile @@ -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 -- 2.17.1