ppc/85xx: Use CONFIG_SYS_MONITOR_LEN in linker script
PATCH 1/1 ppc/85xx: Use CONFIG_SYS_MONITOR_LEN in linker script
Now that we set CONFIG_SYS_MONITOR_LEN properly we can use it and TEXT_BASE to ensure that the boot page and reset vector are placed at the proper location in the u-boot image.
We needed to cleanup the use of a C++ comment in P1_P2_RDB.h to allow use of config.h in u-boot.lds.
--- cpu/mpc85xx/u-boot.lds | 8 +++++--- include/configs/P1_P2_RDB.h | 1 - 2 files changed, 5 insertions(+), 4 deletions(-)
cpu/mpc85xx/u-boot.lds +5 -3
@@ -20,6 +20,8 @@ * MA 02111-1307 USA */ +#include <config.h> + OUTPUT_ARCH(powerpc) /* Do we need any of these for elf? __DYNAMIC = 0; */
@@ -116,17 +118,17 @@ SECTIONS . = ALIGN(256); __init_end = .; - .bootpg ADDR(.text) + 0x7f000 : + .bootpg ADDR(.text) + CONFIG_SYS_MONITOR_LEN - 0x1000 : { cpu/mpc85xx/start.o (.bootpg) } :text = 0xffff - .resetvec ADDR(.text) + 0x7fffc : + .resetvec ADDR(.text) + CONFIG_SYS_MONITOR_LEN - 0x4 : { *(.resetvec) } :text = 0xffff - . = ADDR(.text) + 0x80000; + . = ADDR(.text) + CONFIG_SYS_MONITOR_LEN; __bss_start = .; .bss (NOLOAD) :
include/configs/P1_P2_RDB.h +0 -1
@@ -208,7 +208,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);* shorted - index 1 */ #define CONFIG_CONS_INDEX 1 -//#define CONFIG_CONS_INDEX 2 #undef CONFIG_SERIAL_SOFTWARE_FIFO#define CONFIG_SYS_NS16550 #define CONFIG_SYS_NS16550_SERIAL
Signature · 1 line
1.6.0.6
PATCH 1/1 ppc/85xx: Use CONFIG_SYS_MONITOR_LEN in linker script
Dear Kumar Gala,
Quoted 6 lines · In message <[email protected]> you…
Now that we set
CONFIG_SYS_MONITOR_LENproperly we can use it andTEXT_BASEto ensure that the boot page and reset vector are placed at the proper location in the u-boot image.We needed to cleanup the use of a C++ comment in
P1_P2_RDB.hto allow use ofconfig.hinu-boot.lds.
I think this is bound to be a continuous source of trouble, as you suddenly have two different config items (TEXT_BASE and CONFIG_SYS_MONITOR_LEN) which must be kept in sync. This is definitely not good.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "Look! There! Evil!.. pure and simple, total evil from the Eighth Dimension!" - Buckaroo Banzai