[U-Boot] [PATCH v2 15/21] Refactor the bootm command to reduce code duplication

Simon Glass sjg at chromium.org
Thu Jun 27 17:39:00 CEST 2013


Hi Stefann,

On Thu, Jun 27, 2013 at 6:40 AM, Stefan Roese <sr at denx.de> wrote:

> Hi Simon,
>
> On 06/11/2013 08:14 PM, Simon Glass wrote:
> > At present the bootm code is mostly duplicated for the plain 'bootm'
> > command and its sub-command variant. This makes the code harder to
> > maintain and means that changes must be made to several places.
> >
> > Introduce do_bootm_states() which performs selected portions of the bootm
> > work, so that both plain 'bootm' and 'bootm <sub_command>' can use the
> > same code.
> >
> > Additional duplication exists in bootz, so tidy that up as well. This
> > is not intended to change behaviour, apart from minor fixes where the
> > previously-duplicated code missed some chunks of code.
> >
> > Signed-off-by: Simon Glass <sjg at chromium.org>
>
> Simon, this patch breaks bootm (at least on powerpc), while booting an
> compressed uImage (with DT). It just hangs while decompressing the
> kernel image:
>
> ## Booting kernel from Legacy Image at 01000000 ...
>    Image Name:   Linux-3.5.7
>    Image Type:   PowerPC Linux Kernel Image (gzip compressed)
>    Data Size:    2203312 Bytes = 2.1 MiB
>    Load Address: 00000000
>    Entry Point:  00000000
> ## Flattened Device Tree blob at 01800000
>    Booting using the fdt blob at 0x1800000
>    Uncompressing Kernel Image ...
>
> I bisected mainline and this patch is the one that breaks booting:
>
> [stefan at ubuntu-2012 u-boot ((983c72f...)|BISECTING)]$ git bisect good
> 35fc84fa1ff51e15ecd3e464dac87eb105ffed30 is the first bad commit
> commit 35fc84fa1ff51e15ecd3e464dac87eb105ffed30
> Author: Simon Glass <sjg at chromium.org>
> Date:   Tue Jun 11 11:14:47 2013 -0700
>
>     Refactor the bootm command to reduce code duplication
>
>
> I already looked what might be wrong but I couldn't find any problem
> upon a quick glance. You know this code may better. Perhaps you could
> take look at it and give it a try as well.
>

Yes I will take a look today. I created a test suite for it but it did not
include decompression - I will see if I can diagnose it and then add
another test. If you have the .its file (device tree input to mkimage)
please send it to me.

Regards,
Simon


>
> Thanks,
> Stefan
>
>


More information about the U-Boot mailing list