]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
x86: Add an __end symbol to signal the end of the U-Boot binary
authorSimon Glass <sjg@chromium.org>
Thu, 28 Feb 2013 19:26:13 +0000 (19:26 +0000)
committerSimon Glass <sjg@chromium.org>
Mon, 4 Mar 2013 23:57:38 +0000 (15:57 -0800)
With this symbol we can easy append something (e.g. an FDT) to the U-Boot
binary and access it from within U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/x86/cpu/u-boot.lds
arch/x86/include/asm/u-boot-x86.h
arch/x86/lib/init_helpers.c

index 2313cd793a281fc2a1ac57b0794e63b70de94665..8e185f3b22d03cd22e0100c7dee93002a4ff981b 100644 (file)
@@ -67,6 +67,8 @@ SECTIONS
        __rel_dyn_start = .;
        .rel.dyn : { *(.rel.dyn) }
        __rel_dyn_end = .;
+       . = ALIGN(4);
+       _end = .;
 
        /DISCARD/ : { *(.dynstr*) }
        /DISCARD/ : { *(.dynamic*) }
index 99062e5955356dc9cd755b7e16ea1eb5d19e093f..948615d4385ef32bd41c95ad26ac1a1c90824ddd 100644 (file)
@@ -31,6 +31,7 @@ extern ulong __rel_dyn_start;
 extern ulong __rel_dyn_end;
 extern ulong __bss_start;
 extern ulong __bss_end;
+extern ulong _end;
 
 /* cpu/.../cpu.c */
 int x86_cpu_init_r(void);
index 1a097f101c159c4bafd1170cb9736f7e33074428..ff2d21f4c580d52dd716c84b784629ba148834f1 100644 (file)
@@ -188,7 +188,7 @@ int find_fdt(void)
        gd->fdt_blob = _binary_dt_dtb_start;
 #elif defined CONFIG_OF_SEPARATE
        /* FDT is at end of image */
-       gd->fdt_blob = (void *)(_end_ofs + _TEXT_BASE);
+       gd->fdt_blob = (ulong *)&_end;
 #endif
        /* Allow the early environment to override the fdt address */
        gd->fdt_blob = (void *)getenv_ulong("fdtcontroladdr", 16,