[U-Boot] [PATCH RFC] mpc8572ds relocatable
JerryVanBaren
gerald.vanbaren at ge.com
Mon Sep 8 17:34:07 CEST 2008
Ed Swarthout wrote:
> Fixes boot crash from bad string pointers in get_table_entry_name
> when flash is erased or differs from current u-boot image.
>
> Signed-off-by: Ed Swarthout <Ed.Swarthout at freescale.com>
> ---
>
> Fix was pointed out by Peter Tyser in Image.c get_table_entry_name thread.
>
> This redoes Grant Likey's relocation change, but leaves control to each board.
> This also fixes the "mii dump" command when flash is erased.
> Tested with gcc 4.2
>
> board/freescale/mpc8572ds/config.mk | 1 +
> board/freescale/mpc8572ds/u-boot.lds | 2 +-
> 2 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/board/freescale/mpc8572ds/config.mk b/board/freescale/mpc8572ds/config.mk
> index 5b32186..8b3651b 100644
> --- a/board/freescale/mpc8572ds/config.mk
> +++ b/board/freescale/mpc8572ds/config.mk
> @@ -30,3 +30,4 @@ endif
> PLATFORM_CPPFLAGS += -DCONFIG_E500=1
> PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx=1
> PLATFORM_CPPFLAGS += -DCONFIG_MPC8572=1
> +PLATFORM_CPPFLAGS += -mrelocatable -DCONFIG_RELOC_FIXUP_WORKS
> diff --git a/board/freescale/mpc8572ds/u-boot.lds b/board/freescale/mpc8572ds/u-boot.lds
> index a05ece5..79fb41f 100644
> --- a/board/freescale/mpc8572ds/u-boot.lds
> +++ b/board/freescale/mpc8572ds/u-boot.lds
> @@ -58,7 +58,7 @@ SECTIONS
> .text :
> {
> *(.text)
> - *(.fixup)
> +/* *(.fixup)*/
Please don't (just) comment this out.
Preferably your commit message would have enough information to answer
the question of why .fixup was removed and no comment in the linker
control file would be necessary.
In some cases it is worth adding a comment to the code as to why .fixup
was removed so that someone that doesn't know the background doesn't add
it back in. Something like this hand generated pseudo patch:
+/*
+ * Note: The *(.fixup) section is unnecessary because the
+ * CONFIG_RELOC_FIXUP_WORKS method is being used to do the relocation.
+ */
.text :
{
*(.text)
- *(.fixup)
*(.got1)
} :text
Thanks,
gvb
More information about the U-Boot
mailing list