All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Hilliard <thirtythreeforty@gmail.com>
To: Paul Burton <paul.burton@mips.com>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>,
	"linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RESEND PATCH] mips: ralink: allow zboot
Date: Thu, 21 Mar 2019 18:29:09 -0600	[thread overview]
Message-ID: <CACmrr9h2acsvEX9BghXz+5cYXFsPD29wg5yyOEbrzggubELefg@mail.gmail.com> (raw)
In-Reply-To: <20190321234019.5ifoywetz2vnhpne@pburton-laptop>

On Thu, Mar 21, 2019 at 5:40 PM Paul Burton <paul.burton@mips.com> wrote:
> On Thu, Mar 21, 2019 at 05:10:38PM -0600, George Hilliard wrote:
> > My version of U-Boot complains if I compile out LZMA support:
> > ---
> > => tftpboot 0x81000000 uImage; tftpboot 0x84000000 hawkeye.dtb; bootm
> > 0x81000000 - 0x84000000
> > (snip)
> > Bytes transferred = 7349 (1cb5 hex)
> > ## Booting kernel from Legacy Image at 81000000 ...
> >    Image Name:   Linux-5.1.0-rc1
> >    Image Type:   MIPS Linux Kernel Image (lzma compressed)
> >    Data Size:    1465871 Bytes = 1.4 MiB
> >    Load Address: 80000000
> >    Entry Point:  80344338
> >    Verifying Checksum ... OK
> > ## Flattened Device Tree blob at 84000000
> >    Booting using the fdt blob at 0x84000000
> >    Uncompressing Kernel Image ... Unimplemented compression type 3
> > exit not allowed from main input shell.
> > =>
> > ---
>
> There you're using a uImage though, which is different to
> CONFIG_SYS_SUPPORTS_ZBOOT. Even without CONFIG_SYS_SUPPORTS_ZBOOT
> enabled, you can build either a compressed or uncompressed uImage.
>
> Some platforms enable one of those targets by default but it doesn't
> appear that ralink does, so I guess you're specifying a uImage.lzma
> target when building the kernel? Try doing that when
> CONFIG_SYS_SUPPORTS_ZBOOT isn't enabled - it'll still generate the same
> type of LZMA-compressed uImage.

OK, Buildroot was obfuscating this a little from me.  I selected its LZMA
compression option, and nothing happened.  Asking for LZMA does not make it
build uImage.lzma.  Selecting the *kernel's* KERNEL_LZMA option caused
Buildroot's `make uImage` to make the same sort of image as made by
`make uImage.lzma` as you suggest, for a reason I have not figured out.

> What CONFIG_SYS_SUPPORTS_ZBOOT does is produce a program (vmlinuz) which
> contains a compressed version of vmlinux.bin along with some code to
> decompress it. The decompression is performed by vmlinuz itself, not by
> U-Boot.

OK, that makes more sense.  I have not tested zboot then :)

> Now it could still be valid to select CONFIG_SYS_SUPPORTS_ZBOOT if you
> had a need for a better compression algorithm & couldn't update your
> bootloader to support it, but that would be solving a different problem
> than your commit message claims & it wouldn't matter at all whether the
> bootloader supports a particular compression algorithm.

Yeah, I agree.  I will just make a uImage.lzma, which is what I was after
anyway.

Thank you very much for the explanation!

George

      reply	other threads:[~2019-03-22  0:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-21 17:03 [RESEND PATCH 0/1] mips: ralink: allow zboot George Hilliard
2019-03-21 17:03 ` [RESEND PATCH] " George Hilliard
2019-03-21 22:01   ` Aaro Koskinen
2019-03-21 23:10     ` George Hilliard
2019-03-21 23:40       ` Paul Burton
2019-03-22  0:29         ` George Hilliard [this message]

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=CACmrr9h2acsvEX9BghXz+5cYXFsPD29wg5yyOEbrzggubELefg@mail.gmail.com \
    --to=thirtythreeforty@gmail.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=paul.burton@mips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.