码迷,mamicode.com
首页 > 其他好文 > 详细

Two stage U-Boot design

时间:2016-10-02 19:41:02      阅读:317      评论:0      收藏:0      [点我收藏+]

标签:

In AM335x the ROM code serves as the bootstrap loader, sometimes referred to as the Initial Program Loader (IPL)
or the Primary Program Loader (PPL). The booting is completed in two consecutive stages by U-Boot [1] binaries.
The binary for the 1st U-Boot stage is referred to as the Secondary Program Loader (SPL) or the MLO. The binary
for the 2nd U-Boot stage is simply referred to as U-Boot. SPL is a non-interactive loader and is a specially built
version of U-Boot. It is built concurrently when building U-Boot.

This section gives an overview of the two stage U-Boot approach adopted for TI814X and TI813X.
The size of the internal RAM in TI814X is 128KB out of which 18KB at the end is used by the ROM code. This
placed a limit of 110KB on the size of the U-Boot binary which the ROM code can transfer to the internal RAM.
U-Boot also requires some space for the stack, heap and global data during executing and this region currently needs
to be setup before the TEXT_BASE of U-Boot.
Since it is not possible to squeeze in all the functionality that is normally expected from U-Boot in < 110KB (after
setting aside some space for stack, heap etc) a two stage approach has been adopted.
The first stage (or rather the 2nd stage if the ROM code is also considered) is built using a minimal configuration and
has an embedded ENV. The purpose of this stage is to initialize the necessary peripherals, especially DDR, so that a
full fledged U-Boot can be transferred to DDR from NAND/SPI/SD/UART/NOR and then control passed to it.
The boot command that the minimal U-Boot uses for fetching the larger U-Boot will not change for a particular boot
mode as long as the same layout is used and is hence fixed. If any other behavior required then the minimal U-Boot
stage can be interrupted and a different command issued.
The minimal U-Boot binary also has a hole at the top which is used as the space for stack, heap and global data.
After some analysis the size of the hole has currently been set as 12KB.

Note
To avoid over-writing U-Boot when it is executing make sure that an address greater than 0x80800000 is used when
downloading the kernel and/or filesystem images

参考:

AM335x U-Boot User‘s Guide

 

TI81XX PSP UBOOT User Guide

Two stage U-Boot design

标签:

原文地址:http://www.cnblogs.com/embedded-linux/p/5927874.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!