From: Heiner Kallweit <hkallweit1@gmail.com>
To: Michael Ellerman <mpe@ellerman.id.au>,
Oliver O'Halloran <oohall@gmail.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: Commit 1b7898ee276b "powerpc/boot: Use the pre-boot decompression API" breaks boot
Date: Mon, 10 Oct 2016 08:10:23 +0200 [thread overview]
Message-ID: <62241a1e-51c0-c1cd-1ecd-fa54a3842da0@gmail.com> (raw)
In-Reply-To: <877f9g7r4l.fsf@concordia.ellerman.id.au>
Am 10.10.2016 um 06:41 schrieb Michael Ellerman:
> Heiner Kallweit <hkallweit1@gmail.com> writes:
>
>> Am 07.10.2016 um 21:26 schrieb Heiner Kallweit:
>>> Am 07.10.2016 um 07:51 schrieb Oliver O'Halloran:
>>>> Hi, Heiner
>>>>
>>>> Could you send me a copy of the kernel .config (or which defconfig)
>>>> that you're using, the name of the HW platform that you're using and
>>>> if possible the kernel image itself?
>>>>
>>>> Thanks,
>>>> Oliver
>>>>
>>> Thanks for the quick reply. Attached are .config and cuImage.
>>> HW is a TP-Link TL-WDR4900 WiFi router (P1014-based) running OpenWRT.
>>>
>> After further checking I think I found the issue. The old gunzip code
>> handled uncompressed data transparently whilst the new one bails out
>> if it doesn't find a proper gzip header.
>> And in my case the actual kernel image is uncompressed.
>> With the following patch the system boots fine again (at least for me).
>
> Thanks for testing and tracking it down.
>
> I wonder why the actual image is uncompressed? Or alternately why do we
> tell uboot the image is compressed when it's not?
>
Uboot is provided with a compressed image, but what gets compressed is
not the pure kernel image but the resulting image incl. boot wrapper code,
see this part of the wrapper script:
cuboot*)
gzip -n -f -9 "$ofile"
${MKIMAGE} -A ppc -O linux -T kernel -C gzip -a "$base" -e "$entry" \
$uboot_version -d "$ofile".gz "$ofile"
And this resulting image is decompressed by uboot already during boot.
Therefore the boot wrapper code sees an uncompressed kernel image.
IMHO in case of using cuboot no CONFIG_KERNEL_<COMPR TYPE> 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.
Rgds, Heiner
next prev parent reply other threads:[~2016-10-10 6:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-07 5:37 Commit 1b7898ee276b "powerpc/boot: Use the pre-boot decompression API" breaks boot Heiner Kallweit
2016-10-07 5:51 ` Oliver O'Halloran
2016-10-07 19:26 ` Heiner Kallweit
2016-10-08 22:13 ` Heiner Kallweit
2016-10-10 4:41 ` Michael Ellerman
2016-10-10 5:33 ` Oliver O'Halloran
2016-10-10 6:10 ` Heiner Kallweit [this message]
2016-10-10 20:06 ` Heiner Kallweit
2016-10-12 4:26 ` Oliver O'Halloran
2016-10-12 18:25 ` Heiner Kallweit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=62241a1e-51c0-c1cd-1ecd-fa54a3842da0@gmail.com \
--to=hkallweit1@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=oohall@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).