diff options
author | Pali Rohár <pali@kernel.org> | 2021-08-02 15:18:34 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-09-01 16:06:44 -0400 |
commit | cddad2f171708d9f93f7c2e9f0f5c2f14da8efc8 (patch) | |
tree | b76b9bffd5af1fd774b98e70028da10e525b0f87 | |
parent | 6836f181bf15d73e382c510b16a6014a712e0b61 (diff) | |
download | u-boot-cddad2f171708d9f93f7c2e9f0f5c2f14da8efc8.tar.gz |
powerpc: mpc: Put U-Boot version string at correct place by linker script
It is unknown by version string is placed at specific position on these
powerpc mpc platforms. But there is no need to overload version_string
symbol. Just use common definition of version_string and modify linker
script to put it at "correct place".
Signed-off-by: Pali Rohár <pali@kernel.org>
-rw-r--r-- | arch/powerpc/cpu/mpc83xx/start.S | 10 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc83xx/u-boot.lds | 3 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc85xx/start.S | 10 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc85xx/u-boot-nand.lds | 4 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc85xx/u-boot-spl.lds | 4 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc85xx/u-boot.lds | 4 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc8xx/start.S | 9 | ||||
-rw-r--r-- | board/cssi/MCR3000/u-boot.lds | 2 |
8 files changed, 28 insertions, 18 deletions
diff --git a/arch/powerpc/cpu/mpc83xx/start.S b/arch/powerpc/cpu/mpc83xx/start.S index 9da22ce486..cc1d80368a 100644 --- a/arch/powerpc/cpu/mpc83xx/start.S +++ b/arch/powerpc/cpu/mpc83xx/start.S @@ -13,7 +13,6 @@ #include <asm-offsets.h> #include <config.h> #include <mpc83xx.h> -#include <version.h> #define CONFIG_83XX 1 /* needed for Linux kernel header files*/ @@ -76,7 +75,7 @@ * times so the processor can fetch it out of flash whether the flash * is 8, 16, 32, or 64 bits wide (hardware trickery). */ - .text + .text_pre #define _HRCW_TABLE_ENTRY(w) \ .fill 8,1,(((w)>>24)&0xff); \ .fill 8,1,(((w)>>16)&0xff); \ @@ -92,12 +91,9 @@ */ .long 0x27051956 /* U-Boot Magic Number */ - .globl version_string -version_string: - .ascii U_BOOT_VERSION_STRING, "\0" - - .align 2 +/* U-Boot version string is filled at this place by linker script */ + .text .globl enable_addr_trans enable_addr_trans: /* enable address translation */ diff --git a/arch/powerpc/cpu/mpc83xx/u-boot.lds b/arch/powerpc/cpu/mpc83xx/u-boot.lds index d10f528da4..309082bc3d 100644 --- a/arch/powerpc/cpu/mpc83xx/u-boot.lds +++ b/arch/powerpc/cpu/mpc83xx/u-boot.lds @@ -10,6 +10,9 @@ SECTIONS /* Read-only sections, merged into text segment: */ .text : { + arch/powerpc/cpu/mpc83xx/start.o (.text_pre) + *(.text_version_string) + . = ALIGN(2); arch/powerpc/cpu/mpc83xx/start.o (.text*) *(.text*) . = ALIGN(16); diff --git a/arch/powerpc/cpu/mpc85xx/start.S b/arch/powerpc/cpu/mpc85xx/start.S index f41e82ad18..f89072d38d 100644 --- a/arch/powerpc/cpu/mpc85xx/start.S +++ b/arch/powerpc/cpu/mpc85xx/start.S @@ -14,7 +14,6 @@ #include <asm-offsets.h> #include <config.h> #include <mpc85xx.h> -#include <version.h> #include <ppc_asm.tmpl> #include <ppc_defs.h> @@ -1134,15 +1133,14 @@ switch_as: blr #endif - .text + .text_pre .globl _start _start: .long 0x27051956 /* U-BOOT Magic Number */ - .globl version_string -version_string: - .ascii U_BOOT_VERSION_STRING, "\0" - .align 4 +/* U-Boot version string is filled at this place by linker script */ + + .text .globl _start_cont _start_cont: /* Setup the stack in initial RAM,could be L2-as-SRAM or L1 dcache*/ diff --git a/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds b/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds index 75b0285e4e..6e48223380 100644 --- a/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds +++ b/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds @@ -25,6 +25,10 @@ SECTIONS .interp : { *(.interp) } .text : { + arch/powerpc/cpu/mpc85xx/start.o (.text_pre) + *(.text_version_string) + . = ALIGN(4); + arch/powerpc/cpu/mpc85xx/start.o (.text*) *(.text*) } :text _etext = .; diff --git a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds index 27a5fe6306..2312cd47f1 100644 --- a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds +++ b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds @@ -20,6 +20,10 @@ SECTIONS { . = IMAGE_TEXT_BASE; .text : { + arch/powerpc/cpu/mpc85xx/start.o (.text_pre) + *(.text_version_string) + . = ALIGN(4); + arch/powerpc/cpu/mpc85xx/start.o (.text*) *(.text*) } _etext = .; diff --git a/arch/powerpc/cpu/mpc85xx/u-boot.lds b/arch/powerpc/cpu/mpc85xx/u-boot.lds index 22bbac51aa..40d181ef2c 100644 --- a/arch/powerpc/cpu/mpc85xx/u-boot.lds +++ b/arch/powerpc/cpu/mpc85xx/u-boot.lds @@ -31,6 +31,10 @@ SECTIONS .interp : { *(.interp) } .text : { + arch/powerpc/cpu/mpc85xx/start.o (.text_pre) + *(.text_version_string) + . = ALIGN(4); + arch/powerpc/cpu/mpc85xx/start.o (.text*) *(.text*) } :text _etext = .; diff --git a/arch/powerpc/cpu/mpc8xx/start.S b/arch/powerpc/cpu/mpc8xx/start.S index ed735cdee0..d7003c76ca 100644 --- a/arch/powerpc/cpu/mpc8xx/start.S +++ b/arch/powerpc/cpu/mpc8xx/start.S @@ -23,7 +23,6 @@ #include <asm-offsets.h> #include <config.h> #include <mpc8xx.h> -#include <version.h> #include <ppc_asm.tmpl> #include <ppc_defs.h> @@ -60,12 +59,12 @@ * r3 - 1st arg to board_init(): IMMP pointer * r4 - 2nd arg to board_init(): boot flag */ - .text + .text_pre .long 0x27051956 /* U-Boot Magic Number */ - .globl version_string -version_string: - .ascii U_BOOT_VERSION_STRING, "\0" +/* U-Boot version string is filled at this place by linker script */ + + .text . = EXC_OFF_SYS_RESET .globl _start _start: diff --git a/board/cssi/MCR3000/u-boot.lds b/board/cssi/MCR3000/u-boot.lds index 70aef3241c..9b2ead29b4 100644 --- a/board/cssi/MCR3000/u-boot.lds +++ b/board/cssi/MCR3000/u-boot.lds @@ -16,6 +16,8 @@ SECTIONS . = + SIZEOF_HEADERS; .text : { + arch/powerpc/cpu/mpc8xx/start.o (.text_pre) + *(.text_version_string) arch/powerpc/cpu/mpc8xx/start.o (.text) arch/powerpc/cpu/mpc8xx/traps.o (.text*) arch/powerpc/lib/built-in.o (.text*) |