public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Can't read kernel if bad blocks are present in partition
Date: Thu, 26 Apr 2012 14:28:21 -0500	[thread overview]
Message-ID: <4F99A1D5.5030005@freescale.com> (raw)
In-Reply-To: <4F9981B7.6000000@logicpd.com>

On 04/26/2012 12:11 PM, Peter Barada wrote:
> On 04/26/2012 07:27 AM, Alexandre Gambier wrote:
>> Hi,
>>
>> I'm working on a STM chip under linux and U-Boot 1.3.1.
>>
>> Here's my problem.
>> To boot linux up I load the kernel stored in a NAND device. If a bad 
>> block is present in the nand I can't load the kernel.
>>
>> To store the kernel I first erase the partition and write the kernel image.
>> During the erase stage, U-Boottells that a bad block has been skipped 
>> but everything's fine.
>>
>>    NAND erase: device 0 offset 0x520000, size 0x400000
>>    Skipping bad block at  0x005c0000
>>    Erasing at 0x900000 -- 100% complete.
>>    OK
>>
>> When I write the kernel image, U-Boottells that everything's fine.
>>
>>    NAND write: device 0 offset 0x520000, size 0x400000
>>     4194304 bytes written: OK
>>
>> But when I try to read the kernel, it fails.
>>
>>    NAND read: device 0 offset 0x520000, size 0x1a4bff
>>     1723391 bytes read: ERROR
>>
>>
>> I though U-Boot was able to handle bad block when reading back data..
>>
>> Did I forget to initialize something ?
>>
> Did you use "nand write.i"  to write the kernel and "nand read.i" to
> read the kernel? the ".i" tells u-boot to skip bad blocks...

That has been the default for a while now.  Why use something as ancient
as 1.3.1?

-Scott

  reply	other threads:[~2012-04-26 19:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-26 11:27 [U-Boot] Can't read kernel if bad blocks are present in partition Alexandre Gambier
2012-04-26 17:11 ` Peter Barada
2012-04-26 19:28   ` Scott Wood [this message]
2012-04-27  7:16     ` Alexandre Gambier
2012-04-27 14:29       ` Peter Barada
2012-04-27 17:39         ` Scott Wood
2012-05-02  6:55           ` Alexandre Gambier
2012-04-27 17:43       ` Scott Wood

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=4F99A1D5.5030005@freescale.com \
    --to=scottwood@freescale.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