public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Bartlomiej Sieka <tur@semihalf.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Current U-Boot doesn't boot device tree enabled kernel anymore
Date: Thu, 27 Mar 2008 19:56:36 +0100	[thread overview]
Message-ID: <47EBEDE4.4050302@semihalf.com> (raw)
In-Reply-To: <200803271525.34660.sr@denx.de>

Stefan Roese wrote:
> On Thursday 27 March 2008, Bartlomiej Sieka wrote:
>>> ## Booting kernel from Legacy Image at 00200000 ...
>>>    Image Name:   Linux-2.6.25-rc7-next-20080327-d
>>>    Created:      2008-03-27  13:51:18 UTC
>>>    Image Type:   PowerPC Linux Kernel Image (gzip compressed)
>>>    Data Size:    1288643 Bytes =  1.2 MB
>>>    Load Address: 00000000
>>>    Entry Point:  00000000
>>>    Verifying Checksum ... OK
>>>    Uncompressing Kernel Image ... OK
>>> ERROR: image overwritten - must RESET the board to recover.
> 
> <snip>
> 
>>> Any ideas?
>> The image got overwritten during decompression. Try loading the image at
>> a higher address.
> 
> Right. This works. But I'm wondering why this is the case, since "old" U-Boot 
> can decompress to this destination successfully. This is quite annoying, 
> since now I have to change all default env variables for this new "legacy" 
> bootm command. So do you have any idea where the difference comes from?

Hi Stefan,

It's because we assume that if the image got overwritten, its contents
can't be trusted anymore, and abort booting. "Old" U-Boot didn't care
about overwrites, which sometimes worked out OK, and sometimes didn't,
the latter case resulting in nasty failure modes.

The overwrite issue is particularly acute in case of the new image
format. Image is based on FDT and is being accessed via libfdt
functions, so if it gets overwritten, there's little point in processing
it further. But even with images in old format, this issue has been
brought up on this list, and there's been proposals to add safeguards.
So since overwrite checking was rather necessary for the new format, and
desired for the old one, it got added.

There's also a technical reason why the overwrite check is active even
when CONFIG_FIT is not defined. To minimize code size increase when
adding new format, a lot of boot-related code has been re-factored. In
particular, the decompression (and the check for the overwrite) is
handled by code common to new and old formats, and hence the check is
performed in both cases.

Regards,
Bartlomiej

  parent reply	other threads:[~2008-03-27 18:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-27 14:09 [U-Boot-Users] Current U-Boot doesn't boot device tree enabled kernel anymore Stefan Roese
2008-03-27 14:15 ` Bartlomiej Sieka
2008-03-27 14:25   ` Stefan Roese
2008-03-27 15:36     ` Markus Klotzbücher
2008-03-27 15:45       ` Stefan Roese
2008-03-27 16:25       ` Wolfgang Denk
2008-04-01  8:00         ` Bartlomiej Sieka
2008-03-27 18:56     ` Bartlomiej Sieka [this message]
2008-03-28 10:55       ` Stefan Roese

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=47EBEDE4.4050302@semihalf.com \
    --to=tur@semihalf.com \
    --cc=u-boot@lists.denx.de \
    /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