Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1341358ybi; Fri, 14 Jun 2019 12:58:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqwzBlm+ZUttRkgRruTZ9HPZxdo3WQaEY0PM13605brHle+2NU0YHxt5b0x+BQaFsRJ7rTXX X-Received: by 2002:a63:1723:: with SMTP id x35mr37088329pgl.233.1560542313349; Fri, 14 Jun 2019 12:58:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560542313; cv=none; d=google.com; s=arc-20160816; b=vKT34imYgX9pyKSWidj4Ijk6UWSNH8k/4vXGEP1svwFFhZjxM44seuvFf+Dc2akN29 z/+ebj6aBpb6eiJcvWctc3yx65r2VrYbvn39+j1pCL4KzJOFGu9CiCJQI9Yu8pS2//DB rHREQcwVjGVa+33sRdC9QsIwPX9CuXqEhlstvNJ3uPNZSdjd5PrbUOAXMP3HWCQx/51N 1yE8xmiKXOsiWgKKKlD+v7ZM8bbq7QCLdxcnr3F+H6NnId5pu9BcxSBZWEeLrcquCOcc qdgFXUY9fQq++9+LxKGDnyAIK0QsNHws8TWRxRBbaXcIuitHcIarkzI73RvC4cXTfFeA CcPg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tkfIkc5EEziIC8JttuF44VEsntcOdSTSm668OicBieA=; b=ij+t0D5Op+3vLWF/BO85IOVFkhnHlqeQWTyq8YyuRC7IFSbK0xAQe4Yhl1lxZWp3aQ dWAM9Y1u0o0hRLHFoYhvvBzxhDwL1MlkEAelUDCQBWNKaVKyLOiBDY5VH9fTTZGz6wPr Z9KzGZnV/LUV95pJ/2ZN8BLXRVZhT482BK9bDLRXEpSrgMHhuzuclOLt4nyXbAUnGCg3 EQK62uFpYR7/tXQ9Hl7Fj7XgmGjziwuOGchIiqNtrWeoGlWQihJWFbPM6IFjPcMsE+g3 Qv4QZQGeTfZwe0OgNsQNqcZJcTCVSEhIlhdVgUdgbqcHYWWoA60h2t6BvgO6RB99bSg4 2TWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qIH+M8u6; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k2si2951290pls.196.2019.06.14.12.58.16; Fri, 14 Jun 2019 12:58:33 -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=@gmail.com header.s=20161025 header.b=qIH+M8u6; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725999AbfFNT4p (ORCPT + 99 others); Fri, 14 Jun 2019 15:56:45 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:42841 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725802AbfFNT4p (ORCPT ); Fri, 14 Jun 2019 15:56:45 -0400 Received: by mail-wr1-f68.google.com with SMTP id x17so3715360wrl.9 for ; Fri, 14 Jun 2019 12:56:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tkfIkc5EEziIC8JttuF44VEsntcOdSTSm668OicBieA=; b=qIH+M8u6ZHF56mysF2rv7LgxnEGFYR951cqj5/ufPiitDHFKDiSzyDgKT0UHHa7Rtw dCXyZoQ6PxgjU7i8iacuMREE1//5Vxt/sdt6LkWWPiUaLa9Wz4tVFuXy8BYpCscurA4B +BFnfpmmTNMht6wpoSgG+h+cw9fRpSX+PYwNQOEQ3eAaBm/QcK6prEkZ/YDSnHqTx8Ij HIztDKPZmech4lNjF6gFc9Y38nNiOgwnw5Vx28LAx6Rgf8d0OQziAe8/XsJbFo0do1i1 5bF8GfolMUILyUmsiSsazQMP4VdVln41Tu2/oJcriwLdUKKtyvakmU4ae1CRgzDAuDbh YjIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tkfIkc5EEziIC8JttuF44VEsntcOdSTSm668OicBieA=; b=GFvyr74uVXK2pTSYyM5e/P+P6Jja4mR8j0oy8qf87/hZd3bhOuGhFy7CbndJHUbmk1 zRU5nOMmQoq4D0+SR4TsOyU8RyweudRi3k1lkVh5aKKlMkvYvm4HNWszF50LwFKK2iYk i9WnaYhwEQwzoQiBd7yEov61UwL01ZUl6Dz3CTXXT+2b/lsAttVdh2xMb09Uhoy+S2/U DW2UjPN9cuPObGyPtL0//oJ2HtQnSBq0Ix/lVDKJKFNbg5C7OqmJip69r46I5ICOcFE/ dXXpV2VMxYMQc0K06kiKSrzn0bZqfNn2AY9d38sciSFet1Pf3iNbW81hg7MQqaXQ1BL8 wDGw== X-Gm-Message-State: APjAAAVP959nYreHTdU9ph3VnepQzxFviD7HyndHl0TWGqViQzlnR3Vy c5Lcs0rjhwydgV4tr4OjP9mxBwHw X-Received: by 2002:a5d:6389:: with SMTP id p9mr52574643wru.297.1560542202338; Fri, 14 Jun 2019 12:56:42 -0700 (PDT) Received: from debian64.daheim (pD9E29824.dip0.t-ipconnect.de. [217.226.152.36]) by smtp.gmail.com with ESMTPSA id a19sm2447233wmm.46.2019.06.14.12.56.40 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 14 Jun 2019 12:56:41 -0700 (PDT) Received: from localhost.daheim ([127.0.0.1] helo=debian64.localnet) by debian64.daheim with esmtp (Exim 4.92) (envelope-from ) id 1hbsJU-0007ny-CJ; Fri, 14 Jun 2019 21:56:40 +0200 From: Christian Lamparter To: Christophe Leroy Cc: Michael Ellerman , Daniel Axtens , Pawel Dembicki , linux-kernel@vger.kernel.org, Paul Mackerras , linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH] powerpc: Enable kernel XZ compression option on PPC_85xx Date: Fri, 14 Jun 2019 21:56:40 +0200 Message-ID: <4407251.g26ZO3zR3C@debian64> In-Reply-To: References: <20190603164115.27471-1-paweldembicki@gmail.com> <87ftodempa.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday, June 14, 2019 12:06:48 PM CEST Christophe Leroy wrote: >=20 > Le 13/06/2019 =E0 13:42, Michael Ellerman a =E9crit : > > Daniel Axtens writes: > >> Pawel Dembicki writes: > >> > >>> Enable kernel XZ compression option on PPC_85xx. Tested with > >>> simpleImage on TP-Link TL-WDR4900 (Freescale P1014 processor). > >>> > >>> Suggested-by: Christian Lamparter > >>> Signed-off-by: Pawel Dembicki > >>> --- > >>> arch/powerpc/Kconfig | 2 +- > >>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>> > >>> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > >>> index 8c1c636308c8..daf4cb968922 100644 > >>> --- a/arch/powerpc/Kconfig > >>> +++ b/arch/powerpc/Kconfig > >>> @@ -196,7 +196,7 @@ config PPC > >>> select HAVE_IOREMAP_PROT > >>> select HAVE_IRQ_EXIT_ON_IRQ_STACK > >>> select HAVE_KERNEL_GZIP > >>> - select HAVE_KERNEL_XZ if PPC_BOOK3S || 44x > >>> + select HAVE_KERNEL_XZ if PPC_BOOK3S || 44x || PPC_85xx > >> > >> (I'm not super well versed in the compression stuff, so apologies if > >> this is a dumb question.) If it's this simple, is there any reason we > >> can't turn it on generally, or convert it to a blacklist of platforms > >> known not to work? > >=20 > > For some platforms enabling XZ requires that your u-boot has XZ support, > > and I'm not very clear on when that support landed in u-boot and what > > boards have it. And there are boards out there with old/custom u-boots > > that effectively can't be updated. >=20 > I don't think that it has anything to do with u-boot. > AFAIK, today's mainline U-boot only supports GZIP (by default) and the=20 > following optional ones: LZO, LZMA, LZ4. >=20 > If we want to set additional compression types for u-boot, it is not=20 > enough to select HAVE_KERNEL_XXXX, we also have to update uImage=20 > generation scripts. >=20 > See the series I sent some time ago:=20 > https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=3D104153 > I'll resent it without bzip2 as today's uboot doesn't support bzip2 anymo= re. >=20 > >=20 > > But as a server guy I don't really know the details of all that very > > well. So if someone tells me that we should enable XZ for everything, or > > as you say just black list some platforms, then that's fine by me. > >=20 >=20 > I guess we first need to understand how this is used. >=20 to add to the confusion: The powerpc arch is sort of special since it has the various targets have different arch/powerpc/boot/wrapper for everyone unfamiliar (people from ARM or other targets,) please look at:=20 https://www.kernel.org/doc/Documentation/powerpc/bootwrapper.txt and see that this is very different from ARM, MIPS, x86, etc. I think the cuImage*, dtbImage*, simpleImage, etc... wouldn't be affected if the kernel is compressed by XZ, as in they should still boot fine, altough XZ takes a bit longer to unpack of course. However, for the uImage this could spell a problem, however "HAVE_KERNEL_XZ" does not automatically entail that the wrapper script from above compresses the generated uimage with LZMAd/xz. Instead this is controlled by init/Kconfig and the "Kernel compression mode" setting there.=20 And currently that defaults to CONFIG_KERNEL_GZIP. So the wrapper script currently gzipped uImages unless the target config overwrites it to something else (and the target has the right=20 HAVE_KERNEL_XZ/BZIP2/LZMA/LZO/LZ4/... as well). Regards, Christian