From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aneesh V Date: Tue, 01 Mar 2011 11:23:51 +0530 Subject: [U-Boot] Info on NAND-SPL In-Reply-To: <96382.60182.qm@web95116.mail.in2.yahoo.com> References: <96382.60182.qm@web95116.mail.in2.yahoo.com> Message-ID: <4D6C89EF.3060305@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Hatim, On Saturday 26 February 2011 05:04 PM, Hatim Ali wrote: > Hello, > > I was trying to understand how NAND-SPL works. What I could understand after seeing the code is that > 1) NAND-SPL is a standalone application which will load the U-boot in the main memory. > 2) After doing the clock and DRAM initialization it will relocate itself in the DRAM. > 3) Then it will copy the u-boot from the nand into the RAM and execute the u-boot. > > If my understanding is proper, then I have one doubt > 1) Since the nand_spl is making use of the same Start.S and lowlevel_init.S, the u-boot code will also perform relocation? So is it not a overhead doing relocation twice? As Albert mentioned in another mail, image copying and relocation can be suppressed by using your linked address as the target address when you call relocate_code. This is easier to achieve in SPL because we have a custom and simpler board_init_f. This is much more difficult to achieve in regular U-Boot because the target address is calculated at run-time in board_init_f and also depends on the U-Boot size. > > Also is there any similar implementation for MMC-SPL? You might want to have a look at the series I posted yesterday for OMAP4. Please note that relocation and image copying has been suppressed in this SPL. Br, Aneesh