]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mips: add an option to enable u_boot_list section for SPL loaders in u-boot-spl.lds
authorWeijie Gao <weijie.gao@mediatek.com>
Tue, 21 Apr 2020 07:28:37 +0000 (09:28 +0200)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Mon, 27 Apr 2020 18:29:33 +0000 (20:29 +0200)
u_boot_list is not only used by DM, but also by some SPL image load methods
such as spl_nor.c.

This patch adds an option CONFIG_SPL_LOADER_SUPPORT in conjunction with
CONFIG_SPL_DM surrounding the u_boot_list section to make sure SPL image
loaders can be correctly built into u-boot SPL without DM enabled.

Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
arch/mips/Kconfig
arch/mips/cpu/u-boot-spl.lds

index 5e20feeefb8b021d9903e56eb13d99ffaacc80f7..b76ad8c4518fe38bf5001ddc4f9a39b31cf5e1df 100644 (file)
@@ -317,6 +317,12 @@ config NEW_EXCEPTION_VECTOR_BASE
        help
          The exception vector base to be restored before booting linux kernel
 
+config SPL_LOADER_SUPPORT
+       bool
+       default n
+       help
+         Enable this option if you want to use SPL loaders without DM enabled.
+
 endmenu
 
 menu "OS boot interface"
index e4674916393b4ed2b452409071401ea28e395aac..28ea4f2a481dea61e513ef5956d5724bb1413c90 100644 (file)
@@ -27,7 +27,7 @@ SECTIONS
                *(SORT_BY_ALIGNMENT(.sdata*))
        } > .spl_mem
 
-#ifdef CONFIG_SPL_DM
+#if defined(CONFIG_SPL_DM) || defined(CONFIG_SPL_LOADER_SUPPORT)
        . = ALIGN(4);
        .u_boot_list : {
                KEEP(*(SORT(.u_boot_list*)));