summaryrefslogtreecommitdiff
path: root/doc/README.TPL
diff options
context:
space:
mode:
authorYing Zhang <b40530@freescale.com>2013-08-16 15:16:15 +0800
committerYork Sun <yorksun@freescale.com>2013-08-20 09:57:22 -0700
commit3aa29de0b04be9d56251474d1036b23da249f607 (patch)
tree5d23f12c6be7f1a687911cc0759af856d687ea6b /doc/README.TPL
parent382ce7e909c09ba28da5763e717efac7a2c4d156 (diff)
downloadu-boot-imx-3aa29de0b04be9d56251474d1036b23da249f607.zip
u-boot-imx-3aa29de0b04be9d56251474d1036b23da249f607.tar.gz
u-boot-imx-3aa29de0b04be9d56251474d1036b23da249f607.tar.bz2
TPL : introduce the TPL based on the SPL
Due to the nand SPL on some board(e.g. P1022DS)has a size limit, it can not be more than 4K. So, the SPL cannot initialize the DDR with the SPD code. This patch introduces TPL to enable a loader stub that is loaded by the code from the SPL. It initializes the DDR with the SPD or other operations. The TPL's size is sizeable, the maximum size is decided by the memory's size that TPL runs. It initializes the DDR through SPD code, and copys final uboot image to DDR. So there are three stage uboot images: * spl_boot, * tpl_boot, * final uboot image Signed-off-by: Ying Zhang <b40530@freescale.com> Acked-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'doc/README.TPL')
-rw-r--r--doc/README.TPL45
1 files changed, 45 insertions, 0 deletions
diff --git a/doc/README.TPL b/doc/README.TPL
new file mode 100644
index 0000000..1df03b9
--- /dev/null
+++ b/doc/README.TPL
@@ -0,0 +1,45 @@
+Generic TPL framework
+=====================
+
+Overview
+--------
+
+TPL---Third Program Loader.
+
+Due to the SPL on some boards(powerpc mpc85xx) has a size limit and cannot
+be compatible with all the external device(e.g. DDR). So add a tertiary
+program loader (TPL) to enable a loader stub loaded by the code from the
+SPL. It loads the final uboot image into DDR, then jump to it to begin
+execution. Now, only the powerpc mpc85xx has this requirement and will
+implemente it.
+
+Keep consistent with SPL, with this framework almost all source files for a
+board can be reused. No code duplication or symlinking is necessary anymore.
+
+How it works
+------------
+
+There has been a directory TOPDIR/spl which contains only a Makefile. The
+Makefile is shared by SPL and TPL.
+
+The object files are built separately for SPL/TPL and placed in the
+directory spl/tpl. The final binaries which are generated are
+u-boot-{spl|tpl}, u-boot-{spl|tpl}.bin and u-boot-{spl|tpl}.map.
+
+During the TPL build a variable named CONFIG_TPL_BUILD is exported in the
+make environment and also appended to CPPFLAGS with -DCONFIG_TPL_BUILD.
+
+The SPL options are shared by SPL and TPL, the board config file should
+determine which SPL options to choose based on whether CONFIG_TPL_BUILD
+is set. Source files can be compiled for TPL with options choosed in the
+board config file.
+
+For example:
+
+spl/Makefile:
+LIBS-$(CONFIG_SPL_LIBCOMMON_SUPPORT) += common/libcommon.o
+
+CONFIG_SPL_LIBCOMMON_SUPPORT is defined in board config file:
+#ifdef CONFIG_TPL_BUILD
+#define CONFIG_SPL_LIBCOMMON_SUPPORT
+#endif