diff mbox series

[v5,03/25] mips: add __image_copy_len for SPL linker script

Message ID f6033f6a6590ebc62293a47af2960548809e20ff.1652667687.git.weijie.gao@mediatek.com
State Superseded
Delegated to: Daniel Schwierzeck
Headers show
Series Add support for MediaTek MT7621 SoC - v5 | expand

Commit Message

Weijie Gao (高惟杰) May 16, 2022, 2:42 a.m. UTC
This patch adds __image_copy_len needed by TPL of MT7621 SoC.
The __image_copy_len represents the binary blob size of both SPL/TPL
binaries. To achieve this, __text_start/end are added for calculation.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
v5 changes: none
v4 changes: new
---
 arch/mips/cpu/u-boot-spl.lds | 3 +++
 1 file changed, 3 insertions(+)

Comments

Daniel Schwierzeck May 17, 2022, 8:52 p.m. UTC | #1
On 16.05.22 04:42, Weijie Gao wrote:
> This patch adds __image_copy_len needed by TPL of MT7621 SoC.
> The __image_copy_len represents the binary blob size of both SPL/TPL
> binaries. To achieve this, __text_start/end are added for calculation.
> 
> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
> ---
> v5 changes: none
> v4 changes: new
> ---
>   arch/mips/cpu/u-boot-spl.lds | 3 +++
>   1 file changed, 3 insertions(+)
> 

Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
diff mbox series

Patch

diff --git a/arch/mips/cpu/u-boot-spl.lds b/arch/mips/cpu/u-boot-spl.lds
index 28ea4f2a48..f88754ab56 100644
--- a/arch/mips/cpu/u-boot-spl.lds
+++ b/arch/mips/cpu/u-boot-spl.lds
@@ -13,7 +13,9 @@  SECTIONS
 
 	. = ALIGN(4);
 	.text : {
+		__text_start = .;
 		*(.text*)
+		__text_end = .;
 	} > .spl_mem
 
 	. = ALIGN(4);
@@ -36,6 +38,7 @@  SECTIONS
 
 	. = ALIGN(4);
 	__image_copy_end = .;
+	__image_copy_len = __image_copy_end - __text_start;
 
 	_image_binary_end = .;