42339bdebf828e790de82189bb298ca0fe570535
[openwrt/staging/wigyori.git] /
1 From 71ebc3d25147172e219ea87bec061f751257395b Mon Sep 17 00:00:00 2001
2 From: Weijie Gao <weijie.gao@mediatek.com>
3 Date: Fri, 20 May 2022 11:21:45 +0800
4 Subject: [PATCH 03/25] mips: add __image_copy_len for SPL linker script
5
6 This patch adds __image_copy_len needed by TPL of MT7621 SoC.
7 The __image_copy_len represents the binary blob size of both SPL/TPL
8 binaries. To achieve this, __text_start/end are added for calculation.
9
10 Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
11 Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
12 ---
13 arch/mips/cpu/u-boot-spl.lds | 3 +++
14 1 file changed, 3 insertions(+)
15
16 diff --git a/arch/mips/cpu/u-boot-spl.lds b/arch/mips/cpu/u-boot-spl.lds
17 index 28ea4f2a48..f88754ab56 100644
18 --- a/arch/mips/cpu/u-boot-spl.lds
19 +++ b/arch/mips/cpu/u-boot-spl.lds
20 @@ -13,7 +13,9 @@ SECTIONS
21
22 . = ALIGN(4);
23 .text : {
24 + __text_start = .;
25 *(.text*)
26 + __text_end = .;
27 } > .spl_mem
28
29 . = ALIGN(4);
30 @@ -36,6 +38,7 @@ SECTIONS
31
32 . = ALIGN(4);
33 __image_copy_end = .;
34 + __image_copy_len = __image_copy_end - __text_start;
35
36 _image_binary_end = .;
37
38 --
39 2.36.1
40