Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1518498ybb; Sat, 11 Apr 2020 05:29:31 -0700 (PDT) X-Google-Smtp-Source: APiQypJ3iqi9gEvAmq1jJWuhWOQZJhMaMlDMTOmET4I8aJS2plhtIOqGpwOIM8a2WRjU40L/pGLz X-Received: by 2002:ac8:1403:: with SMTP id k3mr3474074qtj.377.1586608171830; Sat, 11 Apr 2020 05:29:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586608171; cv=none; d=google.com; s=arc-20160816; b=xbV/s36e5p2S6yxwjWM9p3QT/19WYa18dXnFS9HptDv7MaVC80641+ULqu2sx0nCGo LqEXCesO8HTm/EJR/14mw2y0H3BcZ7gXrj66HL6aPB24KVJ1bea8Z7ivlVFug39uCjAP 5jK/Gu+0qBbhVEyuXQYcdQ16pJzM2C7cih0BSopM7wu9WgXCIBQo8O3QRzmBVbVE9yUp 56yL2LjFgGCLAf9vqLbUQRsN+1nvKPqh0EMwrgwaGHNQ3zZflip5JPeQ8vE0UgRjSdQt lyYYQ0eRFUcqr53fDx0cN/ruqlAYf6BKPzqYabKxOx3hVd87fmrvhAaeTtR7Ygj3MQnb mPDA== 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=o+t9n+eH+U2yvzzIJCKG6AbWbPBRg348ytlPHf272uj0LJ3et8khNF4eMCh0fag15p u5FQ1AgTL+h+MkTU0jl3w4VrozLsCDQylopCHq4kepmBTW3jN7Dg1FVm70WmTltsrJiH DCLpPExnWMeke1fCYaj7tcpht5IjN58YUHwXaLq411bNaXrAvapmkFT8I4eM/qwE31sh 5GMY48g7uFJWv/ep4u4E4b23mD6WIgyfCC98+tQoMbiZC83ZilMZ30rsYSHoOnG4k7KS C9KkLfAGdQlTcjVgYlDrFNoQtpimaFenb+A7pEeRO00aOmfYKl7MtgT3QUxSCbRbv2nQ XNRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vlhIySmm; 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 w44si2725925qtj.63.2020.04.11.05.29.17; Sat, 11 Apr 2020 05:29:31 -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=vlhIySmm; 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 S1727999AbgDKM1W (ORCPT + 99 others); Sat, 11 Apr 2020 08:27:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:47668 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727180AbgDKMOU (ORCPT ); Sat, 11 Apr 2020 08:14:20 -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 5505A20644; Sat, 11 Apr 2020 12:14:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586607259; bh=XMf7QVap6ODLiVJo0XE8+jiJoxTHwXWjdNCTTv0ulBk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vlhIySmmepDmafWVbuw3y4tAqlbGdc/X9vDACkCTwUo8K620Q2o01mdoNh4BnhJGZ LfXKBn3SCgu/+mvUpI6gsejP+M5jmdBfpe1SV6iBetV+vuJE3OEBVK5+6tGR2E76fC uVl4yPlibWcRGVZ2xuCSh/Ny2FmZ+us0SMdPcTqw= 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.14 06/38] initramfs: restore default compression behavior Date: Sat, 11 Apr 2020 14:08:50 +0200 Message-Id: <20200411115438.559376676@linuxfoundation.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200411115437.795556138@linuxfoundation.org> References: <20200411115437.795556138@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