public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Grant Erickson <gerickson@nuovations.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Loading from NAND using 'nboot' Periodically Fails Where 'nand read' Succeeds
Date: Thu, 05 Jun 2008 15:59:52 -0700	[thread overview]
Message-ID: <C46DBDF8.F9EA%gerickson@nuovations.com> (raw)
In-Reply-To: <C46DB701.F9E7%gerickson@nuovations.com>

On 6/5/08 3:30 PM, Grant Erickson wrote:
> I'm following up with you on this since 'git blame cmd_nand.c' seems to
> indicate you added the CONFIG_FIT support to this file.
> 
> Based on stepping through with the debugger, my initial guess about hardware
> issues may have been incorrect. Is there an implicit assumption in the
> following snippet from nand_load_image() in cmd_nand.c:
> 
> [ code omitted ]
> 
> that casting 'addr' to 'fit_hdr' represents more than 512 bytes of valid data
> to be accessed by fit_check_format()? If so, should not 'cnt = nand->oobblock'
> be explicitly set to match that assumption?
> 
> I am guessing that my observation that NFS booting and nand read.i addressed
> the issue strictly had to do with the fact that the 8 MiB address to which
> those operate were not getting used or otherwise updated between resets after
> the boot of the kernel allowing subsequent runs of 'nboot' to "leverage" the
> stale data.

The boot.itb image I have in NAND is 0x13CB98 bytes in size. Running a
series of 'nand read.i ${bootaddr} 0 <...>':

    => nand read.i ${bootaddr} 0 1000 && iminfo ${bootaddr}
    ## Checking Image at 00800000 ...
       FIT image found
    Bad FIT image format!
    
    => nand read.i ${bootaddr} 0 2000 && iminfo ${bootaddr}
    ...
    => nand read.i ${bootaddr} 0 4000 && iminfo ${bootaddr}
    ...
    => nand read.i ${bootaddr} 0 8000 && iminfo ${bootaddr}
    ...
    => nand read.i ${bootaddr} 0 10000 && iminfo ${bootaddr}
    ...
    => nand read.i ${bootaddr} 0 20000 && iminfo ${bootaddr}
    ...
    => nand read.i ${bootaddr} 0 40000 && iminfo ${bootaddr}
    ...
    => nand read.i ${bootaddr} 0 80000 && iminfo ${bootaddr}
    ...
    => nand read.i ${bootaddr} 0 100000 && iminfo ${bootaddr}
    ...
    => nand read.i ${bootaddr} 0 200000 && iminfo ${bootaddr}
    ...
    ## Checking Image at 00800000 ...
       FIT image found
       FIT description: Linux Kernel with Device Tree
        Image 0 (kernel at 1)
         Description:  Kernel
         Type:         Kernel Image
         Compression:  gzip compressed
         Data Start:   0x008000c8
    ...

So, it would appear that the answer, at least for this trivial boot.itb of a
kernel and DTB, for how large must the initial value of 'cnt' be is "as
large as the image being nboot'ed is". That said, it looks like nboot and
FIT images may not work together at present with today's code.

Any thoughts?

Regards,

Grant

  reply	other threads:[~2008-06-05 22:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-02  1:53 [U-Boot-Users] Loading from NAND using 'nboot' Periodically Fails Where 'nand read' Succeeds Grant Erickson
2008-06-02  6:22 ` Stefan Roese
2008-06-02 18:21   ` Scott Wood
2008-06-02 22:02     ` Grant Erickson
2008-06-02 22:07       ` [U-Boot-Users] Non-block-skipping NAND commands (was: Loading from NAND using 'nboot' Periodically Fails Where 'nand read' Succeeds) Scott Wood
2008-06-03  0:48         ` Stuart Wood
2008-06-03  6:09         ` Stefan Roese
2008-06-04  7:19         ` Matthias Fuchs
2008-06-04  9:56         ` [U-Boot-Users] Non-block-skipping NAND commands Detlev Zundel
2008-06-05 20:47       ` [U-Boot-Users] Loading from NAND using 'nboot' Periodically Fails Where 'nand read' Succeeds Grant Erickson
2008-06-05 22:30         ` Grant Erickson
2008-06-05 22:59           ` Grant Erickson [this message]
2008-06-06  7:38             ` Marian Balakowicz

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=C46DBDF8.F9EA%gerickson@nuovations.com \
    --to=gerickson@nuovations.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