]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
SPL: Enable use of custom defined U-Boot entry point
authorStefan Roese <sr@denx.de>
Tue, 28 Aug 2012 08:50:59 +0000 (10:50 +0200)
committerTom Rini <trini@ti.com>
Thu, 27 Sep 2012 18:20:27 +0000 (11:20 -0700)
By setting CONFIG_SYS_UBOOT_START boards can now use a different entry
point for their U-Boot image. So the U-Boot entry point is not fixed
to CONFIG_SYS_TEXT_BASE any more.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
common/spl/spl.c

index 40de45491e4a8ea9d058dd8e52e0f14cc1ec8b1d..14f7bdb49e7a430876a7acc00fe73d1b7194cd03 100644 (file)
@@ -35,6 +35,9 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#ifndef CONFIG_SYS_UBOOT_START
+#define CONFIG_SYS_UBOOT_START CONFIG_SYS_TEXT_BASE
+#endif
 #ifndef CONFIG_SYS_MONITOR_LEN
 #define CONFIG_SYS_MONITOR_LEN (200 * 1024)
 #endif
@@ -104,7 +107,7 @@ void spl_parse_image_header(const struct image_header *header)
                        header->ih_magic);
                /* Let's assume U-Boot will not be more than 200 KB */
                spl_image.size = CONFIG_SYS_MONITOR_LEN;
-               spl_image.entry_point = CONFIG_SYS_TEXT_BASE;
+               spl_image.entry_point = CONFIG_SYS_UBOOT_START;
                spl_image.load_addr = CONFIG_SYS_TEXT_BASE;
                spl_image.os = IH_OS_U_BOOT;
                spl_image.name = "U-Boot";