Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4232848ybb; Tue, 7 Apr 2020 03:29:53 -0700 (PDT) X-Google-Smtp-Source: APiQypIe8M5ULKCINwJwukewH8vaQXAubKJRXgRh1EahSkynr9Ec9uiOG9iA5jUEbvOzbaRDlwp9 X-Received: by 2002:a4a:6549:: with SMTP id z9mr1272257oog.37.1586255393632; Tue, 07 Apr 2020 03:29:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586255393; cv=none; d=google.com; s=arc-20160816; b=nG9VidE7k147FGxC92I/4/hI334PMa7v3GbsqTnexOwQl7yopPLzjHNXS7WCaaY+rX Mvehm951MaNVzl4QBMOtOzHsF0BZ6Z5isARYmVuhDP6okYPdyO/Rmqm4YLrVBZOgQGXA o61zOtF6AZxoQtEe/CP5pKyEZ1jUAVZKhgKmsIHgjJIVmpI4O4awbPV2ZgJxrhoHQd3V J5WpOaF3qXTfikzibG74/yJgwCf6zQpoX8PChb/t1ugIyPmihi5TqkGibhMMw+JNoUEe wN4paoxzKrln3agxk+6NUcs78wDiRJe/SB0lLQ5nkj0a/K6qFvnb72r2Cxm/GO+w5cEQ 4xRQ== 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=Jjgwb55f80kkBBbMMYbGa9FRkeN2h9/zTD7j0d4ex2g=; b=nlmZFkoukTynlzUj5yH6/nUf6oCf5Gc60vPBi28dTZGHvXwle2GOkVBwsrNZvqWJ/5 ySZa456T+XIVmAo2cL1pQGdTayXkX2KT+EcTIcbJJGGI7DQJNrnT2vFwyDGSOMM2FgvB fs+ZTYkx2PdT0uL6DBsLbzbSdS93+pFK3LjxloewrL62dR0A5d+Y4QajhLpV7K3aPiPO j4rUB+5AXADhQEeAbIlbP3mHlMobK9wrhvV7eFgHKf1dLTsV8CYWFc7C+dPEYDc3/fe+ H8ob1pgy+M0tX+c4c4p54P4QX15gYPjlbPVzzZSudZA/ubic6KqTLnXluBI9fphB6jsn kF7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=d049EvBR; 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 d13si500445oij.140.2020.04.07.03.29.42; Tue, 07 Apr 2020 03:29:53 -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=d049EvBR; 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 S1728697AbgDGKYV (ORCPT + 99 others); Tue, 7 Apr 2020 06:24:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:34412 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728676AbgDGKYQ (ORCPT ); Tue, 7 Apr 2020 06:24:16 -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 E87092078A; Tue, 7 Apr 2020 10:24:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586255055; bh=ZRHdGGkfhDo9JmWaKIaBpioaKTS8YGwYZySmOSLLH3M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d049EvBRcwCb+4h6bRJicubHGC72sTVYgi4h/9uib+R/5mdrGjbw0fTSfKyV/ZRZw A86DrAkaRwwF330zinHa3/Dh8Ppass5mnb68u/R/Q8kXzLw8l6op+xU4WbFct5PE7o QN5JZu1nXIQ+u9V/2Yg0CSQxcEudDrEH9RWdGLtg= 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 5.5 12/46] initramfs: restore default compression behavior Date: Tue, 7 Apr 2020 12:21:43 +0200 Message-Id: <20200407101500.825524540@linuxfoundation.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200407101459.502593074@linuxfoundation.org> References: <20200407101459.502593074@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 a6b68503d1774..a80cc79722745 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