diff mbox series

[v3,12/20] mips: enable support for appending dtb to spl binary

Message ID 1579594753-7154-1-git-send-email-weijie.gao@mediatek.com
State Accepted
Commit e9511193fa32464654bcb193c3ec62211dabac2d
Headers show
Series Refactor the architecture parts of mt7628 | expand

Commit Message

Weijie Gao Jan. 21, 2020, 8:19 a.m. UTC
If CONFIG_SPL_OF_CONTROL is enabled for SPL and CONFIG_OF_SEPARATE is also
enabled, the dtb will be appended to the u-boot-spl.bin.

When calling dm_init_and_scan() in SPL, fdtdec_setup() will try to locate
dtb at the end of u-boot-spl.bin, by referencing to _image_binary_end.

However _image_binary_end is currently missing in u-boot-spl.lds.
This patch adds _image_binary_end to u-boot-spl.lds to make sure linking
u-boot-spl will not fail.

Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck at gmail.com>
Signed-off-by: Weijie Gao <weijie.gao at mediatek.com>
---
Changes since v2: none
---
 arch/mips/cpu/u-boot-spl.lds | 2 ++
 1 file changed, 2 insertions(+)

Comments

Stefan Roese Jan. 21, 2020, 8:45 a.m. UTC | #1
On 21.01.20 09:19, Weijie Gao wrote:
> If CONFIG_SPL_OF_CONTROL is enabled for SPL and CONFIG_OF_SEPARATE is also
> enabled, the dtb will be appended to the u-boot-spl.bin.
> 
> When calling dm_init_and_scan() in SPL, fdtdec_setup() will try to locate
> dtb at the end of u-boot-spl.bin, by referencing to _image_binary_end.
> 
> However _image_binary_end is currently missing in u-boot-spl.lds.
> This patch adds _image_binary_end to u-boot-spl.lds to make sure linking
> u-boot-spl will not fail.
> 
> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck at gmail.com>
> Signed-off-by: Weijie Gao <weijie.gao at mediatek.com>
> ---
> Changes since v2: none

Reviewed-by: Stefan Roese <sr at denx.de>

Thanks,
Stefan
diff mbox series

Patch

diff --git a/arch/mips/cpu/u-boot-spl.lds b/arch/mips/cpu/u-boot-spl.lds
index d08d6222c4..e467491639 100644
--- a/arch/mips/cpu/u-boot-spl.lds
+++ b/arch/mips/cpu/u-boot-spl.lds
@@ -37,6 +37,8 @@  SECTIONS
 	. = ALIGN(4);
 	__image_copy_end = .;
 
+	_image_binary_end = .;
+
 	.bss (NOLOAD) : {
 		__bss_start = .;
 		*(.bss*)