Re: [U-Boot] [PATCH v4 09/13] hawkboard: Modify to work with generic relocation

2012-02-26 Thread Simon Glass
Hi,

On Thu, Feb 23, 2012 at 7:11 AM, Sughosh Ganu  wrote:
>
> On Thu, Feb 23, 2012 at 2:13 PM, Sughosh Ganu 
> wrote:
>>
>> hi Simon,
>> On Mon Feb 20, 2012 at 05:32:51PM -0800, Simon Glass wrote:
>> > Add use of common/ and lib/ libraries for the SPL stage, and
>> > add the new link symbol required for generic relocation.
>> >
>> > Signed-off-by: Simon Glass 
>> > ---
>> > Changes in v4:
>> > - Split out hawkboard changes into new patch
>> >
>> >  board/davinci/da8xxevm/u-boot-spl-hawk.lds |    1 +
>> >  include/configs/hawkboard.h                |    2 ++
>> >  2 files changed, 3 insertions(+), 0 deletions(-)
>>
>
> 
>
>>
>>  Btw, i had quite a substantial increase in the spl image size with
>>  these additions with a 4.5 based toolchain(will provide exact
>>  toolchain details and size difference tonight). Building with a 4.6
>>  based toolchain got the size increase down by quite a bit. Although i
>>  don't have any size restrictions with spl on my board, this could be
>>  a problem on boards which have these restrictions with toolchains
>>  before 4.6.
>
>
> gcc(arm-none-linux-gnueabi) -- 4.5.2
> binutils -- 2.20
>
> spl size without this patch
>    text       data        bss        dec        hex    filename
>    5208        620        464       6292       1894    spl/u-boot-spl
>
> spl size with this patch
>    text       data        bss        dec        hex    filename
>    8897        620        476       9993       2709    spl/u-boot-spl
>
>
> gcc(arm-none-eabi) -- 4.6.2
> binutils -- 2.21
>
> spl size without this patch
>    text       data        bss        dec        hex    filename
>    4692        620        464 5776      1690    spl/u-boot-spl
>
> spl size with this patch
>    text       data        bss        dec        hex    filename
>    4812        620      476   5908      1714    spl/u-boot-spl
>
> -sughosh

Thanks for looking at this.

I'm not sure why it doesn't happen with your 4.6.2 compiler. With my
4.6.0 I do see the size increase.

It seems to be due to vsprintf:

   textdata bss dec hex filename
   4011   0  224033 fc1 spl/lib/vsprintf.o

I wonder if it is a call to printf that the older compiler is failing
to optimize out?

Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 09/13] hawkboard: Modify to work with generic relocation

2012-02-23 Thread Sughosh Ganu
On Thu, Feb 23, 2012 at 2:13 PM, Sughosh Ganu wrote:

> hi Simon,
> On Mon Feb 20, 2012 at 05:32:51PM -0800, Simon Glass wrote:
> > Add use of common/ and lib/ libraries for the SPL stage, and
> > add the new link symbol required for generic relocation.
> >
> > Signed-off-by: Simon Glass 
> > ---
> > Changes in v4:
> > - Split out hawkboard changes into new patch
> >
> >  board/davinci/da8xxevm/u-boot-spl-hawk.lds |1 +
> >  include/configs/hawkboard.h|2 ++
> >  2 files changed, 3 insertions(+), 0 deletions(-)
>
>



>  Btw, i had quite a substantial increase in the spl image size with
>  these additions with a 4.5 based toolchain(will provide exact
>  toolchain details and size difference tonight). Building with a 4.6
>  based toolchain got the size increase down by quite a bit. Although i
>  don't have any size restrictions with spl on my board, this could be
>  a problem on boards which have these restrictions with toolchains
>  before 4.6.
>

gcc(arm-none-linux-gnueabi) -- 4.5.2
binutils -- 2.20

spl size without this patch
   text   databssdechexfilename
   5208620464   6292   1894spl/u-boot-spl

spl size with this patch
   text   databssdechexfilename
   8897620476   9993   2709spl/u-boot-spl


gcc(arm-none-eabi) -- 4.6.2
binutils -- 2.21

spl size without this patch
   text   databssdechexfilename
   4692620464 5776  1690spl/u-boot-spl

spl size with this patch
   text   databssdechexfilename
   4812620  476   5908  1714spl/u-boot-spl

-sughosh
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 09/13] hawkboard: Modify to work with generic relocation

2012-02-23 Thread Sughosh Ganu
hi Simon,
On Mon Feb 20, 2012 at 05:32:51PM -0800, Simon Glass wrote:
> Add use of common/ and lib/ libraries for the SPL stage, and
> add the new link symbol required for generic relocation.
> 
> Signed-off-by: Simon Glass 
> ---
> Changes in v4:
> - Split out hawkboard changes into new patch
> 
>  board/davinci/da8xxevm/u-boot-spl-hawk.lds |1 +
>  include/configs/hawkboard.h|2 ++
>  2 files changed, 3 insertions(+), 0 deletions(-)

 I have tested these changes on the hawkboard. It requires setting up
 of the gd and bd pointers in the spl for this to work with the
 libcommon changes, which were not needed up until now in my spl. I
 will send a patch to fix this. Will also test the rest of your
 patchset on the board during the weekend.

 Btw, i had quite a substantial increase in the spl image size with
 these additions with a 4.5 based toolchain(will provide exact
 toolchain details and size difference tonight). Building with a 4.6
 based toolchain got the size increase down by quite a bit. Although i
 don't have any size restrictions with spl on my board, this could be
 a problem on boards which have these restrictions with toolchains
 before 4.6.

-sughosh
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 09/13] hawkboard: Modify to work with generic relocation

2012-02-21 Thread Tom Rini
On Mon, Feb 20, 2012 at 05:32:51PM -0800, Simon Glass wrote:

> Add use of common/ and lib/ libraries for the SPL stage, and
> add the new link symbol required for generic relocation.
> 
> Signed-off-by: Simon Glass 

Acked-by: Tom Rini 

-- 
Tom
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4 09/13] hawkboard: Modify to work with generic relocation

2012-02-20 Thread Simon Glass
Add use of common/ and lib/ libraries for the SPL stage, and
add the new link symbol required for generic relocation.

Signed-off-by: Simon Glass 
---
Changes in v4:
- Split out hawkboard changes into new patch

 board/davinci/da8xxevm/u-boot-spl-hawk.lds |1 +
 include/configs/hawkboard.h|2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/board/davinci/da8xxevm/u-boot-spl-hawk.lds 
b/board/davinci/da8xxevm/u-boot-spl-hawk.lds
index b3a41af..4bbfa3d 100644
--- a/board/davinci/da8xxevm/u-boot-spl-hawk.lds
+++ b/board/davinci/da8xxevm/u-boot-spl-hawk.lds
@@ -58,6 +58,7 @@ SECTIONS
}
 
. = ALIGN(4);
+__image_copy_end = .;
__rel_dyn_start = .;
__rel_dyn_end = .;
__dynsym_start = .;
diff --git a/include/configs/hawkboard.h b/include/configs/hawkboard.h
index 50a1c17..85a955b 100644
--- a/include/configs/hawkboard.h
+++ b/include/configs/hawkboard.h
@@ -63,6 +63,8 @@
 #define CONFIG_SPL_NAND_SIMPLE
 #define CONFIG_SPL_NAND_LOAD
 #define CONFIG_SPL_SERIAL_SUPPORT
+#define CONFIG_SPL_LIBCOMMON_SUPPORT
+#define CONFIG_SPL_LIBGENERIC_SUPPORT
 #define CONFIG_SPL_LDSCRIPT"board/$(BOARDDIR)/u-boot-spl-hawk.lds"
 #define CONFIG_SPL_TEXT_BASE   0xc108
 #define CONFIG_SPL_STACK   CONFIG_SYS_INIT_SP_ADDR
-- 
1.7.7.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot