Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1909391yba; Thu, 25 Apr 2019 07:39:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzyhvIi8JRvNCR4kOjak2yiQM0Hh4qN5TmjubmDfGtjTJ0lwy7UMPTtJD1vBoRIiNg2fYHs X-Received: by 2002:a62:12d0:: with SMTP id 77mr40993187pfs.15.1556203150414; Thu, 25 Apr 2019 07:39:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556203150; cv=none; d=google.com; s=arc-20160816; b=0yaIADLZbzrJNkGmUNU+xt6pSjyvgft+Omc33CcACdoB4T/wrnp0md+8M/5ZSPz+Nq XolelVb6TU3eYlQ4jjY0whFp52/MlJPouGfNNEgNH91rO8WF5OD7uXX9EfFynFxRJcx9 G2GYDKlEXEHKo8Ah1tlBqMOS3obz9zkGfC+Xt8yxtu8m34FFk7IGg5c2vzmL7rYrfKMC vjHkm1+p6Rs95SQn5tfbB9zSaIXwYo6m7c5a53IGoc0USwswdqXqoOhc2O+FmDd+yzTd wbprnrogwLOswtZMQyPuhW7zO/wWPUfuQpXh9qMq4ttxtonX7oxufJ25qB5yjDpWUjus Zb7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=/xEcpZWpiF3uAdxRXC7lSKzfKgyzuEQWwXtrPpyzPwg=; b=NST5skQkJn2pveLgwxTY+WM9VmzxFAuVhLCZDIUjGLviyYJD1GbJCG2st9djKFg01X vTBT48L7UOAnfLhAruhwPhvmw79y4LTQazHyOhIUet3VIICiqS8aa3bT0Emd0RoaoVB1 dpErPClgVolhm8mm+7H7yNPOHhwDpF0M4VgKN+aAslcC0AEpPDcA2c/xL5Djy+ktPcQ4 vv61g5XzL9sj/QU8Tb5ZyJ5E8v+aBHNEpH0c3S37CapJLZzfWS70Rpb1jRZzguR255Wu 7oCOAAel3ho380HEYLlLKhQkIIIMABn+ZWF3D9hDbDY4wOTQQiP/1CBSq1v2XOCPOqT8 nKBw== ARC-Authentication-Results: i=1; mx.google.com; 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 a22si22012613plm.263.2019.04.25.07.38.54; Thu, 25 Apr 2019 07:39:10 -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; 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 S1726790AbfDYOh1 (ORCPT + 99 others); Thu, 25 Apr 2019 10:37:27 -0400 Received: from tartarus.angband.pl ([54.37.238.230]:39042 "EHLO tartarus.angband.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725900AbfDYOh1 (ORCPT ); Thu, 25 Apr 2019 10:37:27 -0400 Received: from kilobyte by tartarus.angband.pl with local (Exim 4.92) (envelope-from ) id 1hJfUo-0007iI-Ms; Thu, 25 Apr 2019 16:37:06 +0200 Date: Thu, 25 Apr 2019 16:37:06 +0200 From: Adam Borowski To: Christophe Leroy Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v2 3/4] powerpc/boot: Add bzip2 support for uImage Message-ID: <20190425143706.GA28476@angband.pl> References: <2d3a59015307d368d6ac1a62fe7e47f5b39e2fe2.1556028978.git.christophe.leroy@c-s.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Junkbait: aaron@angband.pl, zzyx@angband.pl User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: kilobyte@angband.pl X-SA-Exim-Scanned: No (on tartarus.angband.pl); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 23, 2019 at 02:20:43PM +0000, Christophe Leroy wrote: > This patch allows to generate bzip2 compressed uImage Please don't add bzip2 support, that's a waste of your time as we're trying to remove it kernel-wide. There's a patchset to retire compressors beaten by alternatives on the whole speed-to-size curve; reposting it is overdue. It does: * add ZSTD (fast and strong) * remove BZIP2 (obsolete, only user in kernel) * remove LZMA (redundant with XZ, uses a private copy of its library) * makes Kconfig prose talk badly about LZO (used elsewhere in the kernel) I believe only three compressors are worth using here: XZ, ZSTD, LZ4. GZIP must stay because of ubiquitous support, the rest should go. > --- a/arch/powerpc/Kconfig > +++ b/arch/powerpc/Kconfig > @@ -199,6 +199,7 @@ config PPC > + select HAVE_KERNEL_BZIP2 if DEFAULT_UIMAGE > --- a/arch/powerpc/boot/Makefile > +++ b/arch/powerpc/boot/Makefile > @@ -23,6 +23,7 @@ all: $(obj)/zImage > +compress-$(CONFIG_KERNEL_BZIP2) := CONFIG_KERNEL_BZIP2 > @@ -259,6 +260,7 @@ endif > +compressor-$(CONFIG_KERNEL_BZIP2) := bz2 > --- a/arch/powerpc/boot/wrapper > +++ b/arch/powerpc/boot/wrapper > @@ -137,7 +137,7 @@ while [ "$#" -gt 0 ]; do > - [ "$1" != "gz" -o "$1" != "xz" -o "$1" != "lzma" -o "$1" != "none" ] || usage > + [ "$1" != "gz" -o "$1" != "xz" -o "$1" != "lzma" -o "$1" != "bz2" -o "$1" != "none" ] || usage > @@ -149,6 +149,9 @@ while [ "$#" -gt 0 ]; do > + if [ $uboot_comp = "bz2" ]; then > + uboot_comp=bzip2 > + fi > @@ -377,6 +380,9 @@ if [ -z "$cacheit" -o ! -f "$vmz$compression" -o "$vmz$compression" -ot "$kernel > + .bz2) > + bzip2 -f "$vmz.$$" > + ;; Meow! -- ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢰⠒⠀⣿⡁ 10 people enter a bar: 1 who understands binary, ⢿⡄⠘⠷⠚⠋⠀ 1 who doesn't, D who prefer to write it as hex, ⠈⠳⣄⠀⠀⠀⠀ and 1 who narrowly avoided an off-by-one error.