Merge tag 'u-boot-amlogic-20181207' of git://git.denx.de/u-boot-amlogic
[platform/kernel/u-boot.git] / arch / arm / mach-at91 / arm926ejs / u-boot-spl.lds
index acadd1d..b714e93 100644 (file)
@@ -1,8 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * Copyright (C) 2015 Atmel Corporation
  *                   Bo Shen <voice.shen@atmel.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 MEMORY { .sram : ORIGIN = CONFIG_SPL_TEXT_BASE, \
@@ -30,6 +29,9 @@ SECTIONS
        .data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram
 
        . = ALIGN(4);
+       .u_boot_list : { KEEP(*(SORT(.u_boot_list*))) } > .sram
+
+       . = ALIGN(4);
        __image_copy_end = .;
 
        .end :
@@ -46,3 +48,13 @@ SECTIONS
                __bss_end = .;
        } >.sdram
 }
+
+#if defined(CONFIG_SPL_MAX_SIZE)
+ASSERT(__image_copy_end - __start < (CONFIG_SPL_MAX_SIZE), \
+       "SPL image too big");
+#endif
+
+#if defined(CONFIG_SPL_BSS_MAX_SIZE)
+ASSERT(__bss_end - __bss_start < (CONFIG_SPL_BSS_MAX_SIZE), \
+       "SPL image BSS too big");
+#endif