Message ID | 1329787975-6695-10-git-send-email-sjg@chromium.org |
---|---|
State | Deferred |
Delegated to: | Tom Rini |
Headers | show |
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 <sjg@chromium.org> Acked-by: Tom Rini <trini@ti.com>
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 <sjg@chromium.org> > --- > 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
On Thu, Feb 23, 2012 at 2:13 PM, Sughosh Ganu <urwithsughosh@gmail.com>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 <sjg@chromium.org> > > --- > > 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(-) > > <snip> > 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
Hi, On Thu, Feb 23, 2012 at 7:11 AM, Sughosh Ganu <urwithsughosh@gmail.com> wrote: > > On Thu, Feb 23, 2012 at 2:13 PM, Sughosh Ganu <urwithsughosh@gmail.com> > 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 <sjg@chromium.org> >> > --- >> > 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(-) >> > > <snip> > >> >> 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: text data bss dec hex filename 4011 0 22 4033 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
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 0xc1080000 #define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR
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 <sjg@chromium.org> --- 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(-)