
On Sun, Dec 19, 2010 at 10:19 PM, Jason Liu liu.h.jason@gmail.com wrote:
Hi, Stefano,
2010/12/17 Stefano Babic sbabic@denx.de:
On 12/17/2010 04:05 AM, Jason Liu wrote:
There is pretty much different with I.MX51 ROM, we will not use DCD data file to config the DDR script since ROM has the DCD size limitation and use the advance feature of what we called plug-in, the plug-in code must be in the first 2K of MMC card from 0x400 offset, that's why we need put this code section before start.S. The plug-in code will be called by boot ROM to do DDR init first and copy u-boot to DDR and jump to _start to run it.
As I am not understanding what you mean as "plugin", it seems to me you need some code able to set-up RAM and copy the u-boot code. This method looks like very similar to other SoCs, where a first stage boot loader is needed or when we boot from NAND.
Forget about the case about boot From NAND, we are talking about boot from SD/MMC card here. Why I call it here"plug-in", it due to it use the plugin feature of ROM.
This section of code is for ROM to load and run, thus it should meet the ROM boot structure requirement. The plugin feature of ROM can give more flexibility and it can overcome some shortcomings of DCD(used on mx51).
By using this plugin we can get around the following issues:
- DCD size limitation issue, plugin can be the size of OCRAM free space region.
- Safe environment to re-configure PLL1 (without impacting SDRAM) as
the plugin runs from OCRAM.
Jason: No one is arguing about the use the plugin feature. The objection is to how you are getting the plugin bits into the u-boot image. You should use a tool to prepend the plugins to the u-boot.bin file in a similar way to how mkimage is used for i.mx51 and others.
Stefano: I know Freescale has a binary to do this but I don't believe the source is available. The binary is included as a package in the i.mx28 BSP as well as some sample plugins.
You can find your way to the i.mx28 page by googling "site:freescale.com i.mx28 BSP" and following the top most hit. You have to register to download the BSP.
Once you download the BSP you will find a source archive called L2.6.31_10.08.01_SDK_source.tar.gz.
The sample plugin package is in the archive in a file called L2.6.31_10.08.01_SDK_source/pkgs/imx-bootlets-src-10.08.01.tar.gz. I guess bootlets are another name for plugins.
The binary utility for creating bootlets from elf files is called elftosb-0.4.tar.bz2 in the same archive. The utility appears to be a typical over engineered c++ pile of stuff. One would think that you could accomplish the same thing with objdump, and a patch to mkimage.
Chapter 12 of the i.mx28 Technical Reference Manual describes this, I have not seen a doc for i.mx53 yet and am just assuming that it is the same as i.mx28. http://cache.freescale.com/files/dsp/doc/ref_manual/MCIMX28RM.pdf
br,
John