Return-Path: Received: from mail-lf0-x232.google.com (mail-lf0-x232.google.com [IPv6:2a00:1450:4010:c07::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3svMk43LBGzDsxJ for ; Thu, 13 Oct 2016 05:25:48 +1100 (AEDT) Received: by mail-lf0-x232.google.com with SMTP id l131so54140816lfl.2 for ; Wed, 12 Oct 2016 11:25:48 -0700 (PDT) Subject: Re: Commit 1b7898ee276b "powerpc/boot: Use the pre-boot decompression API" breaks boot To: Oliver O'Halloran References: <8db8ecac-4022-7df9-4e81-3d490c50821d@gmail.com> <80c9c42c-45d3-9f24-b3e1-5a5042686b1b@gmail.com> <877f9g7r4l.fsf@concordia.ellerman.id.au> <62241a1e-51c0-c1cd-1ecd-fa54a3842da0@gmail.com> <0a0d0909-cee3-f375-4cf4-75f0beb5b8b7@gmail.com> Cc: Michael Ellerman , linuxppc-dev@lists.ozlabs.org From: Heiner Kallweit Message-ID: <36223f5f-5b57-19f4-f4d8-3191980d83e6@gmail.com> Date: Wed, 12 Oct 2016 20:25:29 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Am 12.10.2016 um 06:26 schrieb Oliver O'Halloran: > On Tue, Oct 11, 2016 at 7:06 AM, Heiner Kallweit wrote: >>> IMHO in case of using cuboot no CONFIG_KERNEL_ config option >>> should be set and Makefile + code in arch/powerpc/boot should be able >>> to deal with this situation: >>> - don't copy and build the decompression stuff >>> - use an alternative version of prep_kernel() in main.c which doesn't >>> attempt to decompress the kernel image >>> >>> This should be a cleaner solution than probing the kernel image whether >>> it's compressed or not. >>> >> >> This would be the patch implementing the idea. Advantage is that all >> the unnecessary decompression code isn't built. Works fine for me. > > I don't think this approach is viable. The wrapper code is shared > among the various output image formats some of which *will* contain a > compressed kernel image so we can't simply remove the decompressor > from the wrapper. A random example I found in the makefile was > CONFIG_BAMBOO: > >> image-$(CONFIG_BAMBOO) += treeImage.bamboo cuImage.bamboo > > When building for this platform Kbuild will produce treeboot and a > cuboot image. Unlike uboot, Treeboot doesn't do any decompression so > the wrapper needs to decompress the kernel itself. The probing > solution more or less matches the old behaviour (which we know works) > so I think we should just stick with that. > > - Oliver > Indeed, I also figured that out later. As you say, then let's stick with re-introducing the probing. I'll send the patch for this. Heiner