[meta-ti] [PATCH 3/5] u-boot: reduce the SPL `.rodata' size

Khem Raj raj.khem at gmail.com
Wed Oct 17 15:50:21 PDT 2018


On Wed, Oct 17, 2018 at 3:34 PM Denys Dmytriyenko <denys at ti.com> wrote:

> On Wed, Oct 17, 2018 at 12:28:51PM -0700, Khem Raj wrote:
> > Fixes errors e.g.
> >
> > | arm-yoe-linux-gnueabi-ld.bfd: u-boot-spl section `.rodata' will not
> fit in region `.sram'
> > | arm-yoe-linux-gnueabi-ld.bfd: region `.sram' overflowed by 5772 bytes
> >
> > Signed-off-by: Khem Raj <raj.khem at gmail.com>
> > Cc: Tom Rini <trini at konsulko.com>
> > Cc: Denys Dmytriyenko <trini at konsulko.com>
>
> Hmm, interesting email I got here... :)
>
>
> Anyway, I'm going to hold on this one for now. Let's see if we can patch
> U-boot build instead.


Just don’t hold it because of the name :)
Btw there is something in master u-boot which makes it work with gcc+pie so
we can look at that and see if there is something to be backported but it
could also mean that there are additional features that get compiled in
with ti fork which cause the size to grow and break the size barrier

>
>
>
> > ---
> >  ...vm_defconfig-Reduce-SPL-.rodata-size.patch | 36 +++++++++++++++++++
> >  .../u-boot/u-boot-ti-staging_2018.01.bb       |  2 ++
> >  2 files changed, 38 insertions(+)
> >  create mode 100644
> recipes-bsp/u-boot/files/0001-am335x_evm_defconfig-Reduce-SPL-.rodata-size.patch
> >
> > diff --git
> a/recipes-bsp/u-boot/files/0001-am335x_evm_defconfig-Reduce-SPL-.rodata-size.patch
> b/recipes-bsp/u-boot/files/0001-am335x_evm_defconfig-Reduce-SPL-.rodata-size.patch
> > new file mode 100644
> > index 00000000..6244a56a
> > --- /dev/null
> > +++
> b/recipes-bsp/u-boot/files/0001-am335x_evm_defconfig-Reduce-SPL-.rodata-size.patch
> > @@ -0,0 +1,36 @@
> > +From 45ead566ebf63999f07e966fa4962bb9bbe3ed4a Mon Sep 17 00:00:00 2001
> > +From: Khem Raj <raj.khem at gmail.com>
> > +Date: Tue, 16 Oct 2018 17:11:13 -0700
> > +Subject: [PATCH] Disable usb-gadget usb-eth support in SPL
> > +
> > +This helps in shedding some size to fit in into SRAM
> > +
> > +Signed-off-by: Khem Raj <raj.khem at gmail.com>
> > +---
> > + configs/am335x_evm_defconfig | 5 ++---
> > + 1 file changed, 2 insertions(+), 3 deletions(-)
> > +
> > +diff --git a/configs/am335x_evm_defconfig b/configs/am335x_evm_defconfig
> > +index 4908099431..8342089dee 100644
> > +--- a/configs/am335x_evm_defconfig
> > ++++ b/configs/am335x_evm_defconfig
> > +@@ -12,14 +12,13 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y
> > + CONFIG_VERSION_VARIABLE=y
> > + CONFIG_ARCH_MISC_INIT=y
> > + CONFIG_SPL=y
> > +-CONFIG_SPL_ETH_SUPPORT=y
> > ++# CONFIG_SPL_ENV_SUPPORT is not set
> > + CONFIG_SPL_MTD_SUPPORT=y
> > + CONFIG_SPL_MUSB_NEW_SUPPORT=y
> > + CONFIG_SPL_NET_SUPPORT=y
> > + CONFIG_SPL_NET_VCI_STRING="AM335x U-Boot SPL"
> > + CONFIG_SPL_OS_BOOT=y
> > +-CONFIG_SPL_USB_GADGET_SUPPORT=y
> > +-CONFIG_SPL_USBETH_SUPPORT=y
> > ++# CONFIG_SPL_YMODEM_SUPPORT is not set
> > + CONFIG_FASTBOOT=y
> > + CONFIG_CMD_SPL=y
> > + CONFIG_CMD_SPL_NAND_OFS=0x00080000
> > +--
> > +2.19.1
> > +
> > diff --git a/recipes-bsp/u-boot/u-boot-ti-staging_2018.01.bb
> b/recipes-bsp/u-boot/u-boot-ti-staging_2018.01.bb
> > index cbb8857a..46a26480 100644
> > --- a/recipes-bsp/u-boot/u-boot-ti-staging_2018.01.bb
> > +++ b/recipes-bsp/u-boot/u-boot-ti-staging_2018.01.bb
> > @@ -5,3 +5,5 @@ PR = "r24"
> >  BRANCH = "ti-u-boot-2018.01"
> >
> >  SRCREV = "2cc52408bf1357f11b96548e78223a1df321c1ae"
> > +
> > +SRC_URI +=
> "file://0001-am335x_evm_defconfig-Reduce-SPL-.rodata-size.patch"
> > --
> > 2.19.1
> >
> > --
> > _______________________________________________
> > meta-ti mailing list
> > meta-ti at yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/meta-ti
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-ti/attachments/20181017/f90f8c02/attachment.html>


More information about the meta-ti mailing list