Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1509941ybb; Sat, 11 Apr 2020 05:17:24 -0700 (PDT) X-Google-Smtp-Source: APiQypKUIyEBVy68a7/YzzrmAPgz8hr8s7OVafgQdlfQnAdsnButm3jmMwsdXhp+tZgkceoPx4N1 X-Received: by 2002:ac8:664a:: with SMTP id j10mr3410823qtp.167.1586607444854; Sat, 11 Apr 2020 05:17:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586607444; cv=none; d=google.com; s=arc-20160816; b=EZv0+uKHaL1nt8twO9huMApxy0XHHbWZCFJ/+r0spAZy1d7U8mFjB+zh8CylzoM0Wo IHhW0jflWn9BmOOdOXxiWf3mo0ckvuHn3iYxq/NNuIscp7Xnz9F1oage3Z67VlLy17B7 3siZ9wObZY95ou134r98wU/BeTOCkSlkauWcyGN4dgDckrGhItqh0+XuMa25qcWUn82f huId7w04yrvNwQnkl+Nn21qlBswsKOw5NR2nV7CX2HRE9P/fbUY8aQiKy7R+i1Fad+FI K/j8jZT21Rg5o09K/s2v9bGMproDPp+Xag1YxPs3sy6GbZXHWde66YqnVqVerwaRfVv4 AZYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=le8GlpMYYBQ0RKbQTDdsR69q6lhCLcrW8GjBghg8FCo=; b=okf/1oswkH+K+ES4RnnT8xzyC84Ml8zg3iYL23gv0lQ1ng9T9xByKvyu7Z/BzoiYAp Pz5YeKauiYoSMg0RuDZrWmJ6BaYiWxsmvfLKe6RMZlyJTi6DiqlEhHdrWIA20MK4i2e8 gma7Be3kejOOB9PIH7VBIm5koTjLnlMvs7ExemuFeVLGs7UJ1uUQGdJQRNH8I2jzPVWf xqgigRZgTkqENc3lec9B2StNOfBw/zoxqi6QfMc1v2Q0mrsmxhUF///ox04oF4P+PUtw 67z4HbhmvbWH4A8TYaSt1gcaBYC/vC2VoWanK3T1QlhGGIP4Cl/Zvdx1joDu2SmPt+oB 1xYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PKvLsbRX; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e25si2674619qkm.325.2020.04.11.05.17.10; Sat, 11 Apr 2020 05:17:24 -0700 (PDT) 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=@kernel.org header.s=default header.b=PKvLsbRX; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727785AbgDKMPM (ORCPT + 99 others); Sat, 11 Apr 2020 08:15:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:48944 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727709AbgDKMPL (ORCPT ); Sat, 11 Apr 2020 08:15:11 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1877120787; Sat, 11 Apr 2020 12:15:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586607310; bh=XMf7QVap6ODLiVJo0XE8+jiJoxTHwXWjdNCTTv0ulBk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PKvLsbRXrHVVQQRyyrZ8qRYubb5cdFXv33M7H8n9Bbx9XkCo68/y8reHpTLCV46IJ o/T9McH4xenGAzlnlJ1huINGfr8txpCT+A5GpqAMKPsumnuIsEsJ0EXqHI+148VVr6 Wwt3nmDQDzruTpTzWmHq17oktt+nD7UvJP0gKwt8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eugeniy Paltsev , Masahiro Yamada , Sasha Levin Subject: [PATCH 4.19 08/54] initramfs: restore default compression behavior Date: Sat, 11 Apr 2020 14:08:50 +0200 Message-Id: <20200411115509.125222779@linuxfoundation.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200411115508.284500414@linuxfoundation.org> References: <20200411115508.284500414@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eugeniy Paltsev [ Upstream commit 785d74ec3bbf26ac7f6e92e6e96a259aec0f107a ] Even though INITRAMFS_SOURCE kconfig option isn't set in most of defconfigs it is used (set) extensively by various build systems. Commit f26661e12765 ("initramfs: make initramfs compression choice non-optional") has changed default compression mode. Previously we compress initramfs using available compression algorithm. Now we don't use any compression at all by default. It significantly increases the image size in case of build system chooses embedded initramfs. Initially I faced with this issue while using buildroot. As of today it's not possible to set preferred compression mode in target defconfig as this option depends on INITRAMFS_SOURCE being set. Modification of all build systems either doesn't look like good option. Let's instead rewrite initramfs compression mode choices list the way that "INITRAMFS_COMPRESSION_NONE" will be the last option in the list. In that case it will be chosen only if all other options (which implements any compression) are not available. Signed-off-by: Eugeniy Paltsev Signed-off-by: Masahiro Yamada Signed-off-by: Sasha Levin --- usr/Kconfig | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/usr/Kconfig b/usr/Kconfig index 43658b8a975e5..8b4826de1189f 100644 --- a/usr/Kconfig +++ b/usr/Kconfig @@ -131,17 +131,6 @@ choice If in doubt, select 'None' -config INITRAMFS_COMPRESSION_NONE - bool "None" - help - Do not compress the built-in initramfs at all. This may sound wasteful - in space, but, you should be aware that the built-in initramfs will be - compressed at a later stage anyways along with the rest of the kernel, - on those architectures that support this. However, not compressing the - initramfs may lead to slightly higher memory consumption during a - short time at boot, while both the cpio image and the unpacked - filesystem image will be present in memory simultaneously - config INITRAMFS_COMPRESSION_GZIP bool "Gzip" depends on RD_GZIP @@ -214,6 +203,17 @@ config INITRAMFS_COMPRESSION_LZ4 If you choose this, keep in mind that most distros don't provide lz4 by default which could cause a build failure. +config INITRAMFS_COMPRESSION_NONE + bool "None" + help + Do not compress the built-in initramfs at all. This may sound wasteful + in space, but, you should be aware that the built-in initramfs will be + compressed at a later stage anyways along with the rest of the kernel, + on those architectures that support this. However, not compressing the + initramfs may lead to slightly higher memory consumption during a + short time at boot, while both the cpio image and the unpacked + filesystem image will be present in memory simultaneously + endchoice config INITRAMFS_COMPRESSION -- 2.20.1