From: Marc Reilly <marc@cpdesign.com.au>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/2] imx: Internal boot sources, handle all header offsets
Date: Sat, 2 Oct 2010 12:20:47 +1000 [thread overview]
Message-ID: <201010021220.48068.marc@cpdesign.com.au> (raw)
In-Reply-To: <20101001165324.GG25320@game.jcrosoft.org>
On Saturday, October 02, 2010 02:53:24 am Jean-Christophe PLAGNIOL-VILLARD
wrote:
> On 14:58 Fri 01 Oct , Marc Reilly wrote:
> > Hi,
> >
> > > > -#define __image_len_0x100 __section(.image_len_0x100)
> > > > +#if defined(CONFIG_ARCH_IMX_INTERNAL_BOOT_NOR)
> > > > + #define __flash_header_section __section(.flash_header_0x1000)
> > > > + #define __dcd_entry_section __section(.dcd_entry_0x1000)
> > > > + #define __image_len_section __section(.image_len_0x1000)
> > > > + #define FLASH_HEADER_OFFSET 0x1000
> > > > +#elif defined(CONFIG_ARCH_IMX_INTERNAL_BOOT_ONENAND)
> > > > + #define __flash_header_section __section(.flash_header_0x0100)
> > > > + #define __dcd_entry_section __section(.dcd_entry_0x0100)
> > > > + #define __image_len_section __section(.image_len_0x0100)
> > > > + #define FLASH_HEADER_OFFSET 0x0100
> > >
> > > nor and onenand are the same why duplicate them?
> >
> > They look similar but, NOR offset is at 4Kb (0x1000), OneNand is 256b
> > (0x100).
> >
> > (The leading zero for 0x0100 doesn't help, but is necessary otherwise the
(Clarification here, I meant that the leading zero potentially makes them look
more similar)
> > blah_0x1000 matches the blah_0x100* linker section.)
>
> why do we need specific section name?
Only the the final link location really matters, there are three locations
that the internal boot ROM could look for the flash header info, depending on
the type of external media.
The way it was set up was that there were the three predefined sections that
would be located at the correct address. The approach I took with these
patches was to just keep that the same.
Looking back, possibly there is a simpler way to do it, but I've got to move
on to other things.
Cheers
Marc
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2010-10-02 2:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-01 3:40 Marc Reilly
2010-10-01 3:40 ` [PATCH 2/2] Update flash headers for boards supporting internal boot Marc Reilly
2010-10-01 4:29 ` [PATCH 1/2] imx: Internal boot sources, handle all header offsets Jean-Christophe PLAGNIOL-VILLARD
2010-10-01 4:58 ` Marc Reilly
2010-10-01 16:53 ` Jean-Christophe PLAGNIOL-VILLARD
2010-10-02 2:20 ` Marc Reilly [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=201010021220.48068.marc@cpdesign.com.au \
--to=marc@cpdesign.com.au \
--cc=barebox@lists.infradead.org \
--cc=plagnioj@jcrosoft.com \
/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