[U-Boot] [PATCH 2/2] [NEXT] arm926ejs: reduce code size with -msingle-pic-base

Albert ARIBAUD albert.aribaud at free.fr
Thu Sep 23 10:05:02 CEST 2010


Hello Heiko,

Thanks for the in-depth analysis.

IIUC:

Le 23/09/2010 09:12, Heiko Schocher a écrit :

> /home/hs/celf/u-boot/arch/arm/cpu/arm926ejs/start.S:212: Error: internal_relocation (type: OFFSET_IMM) not fixed up
> /home/hs/celf/u-boot/arch/arm/cpu/arm926ejs/start.S:308: Error: internal_relocation (type: OFFSET_IMM) not fixed up

This is due to the fact you're using a specific .lds, and your fix below 
corrects this for your .lds indeed. However, there might be other boards 
in the arm926 subtree which have their own .lds and would need the same 
fix, so I'll find them all and extend your fix to others.

> I had to define _got_base and _relocate_got_base_r also for
> the NAND_SPL case, and don;t need to fix up the "pic base
> register", if we are at the right position.

Thanks for spotting and fixing these. :)

> I think we(you ;-) should add my below fix to your
>
> [U-Boot] [PATCH 2/2] [NEXT] arm926ejs: reduce code size with	-msingle-pic-base
>
> and send a second version of it, so we are bisect compatible.
>
> you can add my
>
> Signed-off-by: Heiko Schocher<hs at denx.de>
>
> to it.

I will -- thanks!

> Can you test this also on your board? Thanks!

I will too. :)

Just one thing: are these TEXT_BASE / CONFIG_SYS_NAND_U_BOOT_DST 
modifications in your patch really needed for the board to run, or are 
they a manual layout optimization decided based on the code size reduction?

> diff --git a/board/karo/tx25/config.mk b/board/karo/tx25/config.mk
> index 51ca1ab..1a32c87 100644
> --- a/board/karo/tx25/config.mk
> +++ b/board/karo/tx25/config.mk
> @@ -1,5 +1,5 @@
>   ifdef CONFIG_NAND_SPL
>   TEXT_BASE = 0x810c0000
>   else
> -TEXT_BASE = 0x81fc0000
> +TEXT_BASE = 0x81fc1000
>   endif
> diff --git a/include/configs/tx25.h b/include/configs/tx25.h
> index 7faa453..dfe8eab 100644
> --- a/include/configs/tx25.h
> +++ b/include/configs/tx25.h
> @@ -41,7 +41,7 @@
>   #define CONFIG_SYS_NAND_U_BOOT_OFFS	0x800
>   #define CONFIG_SYS_NAND_U_BOOT_SIZE	0x30000
>
> -#define CONFIG_SYS_NAND_U_BOOT_DST      (0x81fc0000)
> +#define CONFIG_SYS_NAND_U_BOOT_DST      (0x81fc1000)
>   #define CONFIG_SYS_NAND_U_BOOT_START    CONFIG_SYS_NAND_U_BOOT_DST
>
>   #define CONFIG_SYS_NAND_PAGE_SIZE	2048

Thanks again for your work on my patch!

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list