From: Marian Balakowicz <m8@semihalf.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Loading from NAND using 'nboot' Periodically Fails Where 'nand read' Succeeds
Date: Fri, 06 Jun 2008 09:38:51 +0200 [thread overview]
Message-ID: <4848E98B.9010007@semihalf.com> (raw)
In-Reply-To: <C46DBDF8.F9EA%gerickson@nuovations.com>
Hi Grant,
Grant Erickson wrote:
> 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 <...>':
>
...
>
> 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?
Doing a FIT format check on a first sector data is obviously wrong.
This was a good spot for such check with the initial implementation of
the routine, but it should have been corrected after that changed,
stupid me. As you'll note fit_print_contents() call is deferred, and
that is for the same reason, it needs the whole image data to operate
on. Same, for format check, it cannot be done earlier than that.
I'll post a patch later today that fixes it, please give it a try on
your system.
Cheers,
m.
prev parent reply other threads:[~2008-06-06 7:38 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
2008-06-06 7:38 ` Marian Balakowicz [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=4848E98B.9010007@semihalf.com \
--to=m8@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