From: Ian Campbell <ijc@hellion.org.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/5] nand: sunxi: change BLOCK_SIZE in mksunxiboot to match NAND block size
Date: Sat, 09 May 2015 14:51:23 +0100 [thread overview]
Message-ID: <1431179483.15640.306.camel@hellion.org.uk> (raw)
In-Reply-To: <87383bv1mc.fsf@hellsgate.pl>
On Tue, 2015-05-05 at 11:02 +0200, Daniel Kochma?ski wrote:
> Ian Campbell writes:
>
> > On Wed, 2015-04-29 at 17:02 +0200, Daniel Kochma?ski wrote:
> >> This change is necessary to calculate correct checksum for NAND
> >> boot. Works both for MMC and NAND. Without it BROM rejects boot image
> >> as invalid (bad checksum). (Changes block size from 0x200 to 0x2000).
> >
> > I'm inferring here that for MMC boot this checksum is ignored by the
> > BROM? If that is the case then I think it should be explicitly
> > mentioned.
>
> It isn't ignored, just larger block is taken into checksum and put in
> header (which is read by BROM). I think, that in NAND case BROM just
> ignores length field in header, and calculates checksum for whole page
> (8KB), while on MMC it respects this field, hence 0x2000 works for
> both.
OK, please add an explanation along these lines to the commit message.
> I've tried to put garbage into checksum field, and MMC doesn't boot if
> checksum isn't correct.
> >
> > As well as the checksum this also changes the header's length field,
> > FWIW.
> >
>
> Yes, this is true. Should I change it to set block size conditionally
> depending on defines - if it's SPL NAND boot, then use 0x2000, in other
> occasion use 0x200?
I don't think that is necessary assuming...
> Whole `u-boot-sunxi-with-spl.bin` size doesn't
> increase tough (probably because of space between spl and proper
> u-boot).
... this is actually the case, then you could just say it in the commit
log.
next prev parent reply other threads:[~2015-05-09 13:51 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-29 15:02 [U-Boot] [PATCH 0/5] nand: sunxi: Add SPL support for booting from NAND Daniel Kochmański
2015-04-29 15:02 ` [U-Boot] [PATCH 1/5] nand: sunxi: change BLOCK_SIZE in mksunxiboot to match NAND block size Daniel Kochmański
2015-05-02 14:08 ` Ian Campbell
2015-05-05 9:02 ` Daniel Kochmański
2015-05-09 13:51 ` Ian Campbell [this message]
2015-04-29 15:02 ` [U-Boot] [PATCH 2/5] nand: sunxi: Add support for booting from internal NAND memory Daniel Kochmański
2015-05-02 14:21 ` Ian Campbell
2015-05-05 9:14 ` Daniel Kochmański
2015-05-05 9:19 ` Daniel Kochmański
2015-05-09 13:53 ` Ian Campbell
2015-05-09 14:33 ` Hans de Goede
2015-05-18 23:47 ` Scott Wood
2015-04-29 15:02 ` [U-Boot] [PATCH 3/5] nand: sunxi: Add secondary U-Boot offset on second syndrome partition Daniel Kochmański
2015-05-02 14:24 ` Ian Campbell
2015-05-05 14:21 ` Tim Harvey
2015-05-05 14:34 ` Daniel Kochmański
2015-05-18 23:10 ` Scott Wood
2015-04-29 15:03 ` [U-Boot] [PATCH 4/5] nand: sunxi: Add multiimage preload option Daniel Kochmański
2015-05-02 14:24 ` Ian Campbell
2015-05-18 23:43 ` Scott Wood
2015-04-29 15:03 ` [U-Boot] [PATCH 5/5] nand: sunxi: And a20_nandread command utilizing spl nand read driver Daniel Kochmański
2015-05-02 14:26 ` Ian Campbell
2015-05-04 14:20 ` Hans de Goede
2015-05-05 9:17 ` Daniel Kochmański
2015-05-05 9:45 ` Hans de Goede
2015-05-18 23:52 ` 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=1431179483.15640.306.camel@hellion.org.uk \
--to=ijc@hellion.org.uk \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.