[U-Boot] [PATCH 2/2][v2] Add readme of how to boot from espi flash for p4080ds.
Xie Shaohui-B21989
B21989 at freescale.com
Wed Nov 17 11:25:05 CET 2010
From: Wood Scott-B07421
Sent: Wednesday, November 17, 2010 5:55 AM
To: Wolfgang Denk
Cc: Xie Shaohui-B21989; u-boot at lists.denx.de; Gala Kumar-B11780
Subject: Re: [U-Boot] [PATCH 2/2][v2] Add readme of how to boot from
espi flash for p4080ds.
On Tue, 16 Nov 2010 11:34:43 +0100
Wolfgang Denk <wd at denx.de> wrote:
> Dear Shaohui Xie,
>
> In message <1289897403-24602-1-git-send-email-b21989 at freescale.com>
you wrote:
> >
> > +The P4080 is capable of booting from SPI. The bootup process can be
divided into
> > +two stages: the first stage will load RCW and write configuration
registers to
> > +initialize SPI interface, and configure one CPC as 1M SRAM, and
loads U-boot image
> > +to CPC. The second stage will configure all the hardware and boot
up to U-Boot
> > +command line.
> > +
> > +The PBL image contains three parts, the first is RCW, the second is
PBI commands
> > +performs configuration registers write, the third is the 512KB
u-boot image. The
> > +PBL image is produced by tool pbl_image_tool.html.
>
> Please explain abbreviations. What's PBI? CPC?
PBI is pre-boot initialization.
CPC is corenet platform cache -- a.k.a. L3 cache.
> What is "pbl_image_tool.html"? I doubt that a HTML page can be used
> as tool?
The html file contains a javascript-based tool.
> And where can this tool be found? And why is it not part of the
> U-Boot distribution?
It *may* be bundled with the BSP -- not sure.
It would be really nice if it were made generally available, though I
don't know if there are any plans for that. Certainly we shouldn't be
referring users towards it if it's not publicly available.
> > +1. Producing RCW
> > +Copy RCW of u-boot dump and paste it to tab "Tools" of the tool and
choose
> > +"Boot" and change PBI_SRC to "0b0101 - SPI 24b Addressing", change
BOOT_LOC to
>
> You really mean one has to go to some web page and manually copy and
> paste information there?
>
> To build some image?
>
> May I ask how you do automatic regression testing?
We usually use xxd to turn a hex dump of an RCW into a binary. You
only need the tool if you want something interactive to make changes to
the RCW.
The problem with providing such a hexdump here is that it would contain
other settings that may not be appropriate for the board's
configuration. RCWs on p4080 are a lot more complicated than on older
chips; it's no longer practical to embed a near-universal default
RCW in the U-Boot build.
> > +2. Producing ACS File
>
> What is ACS?
Don't know, I don't even have a reference to that in my copy of the RCW
tool. :-P
[Xie Shaohui] I don't know what is the ACS stands for either, but it is
a XXD object dump file used by the tool to produce PBI, for example
after run "xxd u-boot.bin > u-boot.xxd", the output u-boot.xxd is the
"XXD object dump file". If you take a look at the tool, you will find a
selection labeled with "ACS File (XXD object dump)" in tab "PBI".
> > + make P4080DS_PBL_BOOT_INDIRECT_config
> > + make CROSS_COMPILE=powerpc-none-linux-gnuspe- all
> > + xxd u-boot.bin > u-boot.xxd
>
> > +3. Producing PBI commands
> > +Switch to tab "PBI" and paste commands below into text field
(please note these
> > +commands are for CPC1 used as SRAM only, change corresponding
register setting
> > +if CPC2 need to be used as SRAM), then choose "ACS File (XXD Object
Dump)",
> > +change Offset to "f80000", and click "Browse" to select the
u-boot.xxd file
> > +produced in step 2, and click "Add PBI Data", after it finished,
paste
> > +"09138000 00000000" and "091380c0 00000000" at the end.
>
> This must be a bad joke.
>
> Can you not provide a plain and simple AUTOMATIC way to get this
> result? some plain stupid command line tool? Something that works as
> a simple "make XXX" ? So it can be scripted / automatized / used?
Yes, a simple C tool to take an existing PBL or RCW dump and "espi-ize"
it into a PBL dump would be nice. The user will still need to acquire
the existing RCW manually. This only needs to be done once on a board;
it's not part of building a U-Boot image.
[Xie Shaohui] A simple C tool will make things more complex, the
pbl_image_tool does the same thing and it is irreplaceable, something
like RCW has to be produced manually, and because there is no
near-universal default RCW, this README took a basic assumption that
user already can boot from NOR flash, so user can reuse the RCW dump of
NOR u-boot with change "PBI_SRC" and "BOOT_LOC" only.
This README describes how to build an Image can be used by PBL (pre-boot
loader), building u-boot image is the first step, then RCW, PBI
commands, XXD dump of u-boot.bin, the tool will combine the RCW and PBI
and XXD dump together to produce the PBL XXD file, suppose the PBL XXD
file is saved as x.xxd, we need to run "xxd -r x.xxd > pbl_image.bin" to
produce the final PBL Image. Take a look at the whole process, I see no
way it can be scripted / automatized.
Best Regards,
Shaohui Xie
More information about the U-Boot
mailing list