From patchwork Wed Apr 8 08:09:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 237372 List-Id: U-Boot discussion From: sr at denx.de (Stefan Roese) Date: Wed, 8 Apr 2020 10:09:28 +0200 Subject: [PATCH 12/26 v6] mips: enable support for appending dtb to spl binary In-Reply-To: <20200408080942.7694-1-sr@denx.de> References: <20200408080942.7694-1-sr@denx.de> Message-ID: <20200408080942.7694-13-sr@denx.de> From: Weijie Gao 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: Stefan Roese Reviewed-by: Daniel Schwierzeck Signed-off-by: Weijie Gao --- Changes since v3: none arch/mips/cpu/u-boot-spl.lds | 2 ++ 1 file changed, 2 insertions(+) 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*)