beaglebone.conf: temporarily use generic am335x_evm_config for U-boot
PATCH 1/1 beaglebone.conf: temporarily use generic am335x_evm_config for U-boot
There have been reports recently that am335x_beaglebone_config generates bad SPL. Until that is debugged and fixed, use generic am335x_evm_config that covers all AM335x platforms, including BeagleBone variants.
--- conf/machine/beaglebone.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
conf/machine/beaglebone.conf +2 -1
@@ -13,7 +13,8 @@ MACHINE_GUI_CLASS = "bigscreen" SERIAL_CONSOLE = "115200 ttyS0" -UBOOT_MACHINE = "am335x_boneblack_config" +# fall back on generic am335x_evm_config for now +#UBOOT_MACHINE = "am335x_boneblack_config" WKS_FILE = "sdimage-bootpart.wks" IMAGE_BOOT_FILES = "MLO u-boot.img"
Signature · 1 line
2.7.4
Quoted 5 lines · Denys Dmytriyenko
There have been reports recently that
am335x_beaglebone_configgenerates bad SPL. Until that is debugged and fixed, use genericam335x_evm_configthat covers all AM335x platforms, including BeagleBone variants.
it fails to link
| 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
| make[2]: *** [/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-staging/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:
spl/u-boot-spl] Error 1
|
Quoted 27 lines
Signed-off-by Denys Dmytriyenko <[email protected]>--- conf/machine/beaglebone.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)conf/machine/beaglebone.conf +2
-2@@ -13,7 +13,8 @@ MACHINE_GUI_CLASS = "bigscreen" SERIAL_CONSOLE = "115200 ttyS0" -UBOOT_MACHINE = "am335x_boneblack_config" +# fall back on generic am335x_evm_config for now +#UBOOT_MACHINE = "am335x_boneblack_config" WKS_FILE = "sdimage-bootpart.wks" IMAGE_BOOT_FILES = "MLO u-boot.img" --2.7.4
--
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
Quoted 7 lines · Khem Raj
Quoted 5 lines · Denys Dmytriyenko
There have been reports recently that
am335x_beaglebone_configgenerates bad SPL. Until that is debugged and fixed, use genericam335x_evm_configthat covers all AM335x platforms, including BeagleBone variants.
Quoted 7 lines
it fails to link
| 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
| make[2]: *** [/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-staging/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:
spl/u-boot-spl] Error 1
FWIW, just built u-boot-ti-staging with gcc7 and gcc8 from oe-core, as well as Linaro gcc7 - no problems.
Quoted 27 lines
Quoted 27 lines
Signed-off-by Denys Dmytriyenko <[email protected]>--- conf/machine/beaglebone.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)conf/machine/beaglebone.conf +2
-2@@ -13,7 +13,8 @@ MACHINE_GUI_CLASS = "bigscreen" SERIAL_CONSOLE = "115200 ttyS0" -UBOOT_MACHINE = "am335x_boneblack_config" +# fall back on generic am335x_evm_config for now +#UBOOT_MACHINE = "am335x_boneblack_config" WKS_FILE = "sdimage-bootpart.wks" IMAGE_BOOT_FILES = "MLO u-boot.img" --2.7.4
--
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
Quoted 11 lines · Denys Dmytriyenko
Quoted 9 lines · Khem Raj
Quoted 5 lines · Denys Dmytriyenko
There have been reports recently that
am335x_beaglebone_configgenerates bad SPL. Until that is debugged and fixed, use genericam335x_evm_configthat covers all AM335x platforms, including BeagleBone variants.it fails to link
Quoted 8 lines
Quoted 5 lines
| 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
| make[2]: *** [/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-staging/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:
spl/u-boot-spl] Error 1FWIW, just built u-boot-ti-staging with gcc7 and gcc8 from oe-core, as well as Linaro gcc7 - no problems.
My distro inherits poky policies, and on master it now inherits hardening policies ( security flags) by defaults
do you happen to test poky ?
Quoted 29 lines
Quoted 29 lines
Quoted 29 lines
Signed-off-by Denys Dmytriyenko <[email protected]>--- conf/machine/beaglebone.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)conf/machine/beaglebone.conf +2
-2@@ -13,7 +13,8 @@ MACHINE_GUI_CLASS = "bigscreen" SERIAL_CONSOLE = "115200 ttyS0" -UBOOT_MACHINE = "am335x_boneblack_config" +# fall back on generic am335x_evm_config for now +#UBOOT_MACHINE = "am335x_boneblack_config" WKS_FILE = "sdimage-bootpart.wks" IMAGE_BOOT_FILES = "MLO u-boot.img" --2.7.4
--
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
Quoted 19 lines · Khem Raj
Quoted 17 lines · Denys Dmytriyenko
Quoted 14 lines · Khem Raj
Quoted 5 lines · Denys Dmytriyenko
There have been reports recently that
am335x_beaglebone_configgenerates bad SPL. Until that is debugged and fixed, use genericam335x_evm_configthat covers all AM335x platforms, including BeagleBone variants.it fails to link
| 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
| make[2]: *** [/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-staging/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:
spl/u-boot-spl] Error 1
Quoted 6 lines
Quoted 2 lines
FWIW, just built u-boot-ti-staging with gcc7 and gcc8 from oe-core, as well as Linaro gcc7 - no problems.
My distro inherits poky policies, and on master it now inherits hardening policies ( security flags) by defaults
do you happen to test poky ?
It seems I am not alone, there has been other reports of similar issues and some combos work some dont
I have ported this patch
and now my build problems are gone,
Added couple of other patches on top for beaglebone, and now I can boot bbb using meta-ti BSP
Quoted 29 lines
Quoted 29 lines
Quoted 29 lines
Quoted 29 lines
Signed-off-by Denys Dmytriyenko <[email protected]>--- conf/machine/beaglebone.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)conf/machine/beaglebone.conf +2
-2@@ -13,7 +13,8 @@ MACHINE_GUI_CLASS = "bigscreen" SERIAL_CONSOLE = "115200 ttyS0" -UBOOT_MACHINE = "am335x_boneblack_config" +# fall back on generic am335x_evm_config for now +#UBOOT_MACHINE = "am335x_boneblack_config" WKS_FILE = "sdimage-bootpart.wks" IMAGE_BOOT_FILES = "MLO u-boot.img" --2.7.4
--
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
Quoted 18 lines · Khem Raj
Quoted 17 lines · Denys Dmytriyenko
Quoted 14 lines · Khem Raj
Quoted 5 lines · Denys Dmytriyenko
There have been reports recently that
am335x_beaglebone_configgenerates bad SPL. Until that is debugged and fixed, use genericam335x_evm_configthat covers all AM335x platforms, including BeagleBone variants.it fails to link
| 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
| make[2]: *** [/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-staging/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:
spl/u-boot-spl] Error 1
Quoted 6 lines
Quoted 2 lines
FWIW, just built u-boot-ti-staging with gcc7 and gcc8 from oe-core, as well as Linaro gcc7 - no problems.
My distro inherits poky policies, and on master it now inherits hardening policies ( security flags) by defaults
do you happen to test poky ?
I think we want to take a look at which of the security flags really make sense to use in this context. Thanks!
Signature · 1 line
Tom
Quoted 23 lines · Tom Rini
Quoted 21 lines · Khem Raj
Quoted 19 lines · Denys Dmytriyenko
Quoted 7 lines · Khem Raj
Quoted 5 lines · Denys Dmytriyenko
There have been reports recently that
am335x_beaglebone_configgenerates bad SPL. Until that is debugged and fixed, use genericam335x_evm_configthat covers all AM335x platforms, including BeagleBone variants.Quoted 7 lines
it fails to link
| 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
| make[2]: *** [/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-staging/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:
spl/u-boot-spl] Error 1FWIW, just built u-boot-ti-staging with gcc7 and gcc8 from oe-core, as well as Linaro gcc7 - no problems.
Quoted 7 lines
Quoted 3 lines
My distro inherits poky policies, and on master it now inherits hardening policies ( security flags) by defaults
do you happen to test poky ?I think we want to take a look at which of the security flags really make sense to use in this context. Thanks!
there could be more to it, since the distro uses thumb2 ISA by default, I am not sure
if u-boot overrides that and builds using arm mode ISA always but something to consider, I saw several reports about u-boot overflowing sram sections and most of
the solutions were "oh it works for me" or at the best your toolchain is different then mine. here is mine use it and move on.
Quoted 2 lines
--
Tom
Quoted 32 lines · Khem Raj
Quoted 23 lines · Tom Rini
Quoted 21 lines · Khem Raj
Quoted 19 lines · Denys Dmytriyenko
Quoted 7 lines · Khem Raj
Quoted 5 lines · Denys Dmytriyenko
There have been reports recently that
am335x_beaglebone_configgenerates bad SPL. Until that is debugged and fixed, use genericam335x_evm_configthat covers all AM335x platforms, including BeagleBone variants.Quoted 7 lines
it fails to link
| 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
| make[2]: *** [/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-staging/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:
spl/u-boot-spl] Error 1FWIW, just built u-boot-ti-staging with gcc7 and gcc8 from oe-core, as well as Linaro gcc7 - no problems.
Quoted 7 lines
Quoted 3 lines
My distro inherits poky policies, and on master it now inherits hardening policies ( security flags) by defaults
do you happen to test poky ?I think we want to take a look at which of the security flags really make sense to use in this context. Thanks!
Quoted 7 lines
there could be more to it, since the distro uses thumb2 ISA by default, I am not sure
if u-boot overrides that and builds using arm mode ISA always but something to consider, I saw several reports about u-boot overflowing sram sections and most of
the solutions were "oh it works for me" or at the best your toolchain is different then mine. here is mine use it and move on.
Khem,
Well, FWIW, Tom and I are very familiar with this issue. As a matter of fact, I first encountered it almost 2 years ago and had to prove there's such an issue, because everyone was saying it works for them, something must be wrong with my OE builds... :)
While .sram region is very limited, the issue is exacerbated by the fact that all debug symbols from macros like __FILE__ are ended up in that section as well. So, the longer your build path, the larger the section becomes. Once I had instructions to reproduce the failure here internally with a series of long-named nested directories like aaaaaa and bbbbbb, Nishanth started this thread on U-boot mailing list:
https://lists.denx.de/pipermail/u-boot/2017-March/285031.html
We've had the corresponding bug open internally all this time, while adding workarounds to limit .sram section size by other means, like disabling some options to reduce the code size. Your patch is one of those workarounds...
But we've been patiently waiting for the following feature to come into gcc to fix the issue properly:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268
Since it's now part of gcc8, we should be able to use it. Not sure how to keep gcc7 backward compatibility though...
Signature · 1 line
Denys
Quoted 60 lines · Denys Dmytriyenko
Quoted 32 lines · Khem Raj
Quoted 23 lines · Tom Rini
Quoted 21 lines · Khem Raj
Quoted 19 lines · Denys Dmytriyenko
Quoted 7 lines · Khem Raj
Quoted 5 lines · Denys Dmytriyenko
There have been reports recently that
am335x_beaglebone_configgenerates bad SPL. Until that is debugged and fixed, use genericam335x_evm_configthat covers all AM335x platforms, including BeagleBone variants.Quoted 7 lines
it fails to link
| 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
| make[2]: *** [/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-staging/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:
spl/u-boot-spl] Error 1FWIW, just built u-boot-ti-staging with gcc7 and gcc8 from oe-core, as well as Linaro gcc7 - no problems.
Quoted 7 lines
Quoted 3 lines
My distro inherits poky policies, and on master it now inherits hardening policies ( security flags) by defaults
do you happen to test poky ?I think we want to take a look at which of the security flags really make sense to use in this context. Thanks!
Quoted 7 lines
there could be more to it, since the distro uses thumb2 ISA by default, I am not sure
if u-boot overrides that and builds using arm mode ISA always but something to consider, I saw several reports about u-boot overflowing sram sections and most of
the solutions were "oh it works for me" or at the best your toolchain is different then mine. here is mine use it and move on.Khem,
Well, FWIW, Tom and I are very familiar with this issue. As a matter of fact, I first encountered it almost 2 years ago and had to prove there's such an issue, because everyone was saying it works for them, something must be wrong with my OE builds... :)
While .sram region is very limited, the issue is exacerbated by the fact that all debug symbols from macros like
__FILE__are ended up in that section as well. So, the longer your build path, the larger the section becomes. Once I had instructions to reproduce the failure here internally with a series of long-named nested directories like aaaaaa and bbbbbb, Nishanth started this thread on U-boot mailing list:
https://lists.denx.de/pipermail/u-boot/2017-March/285031.htmlWe've had the corresponding bug open internally all this time, while adding workarounds to limit .sram section size by other means, like disabling some options to reduce the code size. Your patch is one of those workarounds...
Quoted 6 lines
But we've been patiently waiting for the following feature to come into gcc to fix the issue properly:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268Since it's now part of gcc8, we should be able to use it. Not sure how to keep gcc7 backward compatibility though...
BTW, there were few attempts to "fix" it in U-boot as well, such as [1], but I don't believe they got accepted. Tom?
[1] https://patchwork.ozlabs.org/cover/825356/
Signature · 1 line
Denys
Quoted 61 lines · Denys Dmytriyenko
Quoted 32 lines · Khem Raj
Quoted 23 lines · Tom Rini
Quoted 21 lines · Khem Raj
Quoted 19 lines · Denys Dmytriyenko
Quoted 7 lines · Khem Raj
Quoted 5 lines · Denys Dmytriyenko
There have been reports recently that
am335x_beaglebone_configgenerates bad SPL. Until that is debugged and fixed, use genericam335x_evm_configthat covers all AM335x platforms, including BeagleBone variants.Quoted 7 lines
it fails to link
| 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
| make[2]: *** [/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-staging/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:
spl/u-boot-spl] Error 1FWIW, just built u-boot-ti-staging with gcc7 and gcc8 from oe-core, as well as Linaro gcc7 - no problems.
Quoted 7 lines
Quoted 3 lines
My distro inherits poky policies, and on master it now inherits hardening policies ( security flags) by defaults
do you happen to test poky ?I think we want to take a look at which of the security flags really make sense to use in this context. Thanks!
Quoted 7 lines
there could be more to it, since the distro uses thumb2 ISA by default, I am not sure
if u-boot overrides that and builds using arm mode ISA always but something to consider, I saw several reports about u-boot overflowing sram sections and most of
the solutions were "oh it works for me" or at the best your toolchain is different then mine. here is mine use it and move on.Khem,
Well, FWIW, Tom and I are very familiar with this issue. As a matter of fact, I first encountered it almost 2 years ago and had to prove there's such an issue, because everyone was saying it works for them, something must be wrong with my OE builds... :)
While .sram region is very limited, the issue is exacerbated by the fact that all debug symbols from macros like
__FILE__are ended up in that section as well. So, the longer your build path, the larger the section becomes. Once I had instructions to reproduce the failure here internally with a series of long-named nested directories like aaaaaa and bbbbbb, Nishanth started this thread on U-boot mailing list:
https://lists.denx.de/pipermail/u-boot/2017-March/285031.htmlWe've had the corresponding bug open internally all this time, while adding workarounds to limit .sram section size by other means, like disabling some options to reduce the code size. Your patch is one of those workarounds...
Quoted 6 lines
But we've been patiently waiting for the following feature to come into gcc to fix the issue properly:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268Since it's now part of gcc8, we should be able to use it. Not sure how to keep gcc7 backward compatibility though...
dumping absolute file name strings into SPL seems a waste of space to me, but I will leave that out for now. Moreover it exposes build paths into binaries that user may not be interested to share
-ffile-prefix-map has been in OE toolchains since gcc6 and I think we are already using it for kernel builds. We can probably enhance uboot recipes in OE-Core to
use this option if compiler supports it. That solves my problem.
Quoted 31 lines · Khem Raj
Quoted 23 lines · Tom Rini
Quoted 21 lines · Khem Raj
Quoted 19 lines · Denys Dmytriyenko
Quoted 7 lines · Khem Raj
Quoted 5 lines · Denys Dmytriyenko
There have been reports recently that
am335x_beaglebone_configgenerates bad SPL. Until that is debugged and fixed, use genericam335x_evm_configthat covers all AM335x platforms, including BeagleBone variants.Quoted 7 lines
it fails to link
| 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
| make[2]: *** [/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-staging/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:
spl/u-boot-spl] Error 1FWIW, just built u-boot-ti-staging with gcc7 and gcc8 from oe-core, as well as Linaro gcc7 - no problems.
Quoted 6 lines
Quoted 3 lines
My distro inherits poky policies, and on master it now inherits hardening policies ( security flags) by defaults
do you happen to test poky ?I think we want to take a look at which of the security flags really make sense to use in this context. Thanks!
Quoted 7 lines
there could be more to it, since the distro uses thumb2 ISA by default, I am not sure
if u-boot overrides that and builds using arm mode ISA always but something to consider, I saw several reports about u-boot overflowing sram sections and most of
the solutions were "oh it works for me" or at the best your toolchain is different then mine. here is mine use it and move on.
Yes, we enforce an ISA in U-Boot, depending on how things are configured and have been doing thumb2 for a long time on these targets. But, if we have some issues here, I'd really like to root cause them. I'm honestly surprised the security flags are even being passed, but I guess they end up put into TOOLCHAIN_OPTIONS not CFLAGS directly? And what/when/how do we reliably get an overflow? Thanks!
Signature · 1 line
Tom
Quoted 65 lines · Denys Dmytriyenko
Quoted 64 lines · Denys Dmytriyenko
Quoted 32 lines · Khem Raj
Quoted 23 lines · Tom Rini
Quoted 21 lines · Khem Raj
Quoted 19 lines · Denys Dmytriyenko
Quoted 7 lines · Khem Raj
Quoted 5 lines · Denys Dmytriyenko
There have been reports recently that
am335x_beaglebone_configgenerates bad SPL. Until that is debugged and fixed, use genericam335x_evm_configthat covers all AM335x platforms, including BeagleBone variants.Quoted 7 lines
it fails to link
| 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
| make[2]: *** [/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-staging/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:
spl/u-boot-spl] Error 1FWIW, just built u-boot-ti-staging with gcc7 and gcc8 from oe-core, as well as Linaro gcc7 - no problems.
Quoted 7 lines
Quoted 3 lines
My distro inherits poky policies, and on master it now inherits hardening policies ( security flags) by defaults
do you happen to test poky ?I think we want to take a look at which of the security flags really make sense to use in this context. Thanks!
Quoted 7 lines
there could be more to it, since the distro uses thumb2 ISA by default, I am not sure
if u-boot overrides that and builds using arm mode ISA always but something to consider, I saw several reports about u-boot overflowing sram sections and most of
the solutions were "oh it works for me" or at the best your toolchain is different then mine. here is mine use it and move on.Khem,
Well, FWIW, Tom and I are very familiar with this issue. As a matter of fact, I first encountered it almost 2 years ago and had to prove there's such an issue, because everyone was saying it works for them, something must be wrong with my OE builds... :)
While .sram region is very limited, the issue is exacerbated by the fact that all debug symbols from macros like
__FILE__are ended up in that section as well. So, the longer your build path, the larger the section becomes. Once I had instructions to reproduce the failure here internally with a series of long-named nested directories like aaaaaa and bbbbbb, Nishanth started this thread on U-boot mailing list:
https://lists.denx.de/pipermail/u-boot/2017-March/285031.htmlWe've had the corresponding bug open internally all this time, while adding workarounds to limit .sram section size by other means, like disabling some options to reduce the code size. Your patch is one of those workarounds...
But we've been patiently waiting for the following feature to come into gcc to fix the issue properly:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268
Quoted 7 lines
Quoted 2 lines
Since it's now part of gcc8, we should be able to use it. Not sure how to keep gcc7 backward compatibility though...
BTW, there were few attempts to "fix" it in U-boot as well, such as [1], but I don't believe they got accepted. Tom?
I think the end result was waiting on the kernel community to agree on a path forward for Kbuild and then bring that back.
Signature · 1 line
Tom
Quoted 69 lines · Khem Raj
Quoted 61 lines · Denys Dmytriyenko
Quoted 32 lines · Khem Raj
Quoted 23 lines · Tom Rini
Quoted 21 lines · Khem Raj
Quoted 19 lines · Denys Dmytriyenko
Quoted 7 lines · Khem Raj
Quoted 5 lines · Denys Dmytriyenko
There have been reports recently that
am335x_beaglebone_configgenerates bad SPL. Until that is debugged and fixed, use genericam335x_evm_configthat covers all AM335x platforms, including BeagleBone variants.Quoted 7 lines
it fails to link
| 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
| make[2]: *** [/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-staging/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:
spl/u-boot-spl] Error 1FWIW, just built u-boot-ti-staging with gcc7 and gcc8 from oe-core, as well as Linaro gcc7 - no problems.
Quoted 7 lines
Quoted 3 lines
My distro inherits poky policies, and on master it now inherits hardening policies ( security flags) by defaults
do you happen to test poky ?I think we want to take a look at which of the security flags really make sense to use in this context. Thanks!
Quoted 7 lines
there could be more to it, since the distro uses thumb2 ISA by default, I am not sure
if u-boot overrides that and builds using arm mode ISA always but something to consider, I saw several reports about u-boot overflowing sram sections and most of
the solutions were "oh it works for me" or at the best your toolchain is different then mine. here is mine use it and move on.Khem,
Well, FWIW, Tom and I are very familiar with this issue. As a matter of fact, I first encountered it almost 2 years ago and had to prove there's such an issue, because everyone was saying it works for them, something must be wrong with my OE builds... :)
While .sram region is very limited, the issue is exacerbated by the fact that all debug symbols from macros like
__FILE__are ended up in that section as well. So, the longer your build path, the larger the section becomes. Once I had instructions to reproduce the failure here internally with a series of long-named nested directories like aaaaaa and bbbbbb, Nishanth started this thread on U-boot mailing list:
https://lists.denx.de/pipermail/u-boot/2017-March/285031.htmlWe've had the corresponding bug open internally all this time, while adding workarounds to limit .sram section size by other means, like disabling some options to reduce the code size. Your patch is one of those workarounds...
Quoted 6 lines
But we've been patiently waiting for the following feature to come into gcc to fix the issue properly:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268Since it's now part of gcc8, we should be able to use it. Not sure how to keep gcc7 backward compatibility though...
Quoted 8 lines
dumping absolute file name strings into SPL seems a waste of space to me, but I will leave that out for now. Moreover it exposes build paths into binaries that user may not be interested to share
-ffile-prefix-map has been in OE toolchains since gcc6 and I think we are already using it for kernel builds. We can probably enhance uboot recipes in OE-Core to
use this option if compiler supports it. That solves my problem.
Yeah, extending that from kernel to u-boot would be nice. Unfortunately, our products use Linaro gcc7 on rocko for now. Planning to migrate to gcc8 on thud soon...
Signature · 1 line
Denys
Quoted 75 lines · Denys Dmytriyenko
Quoted 73 lines · Khem Raj
Quoted 61 lines · Denys Dmytriyenko
Quoted 32 lines · Khem Raj
Quoted 23 lines · Tom Rini
Quoted 21 lines · Khem Raj
Quoted 19 lines · Denys Dmytriyenko
Quoted 7 lines · Khem Raj
Quoted 5 lines · Denys Dmytriyenko
There have been reports recently that
am335x_beaglebone_configgenerates bad SPL. Until that is debugged and fixed, use genericam335x_evm_configthat covers all AM335x platforms, including BeagleBone variants.Quoted 7 lines
it fails to link
| 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
| make[2]: *** [/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-staging/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:
spl/u-boot-spl] Error 1FWIW, just built u-boot-ti-staging with gcc7 and gcc8 from oe-core, as well as Linaro gcc7 - no problems.
Quoted 7 lines
Quoted 3 lines
My distro inherits poky policies, and on master it now inherits hardening policies ( security flags) by defaults
do you happen to test poky ?I think we want to take a look at which of the security flags really make sense to use in this context. Thanks!
Quoted 7 lines
there could be more to it, since the distro uses thumb2 ISA by default, I am not sure
if u-boot overrides that and builds using arm mode ISA always but something to consider, I saw several reports about u-boot overflowing sram sections and most of
the solutions were "oh it works for me" or at the best your toolchain is different then mine. here is mine use it and move on.Khem,
Well, FWIW, Tom and I are very familiar with this issue. As a matter of fact, I first encountered it almost 2 years ago and had to prove there's such an issue, because everyone was saying it works for them, something must be wrong with my OE builds... :)
While .sram region is very limited, the issue is exacerbated by the fact that all debug symbols from macros like
__FILE__are ended up in that section as well. So, the longer your build path, the larger the section becomes. Once I had instructions to reproduce the failure here internally with a series of long-named nested directories like aaaaaa and bbbbbb, Nishanth started this thread on U-boot mailing list:
https://lists.denx.de/pipermail/u-boot/2017-March/285031.htmlWe've had the corresponding bug open internally all this time, while adding workarounds to limit .sram section size by other means, like disabling some options to reduce the code size. Your patch is one of those workarounds...
Quoted 6 lines
But we've been patiently waiting for the following feature to come into gcc to fix the issue properly:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268Since it's now part of gcc8, we should be able to use it. Not sure how to keep gcc7 backward compatibility though...
dumping absolute file name strings into SPL seems a waste of space to me, but I will leave that out for now. Moreover it exposes build paths into binaries that user may not be interested to share
Quoted 8 lines
Quoted 4 lines
-ffile-prefix-map has been in OE toolchains since gcc6 and I think we are already using it for kernel builds. We can probably enhance uboot recipes in OE-Core to
use this option if compiler supports it. That solves my problem.Yeah, extending that from kernel to u-boot would be nice. Unfortunately, our products use Linaro gcc7 on rocko for now. Planning to migrate to gcc8 on thud soon...
we can check for the option before using it so atleast it will not break older toolchains more than what they are already broken.
Quoted 82 lines · Khem Raj
Quoted 80 lines · Denys Dmytriyenko
Quoted 77 lines · Khem Raj
Quoted 61 lines · Denys Dmytriyenko
Quoted 32 lines · Khem Raj
Quoted 23 lines · Tom Rini
Quoted 21 lines · Khem Raj
Quoted 19 lines · Denys Dmytriyenko
Quoted 7 lines · Khem Raj
Quoted 5 lines · Denys Dmytriyenko
There have been reports recently that
am335x_beaglebone_configgenerates bad SPL. Until that is debugged and fixed, use genericam335x_evm_configthat covers all AM335x platforms, including BeagleBone variants.Quoted 7 lines
it fails to link
| 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
| make[2]: *** [/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-staging/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:
spl/u-boot-spl] Error 1FWIW, just built u-boot-ti-staging with gcc7 and gcc8 from oe-core, as well as Linaro gcc7 - no problems.
Quoted 7 lines
Quoted 3 lines
My distro inherits poky policies, and on master it now inherits hardening policies ( security flags) by defaults
do you happen to test poky ?I think we want to take a look at which of the security flags really make sense to use in this context. Thanks!
Quoted 7 lines
there could be more to it, since the distro uses thumb2 ISA by default, I am not sure
if u-boot overrides that and builds using arm mode ISA always but something to consider, I saw several reports about u-boot overflowing sram sections and most of
the solutions were "oh it works for me" or at the best your toolchain is different then mine. here is mine use it and move on.Khem,
Well, FWIW, Tom and I are very familiar with this issue. As a matter of fact, I first encountered it almost 2 years ago and had to prove there's such an issue, because everyone was saying it works for them, something must be wrong with my OE builds... :)
While .sram region is very limited, the issue is exacerbated by the fact that all debug symbols from macros like
__FILE__are ended up in that section as well. So, the longer your build path, the larger the section becomes. Once I had instructions to reproduce the failure here internally with a series of long-named nested directories like aaaaaa and bbbbbb, Nishanth started this thread on U-boot mailing list:
https://lists.denx.de/pipermail/u-boot/2017-March/285031.htmlWe've had the corresponding bug open internally all this time, while adding workarounds to limit .sram section size by other means, like disabling some options to reduce the code size. Your patch is one of those workarounds...
Quoted 6 lines
But we've been patiently waiting for the following feature to come into gcc to fix the issue properly:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268Since it's now part of gcc8, we should be able to use it. Not sure how to keep gcc7 backward compatibility though...
dumping absolute file name strings into SPL seems a waste of space to me, but I will leave that out for now. Moreover it exposes build paths into binaries that user may not be interested to share
-ffile-prefix-map has been in OE toolchains since gcc6 and I think we are already using it for kernel builds. We can probably enhance uboot recipes in OE-Core to
use this option if compiler supports it. That solves my problem.
Quoted 6 lines
Quoted 3 lines
Yeah, extending that from kernel to u-boot would be nice. Unfortunately, our products use Linaro gcc7 on rocko for now. Planning to migrate to gcc8 on thud soon...
we can check for the option before using it so atleast it will not break older toolchains more than what they are already broken.
I added -ffile-prefix-map locally just with this option added it did not fix the problem.
Quoted 87 lines · Khem Raj
Quoted 86 lines · Khem Raj
Quoted 83 lines · Denys Dmytriyenko
Quoted 69 lines · Khem Raj
Quoted 61 lines · Denys Dmytriyenko
Quoted 32 lines · Khem Raj
Quoted 23 lines · Tom Rini
Quoted 21 lines · Khem Raj
Quoted 19 lines · Denys Dmytriyenko
Quoted 7 lines · Khem Raj
Quoted 5 lines · Denys Dmytriyenko
There have been reports recently that
am335x_beaglebone_configgenerates bad SPL. Until that is debugged and fixed, use genericam335x_evm_configthat covers all AM335x platforms, including BeagleBone variants.Quoted 7 lines
it fails to link
| 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
| make[2]: *** [/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-staging/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:
spl/u-boot-spl] Error 1FWIW, just built u-boot-ti-staging with gcc7 and gcc8 from oe-core, as well as Linaro gcc7 - no problems.
Quoted 7 lines
Quoted 3 lines
My distro inherits poky policies, and on master it now inherits hardening policies ( security flags) by defaults
do you happen to test poky ?I think we want to take a look at which of the security flags really make sense to use in this context. Thanks!
Quoted 7 lines
there could be more to it, since the distro uses thumb2 ISA by default, I am not sure
if u-boot overrides that and builds using arm mode ISA always but something to consider, I saw several reports about u-boot overflowing sram sections and most of
the solutions were "oh it works for me" or at the best your toolchain is different then mine. here is mine use it and move on.Khem,
Well, FWIW, Tom and I are very familiar with this issue. As a matter of fact, I first encountered it almost 2 years ago and had to prove there's such an issue, because everyone was saying it works for them, something must be wrong with my OE builds... :)
While .sram region is very limited, the issue is exacerbated by the fact that all debug symbols from macros like
__FILE__are ended up in that section as well. So, the longer your build path, the larger the section becomes. Once I had instructions to reproduce the failure here internally with a series of long-named nested directories like aaaaaa and bbbbbb, Nishanth started this thread on U-boot mailing list:
https://lists.denx.de/pipermail/u-boot/2017-March/285031.htmlWe've had the corresponding bug open internally all this time, while adding workarounds to limit .sram section size by other means, like disabling some options to reduce the code size. Your patch is one of those workarounds...
Quoted 6 lines
But we've been patiently waiting for the following feature to come into gcc to fix the issue properly:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268Since it's now part of gcc8, we should be able to use it. Not sure how to keep gcc7 backward compatibility though...
Quoted 8 lines
dumping absolute file name strings into SPL seems a waste of space to me, but I will leave that out for now. Moreover it exposes build paths into binaries that user may not be interested to share
-ffile-prefix-map has been in OE toolchains since gcc6 and I think we are already using it for kernel builds. We can probably enhance uboot recipes in OE-Core to
use this option if compiler supports it. That solves my problem.Yeah, extending that from kernel to u-boot would be nice. Unfortunately, our products use Linaro gcc7 on rocko for now. Planning to migrate to gcc8 on thud soon...
Quoted 5 lines
Quoted 2 lines
we can check for the option before using it so atleast it will not break older toolchains more than what they are already broken.
I added -ffile-prefix-map locally just with this option added it did not fix the problem.
So, I tried Poky and I do see it overflow by 5-6 KB, which is quite a lot. Though disabling security flags just for u-boot didn't change it a bit. Something else is going on. I'm now rebuilding Poky with security flags disabled globally...
Quoted 91 lines · Denys Dmytriyenko
Quoted 90 lines · Khem Raj
Quoted 88 lines · Khem Raj
Quoted 75 lines · Denys Dmytriyenko
Quoted 73 lines · Khem Raj
Quoted 61 lines · Denys Dmytriyenko
Quoted 32 lines · Khem Raj
Quoted 23 lines · Tom Rini
Quoted 21 lines · Khem Raj
Quoted 19 lines · Denys Dmytriyenko
Quoted 7 lines · Khem Raj
Quoted 5 lines · Denys Dmytriyenko
There have been reports recently that
am335x_beaglebone_configgenerates bad SPL. Until that is debugged and fixed, use genericam335x_evm_configthat covers all AM335x platforms, including BeagleBone variants.Quoted 7 lines
it fails to link
| 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
| make[2]: *** [/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-staging/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:
spl/u-boot-spl] Error 1FWIW, just built u-boot-ti-staging with gcc7 and gcc8 from oe-core, as well as Linaro gcc7 - no problems.
Quoted 7 lines
Quoted 3 lines
My distro inherits poky policies, and on master it now inherits hardening policies ( security flags) by defaults
do you happen to test poky ?I think we want to take a look at which of the security flags really make sense to use in this context. Thanks!
Quoted 7 lines
there could be more to it, since the distro uses thumb2 ISA by default, I am not sure
if u-boot overrides that and builds using arm mode ISA always but something to consider, I saw several reports about u-boot overflowing sram sections and most of
the solutions were "oh it works for me" or at the best your toolchain is different then mine. here is mine use it and move on.Khem,
Well, FWIW, Tom and I are very familiar with this issue. As a matter of fact, I first encountered it almost 2 years ago and had to prove there's such an issue, because everyone was saying it works for them, something must be wrong with my OE builds... :)
While .sram region is very limited, the issue is exacerbated by the fact that all debug symbols from macros like
__FILE__are ended up in that section as well. So, the longer your build path, the larger the section becomes. Once I had instructions to reproduce the failure here internally with a series of long-named nested directories like aaaaaa and bbbbbb, Nishanth started this thread on U-boot mailing list:
https://lists.denx.de/pipermail/u-boot/2017-March/285031.htmlWe've had the corresponding bug open internally all this time, while adding workarounds to limit .sram section size by other means, like disabling some options to reduce the code size. Your patch is one of those workarounds...
Quoted 6 lines
But we've been patiently waiting for the following feature to come into gcc to fix the issue properly:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268Since it's now part of gcc8, we should be able to use it. Not sure how to keep gcc7 backward compatibility though...
dumping absolute file name strings into SPL seems a waste of space to me, but I will leave that out for now. Moreover it exposes build paths into binaries that user may not be interested to share
Quoted 8 lines
Quoted 4 lines
-ffile-prefix-map has been in OE toolchains since gcc6 and I think we are already using it for kernel builds. We can probably enhance uboot recipes in OE-Core to
use this option if compiler supports it. That solves my problem.Yeah, extending that from kernel to u-boot would be nice. Unfortunately, our products use Linaro gcc7 on rocko for now. Planning to migrate to gcc8 on thud soon...
we can check for the option before using it so atleast it will not break older toolchains more than what they are already broken.
Quoted 7 lines
Quoted 2 lines
I added -ffile-prefix-map locally just with this option added it did not fix the problem.
So, I tried Poky and I do see it overflow by 5-6 KB, which is quite a lot. Though disabling security flags just for u-boot didn't change it a bit. Something else is going on. I'm now rebuilding Poky with security flags disabled globally...
Hmm, disabling security flags globally and rebuilding toolchain and then u-boot "fixes" it. Wonder what would cause the same code to change by 6KB.
Quoted 96 lines · Denys Dmytriyenko
Quoted 94 lines · Denys Dmytriyenko
Quoted 92 lines · Khem Raj
Quoted 82 lines · Khem Raj
Quoted 80 lines · Denys Dmytriyenko
Quoted 77 lines · Khem Raj
Quoted 61 lines · Denys Dmytriyenko
Quoted 32 lines · Khem Raj
Quoted 23 lines · Tom Rini
Quoted 21 lines · Khem Raj
Quoted 19 lines · Denys Dmytriyenko
Quoted 7 lines · Khem Raj
Quoted 5 lines · Denys Dmytriyenko
There have been reports recently that am335x_beaglebone_config generates bad SPL.
Until that is debugged and fixed, use generic am335x_evm_config that covers all
AM335x platforms, including BeagleBone variants.Quoted 7 lines
it fails to link
| 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
| make[2]: *** [/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-staging/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:
spl/u-boot-spl] Error 1FWIW, just built u-boot-ti-staging with gcc7 and gcc8 from oe-core, as well as Linaro gcc7 - no problems.
Quoted 7 lines
Quoted 3 lines
My distro inherits poky policies, and on master it now inherits hardening policies ( security flags) by defaults
do you happen to test poky ?I think we want to take a look at which of the security flags really make sense to use in this context. Thanks!
Quoted 7 lines
there could be more to it, since the distro uses thumb2 ISA by default, I am not sure
if u-boot overrides that and builds using arm mode ISA always but something to consider, I saw several reports about u-boot overflowing sram sections and most of
the solutions were "oh it works for me" or at the best your toolchain is different then mine. here is mine use it and move on.Khem,
Well, FWIW, Tom and I are very familiar with this issue. As a matter of fact, I first encountered it almost 2 years ago and had to prove there's such an issue, because everyone was saying it works for them, something must be wrong with my OE builds... :)
While .sram region is very limited, the issue is exacerbated by the fact that all debug symbols from macros like
__FILE__are ended up in that section as well. So, the longer your build path, the larger the section becomes. Once I had instructions to reproduce the failure here internally with a series of long-named nested directories like aaaaaa and bbbbbb, Nishanth started this thread on U-boot mailing list:
https://lists.denx.de/pipermail/u-boot/2017-March/285031.htmlWe've had the corresponding bug open internally all this time, while adding workarounds to limit .sram section size by other means, like disabling some options to reduce the code size. Your patch is one of those workarounds...
Quoted 6 lines
But we've been patiently waiting for the following feature to come into gcc to fix the issue properly:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268Since it's now part of gcc8, we should be able to use it. Not sure how to keep gcc7 backward compatibility though...
dumping absolute file name strings into SPL seems a waste of space to me, but I will leave that out for now. Moreover it exposes build paths into binaries that user may not be interested to share
-ffile-prefix-map has been in OE toolchains since gcc6 and I think we are already using it for kernel builds. We can probably enhance uboot recipes in OE-Core to
use this option if compiler supports it. That solves my problem.Quoted 6 lines
Quoted 3 lines
Yeah, extending that from kernel to u-boot would be nice. Unfortunately, our products use Linaro gcc7 on rocko for now. Planning to migrate to gcc8 on thud soon...
we can check for the option before using it so atleast it will not break older toolchains more than what they are already broken.
I added -ffile-prefix-map locally just with this option added it did not fix the problem.
Quoted 7 lines
Quoted 4 lines
So, I tried Poky and I do see it overflow by 5-6 KB, which is quite a lot. Though disabling security flags just for u-boot didn't change it a bit. Something else is going on. I'm now rebuilding Poky with security flags disabled globally...
Hmm, disabling security flags globally and rebuilding toolchain and then u-boot "fixes" it. Wonder what would cause the same code to change by 6KB.
security flags also enable PIE in gcc by default. secondly it also enable ssp can you try setting
SECURITY_LDFLAGS = ""SECURITY_STACK_PROTECTOR = ""
in uboot recipe and see if that helps.
If it does not then add
SECURITY_CFLAGS = "${SECURITY_NOPIE_CFLAGS}"
and see if that helps
Quoted 111 lines · Khem Raj
Quoted 96 lines · Denys Dmytriyenko
Quoted 94 lines · Denys Dmytriyenko
Quoted 92 lines · Khem Raj
Quoted 82 lines · Khem Raj
Quoted 80 lines · Denys Dmytriyenko
Quoted 77 lines · Khem Raj
Quoted 61 lines · Denys Dmytriyenko
Quoted 32 lines · Khem Raj
Quoted 23 lines · Tom Rini
Quoted 21 lines · Khem Raj
Quoted 19 lines · Denys Dmytriyenko
Quoted 14 lines · Khem Raj
On Fri, Oct 12, 2018 at 8:00 PM Denys Dmytriyenko <[email protected]> wrote:
There have been reports recently that am335x_beaglebone_config generates bad SPL.
Until that is debugged and fixed, use generic am335x_evm_config that covers all
AM335x platforms, including BeagleBone variants.it fails to link
| 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
| make[2]: *** [/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-staging/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:
spl/u-boot-spl] Error 1FWIW, just built u-boot-ti-staging with gcc7 and gcc8 from oe-core, as well as Linaro gcc7 - no problems.
Quoted 7 lines
Quoted 3 lines
My distro inherits poky policies, and on master it now inherits hardening policies ( security flags) by defaults
do you happen to test poky ?I think we want to take a look at which of the security flags really make sense to use in this context. Thanks!
Quoted 7 lines
there could be more to it, since the distro uses thumb2 ISA by default, I am not sure
if u-boot overrides that and builds using arm mode ISA always but something to consider, I saw several reports about u-boot overflowing sram sections and most of
the solutions were "oh it works for me" or at the best your toolchain is different then mine. here is mine use it and move on.Khem,
Well, FWIW, Tom and I are very familiar with this issue. As a matter of fact, I first encountered it almost 2 years ago and had to prove there's such an issue, because everyone was saying it works for them, something must be wrong with my OE builds... :)
While .sram region is very limited, the issue is exacerbated by the fact that all debug symbols from macros like
__FILE__are ended up in that section as well. So, the longer your build path, the larger the section becomes. Once I had instructions to reproduce the failure here internally with a series of long-named nested directories like aaaaaa and bbbbbb, Nishanth started this thread on U-boot mailing list:
https://lists.denx.de/pipermail/u-boot/2017-March/285031.htmlWe've had the corresponding bug open internally all this time, while adding workarounds to limit .sram section size by other means, like disabling some options to reduce the code size. Your patch is one of those workarounds...
Quoted 6 lines
But we've been patiently waiting for the following feature to come into gcc to fix the issue properly:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268Since it's now part of gcc8, we should be able to use it. Not sure how to keep gcc7 backward compatibility though...
dumping absolute file name strings into SPL seems a waste of space to me, but I will leave that out for now. Moreover it exposes build paths into binaries that user may not be interested to share
-ffile-prefix-map has been in OE toolchains since gcc6 and I think we are already using it for kernel builds. We can probably enhance uboot recipes in OE-Core to
use this option if compiler supports it. That solves my problem.Quoted 6 lines
Quoted 3 lines
Yeah, extending that from kernel to u-boot would be nice. Unfortunately, our products use Linaro gcc7 on rocko for now. Planning to migrate to gcc8 on thud soon...
we can check for the option before using it so atleast it will not break older toolchains more than what they are already broken.
I added -ffile-prefix-map locally just with this option added it did not fix the problem.
Quoted 7 lines
Quoted 4 lines
So, I tried Poky and I do see it overflow by 5-6 KB, which is quite a lot. Though disabling security flags just for u-boot didn't change it a bit. Something else is going on. I'm now rebuilding Poky with security flags disabled globally...
Hmm, disabling security flags globally and rebuilding toolchain and then u-boot "fixes" it. Wonder what would cause the same code to change by 6KB.
security flags also enable PIE in gcc by default. secondly it also enable ssp can you try setting
SECURITY_LDFLAGS= ""SECURITY_STACK_PROTECTOR= ""
Quoted 7 lines
in uboot recipe and see if that helps.
If it does not then add
SECURITY_CFLAGS= "${SECURITY_NOPIE_CFLAGS}"and see if that helps
Neither seem to help.
Quoted 87 lines · Khem Raj
Quoted 86 lines · Khem Raj
Quoted 83 lines · Denys Dmytriyenko
Quoted 69 lines · Khem Raj
Quoted 61 lines · Denys Dmytriyenko
Quoted 32 lines · Khem Raj
Quoted 23 lines · Tom Rini
Quoted 21 lines · Khem Raj
Quoted 19 lines · Denys Dmytriyenko
Quoted 7 lines · Khem Raj
Quoted 5 lines · Denys Dmytriyenko
There have been reports recently that
am335x_beaglebone_configgenerates bad SPL. Until that is debugged and fixed, use genericam335x_evm_configthat covers all AM335x platforms, including BeagleBone variants.Quoted 7 lines
it fails to link
| 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
| make[2]: *** [/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-staging/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:
spl/u-boot-spl] Error 1FWIW, just built u-boot-ti-staging with gcc7 and gcc8 from oe-core, as well as Linaro gcc7 - no problems.
Quoted 7 lines
Quoted 3 lines
My distro inherits poky policies, and on master it now inherits hardening policies ( security flags) by defaults
do you happen to test poky ?I think we want to take a look at which of the security flags really make sense to use in this context. Thanks!
Quoted 7 lines
there could be more to it, since the distro uses thumb2 ISA by default, I am not sure
if u-boot overrides that and builds using arm mode ISA always but something to consider, I saw several reports about u-boot overflowing sram sections and most of
the solutions were "oh it works for me" or at the best your toolchain is different then mine. here is mine use it and move on.Khem,
Well, FWIW, Tom and I are very familiar with this issue. As a matter of fact, I first encountered it almost 2 years ago and had to prove there's such an issue, because everyone was saying it works for them, something must be wrong with my OE builds... :)
While .sram region is very limited, the issue is exacerbated by the fact that all debug symbols from macros like
__FILE__are ended up in that section as well. So, the longer your build path, the larger the section becomes. Once I had instructions to reproduce the failure here internally with a series of long-named nested directories like aaaaaa and bbbbbb, Nishanth started this thread on U-boot mailing list:
https://lists.denx.de/pipermail/u-boot/2017-March/285031.htmlWe've had the corresponding bug open internally all this time, while adding workarounds to limit .sram section size by other means, like disabling some options to reduce the code size. Your patch is one of those workarounds...
Quoted 6 lines
But we've been patiently waiting for the following feature to come into gcc to fix the issue properly:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268Since it's now part of gcc8, we should be able to use it. Not sure how to keep gcc7 backward compatibility though...
Quoted 8 lines
dumping absolute file name strings into SPL seems a waste of space to me, but I will leave that out for now. Moreover it exposes build paths into binaries that user may not be interested to share
-ffile-prefix-map has been in OE toolchains since gcc6 and I think we are already using it for kernel builds. We can probably enhance uboot recipes in OE-Core to
use this option if compiler supports it. That solves my problem.Yeah, extending that from kernel to u-boot would be nice. Unfortunately, our products use Linaro gcc7 on rocko for now. Planning to migrate to gcc8 on thud soon...
Quoted 5 lines
Quoted 2 lines
we can check for the option before using it so atleast it will not break older toolchains more than what they are already broken.
I added -ffile-prefix-map locally just with this option added it did not fix the problem.
I also tried adding -ffile-prefix-map locally and it only shaved off less than 500 bytes. Still wondering what those extra 5KB of code are...
Quoted 112 lines · On Wed, Oct 17, 2018 at 02:39:15AM +0000, [email protected] wrote:
Hi.
Quoted 99 lines
-----Original Message-----
From: Tom Rini [mailto:[email protected]]
Sent: Wednesday, October 17, 2018 3:59 AM
To: Denys Dmytriyenko <[email protected]>; Yamada, Masahiro/山田 真弘 <[email protected]>
Cc: Khem Raj <[email protected]>; [email protected]
Subject: Re: [meta-ti] [PATCH] beaglebone.conf: temporarily use genericam335x_evm_configfor U-bootQuoted 6 lines · Denys Dmytriyenko
Quoted 5 lines · Denys Dmytriyenko
Quoted 4 lines · Khem Raj
Quoted 3 lines · Tom Rini
Quoted 1 line · Khem Raj
On Sun, Oct 14, 2018 at 12:24 PM Denys Dmytriyenko <[email protected]>
Quoted 3 lines · wrote:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines · Khem Raj
Quoted 1 line
On Fri, Oct 12, 2018 at 8:00 PM Denys Dmytriyenko <[email protected]>
Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
There have been reports recently that
am335x_beaglebone_configgenerates bad SPL.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Until that is debugged and fixed, use generic
am335x_evm_configthat covers all
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
AM335x platforms, including BeagleBone variants.
it fails to link
| arm-yoe-linux-gnueabi-ld.bfd: u-boot-spl section `.rodata'
will not
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
fit in region `.sram'
| arm-yoe-linux-gnueabi-ld.bfd: region `.sram' overflowedby 5772 bytes
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
| make[2]: ***
[
/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-staging/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
spl/u-boot-spl] Error 1
FWIW, just built u-boot-ti-staging with gcc7 and gcc8 from oe-core,
as well as
Quoted 18 lines
Quoted 18 lines
Quoted 17 lines
Quoted 9 lines
Quoted 5 lines
Quoted 1 line
Linaro gcc7 - no problems.
My distro inherits poky policies, and on master it now inherits hardening policies ( security flags) by defaults
do you happen to test poky ?I think we want to take a look at which of the security flags really make sense to use in this context. Thanks!
there could be more to it, since the distro uses thumb2 ISA by default, I am not sure
if u-boot overrides that and builds using arm mode ISA always but something to consider, I saw several reports about u-boot overflowing sram sections and most of
the solutions were "oh it works for me" or at the best your toolchain is different then mine. here is mine use it and move on.Quoted 3 lines
Quoted 3 lines
Khem,
Well, FWIW, Tom and I are very familiar with this issue. As a matter
of fact,
Quoted 1 line
Quoted 1 line
I first encountered it almost 2 years ago and had to prove there's such
an
Quoted 1 line
Quoted 1 line
issue, because everyone was saying it works for them, something must
be wrong
Quoted 3 lines
Quoted 3 lines
with my OE builds... :)
While .sram region is very limited, the issue is exacerbated by the
fact that
Quoted 1 line
Quoted 1 line
all debug symbols from macros like
__FILE__are ended up in that sectionas
Quoted 1 line
Quoted 1 line
well. So, the longer your build path, the larger the section becomes.
Once I
Quoted 1 line
Quoted 1 line
had instructions to reproduce the failure here internally with a series
of
Quoted 1 line
Quoted 1 line
long-named nested directories like aaaaaa and bbbbbb, Nishanth started
this
Quoted 4 lines
Quoted 4 lines
thread on U-boot mailing list:
https://lists.denx.de/pipermail/u-boot/2017-March/285031.htmlWe've had the corresponding bug open internally all this time, while
adding
Quoted 1 line
Quoted 1 line
workarounds to limit .sram section size by other means, like disabling
some
Quoted 3 lines
Quoted 3 lines
options to reduce the code size. Your patch is one of those workarounds...
But we've been patiently waiting for the following feature to come into
gcc to
Quoted 4 lines
Quoted 4 lines
fix the issue properly:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268Since it's now part of gcc8, we should be able to use it. Not sure how
to keep
Quoted 2 lines
Quoted 1 line
gcc7 backward compatibility though...
Quoted 8 lines
Quoted 1 line
BTW, there were few attempts to "fix" it in U-boot as well, such as [1],
but I
Quoted 3 lines
don't believe they got accepted. Tom?
I think the end result was waiting on the kernel community to agree on a path forward for
Kbuildand then bring that back.
Quoted 8 lines
U-Boot now supports -fmacro-prefix-map, so GCC 8 is OK. (see commit
1eb2e71ed)For GCC 7 or older, sorry, I have no idea what to do. My patch set [1] was an ugly hack,
and wrong in the first place.What I can suggest is, please use GCC 8.
Ah yes, thanks!
Signature · 1 line
Tom
Quoted 131 lines · On Tue, Oct 16, 2018 at 7:39 PM <[email protected]> wrote:
Hi.
Quoted 13 lines
-----Original Message-----
From: Tom Rini [mailto:[email protected]]
Sent: Wednesday, October 17, 2018 3:59 AM
To: Denys Dmytriyenko <[email protected]>; Yamada, Masahiro/山田 真弘 <[email protected]>
Cc: Khem Raj <[email protected]>; [email protected]
Subject: Re: [meta-ti] [PATCH] beaglebone.conf: temporarily use genericam335x_evm_configfor U-bootQuoted 3 lines · Denys Dmytriyenko
Quoted 2 lines · Denys Dmytriyenko
Quoted 1 line · Khem Raj
On Tue, Oct 16, 2018 at 9:42 AM Tom Rini <[email protected]>
Quoted 3 lines · wrote:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines · Khem Raj
Quoted 1 line
On Sun, Oct 14, 2018 at 12:24 PM Denys Dmytriyenko <
Quoted 4 lines
Quoted 3 lines · wrote:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines · Khem Raj
Quoted 1 line
On Fri, Oct 12, 2018 at 8:00 PM Denys Dmytriyenko <
Quoted 3 lines
Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
There have been reports recently that
am335x_beaglebone_configQuoted 2 lines
generates bad SPL.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Until that is debugged and fixed, use generic
am335x_evm_configQuoted 7 lines
that covers all
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
AM335x platforms, including BeagleBone variants.
it fails to link
| arm-yoe-linux-gnueabi-ld.bfd: u-boot-spl section
`.rodata'
Quoted 10 lines
will not
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
fit in region `.sram'
| arm-yoe-linux-gnueabi-ld.bfd: region `.sram' overflowedby 5772 bytes
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
| make[2]: ***
[
/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-staging/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
spl/u-boot-spl] Error 1
FWIW, just built u-boot-ti-staging with gcc7 and gcc8 from
oe-core,
Quoted 8 lines
as well as
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Linaro gcc7 - no problems.
My distro inherits poky policies, and on master it now inherits hardening policies ( security flags) by defaults
do you happen to test poky ?I think we want to take a look at which of the security flags
really
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
make sense to use in this context. Thanks!
there could be more to it, since the distro uses thumb2 ISA by default, I am not sure
if u-boot overrides that and builds using arm mode ISA always but something to consider, I saw several reports about u-bootoverflowing
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
sram sections and most of
the solutions were "oh it works for me" or at the best yourtoolchain
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
is different then mine. here is mine use it and move on.
Khem,
Well, FWIW, Tom and I are very familiar with this issue. As a matter
of fact,
Quoted 1 line
Quoted 1 line
I first encountered it almost 2 years ago and had to prove there's
such
Quoted 8 lines
an
Quoted 1 line
Quoted 1 line
issue, because everyone was saying it works for them, something must
be wrong
Quoted 3 lines
Quoted 3 lines
with my OE builds... :)
While .sram region is very limited, the issue is exacerbated by the
fact that
Quoted 1 line
Quoted 1 line
all debug symbols from macros like
__FILE__are ended up in thatsection
Quoted 4 lines
as
Quoted 1 line
Quoted 1 line
well. So, the longer your build path, the larger the section becomes.
Once I
Quoted 1 line
Quoted 1 line
had instructions to reproduce the failure here internally with a
series
Quoted 2 lines
of
Quoted 1 line
Quoted 1 line
long-named nested directories like aaaaaa and bbbbbb, Nishanth
started
Quoted 7 lines
this
Quoted 4 lines
Quoted 4 lines
thread on U-boot mailing list:
https://lists.denx.de/pipermail/u-boot/2017-March/285031.htmlWe've had the corresponding bug open internally all this time, while
adding
Quoted 1 line
Quoted 1 line
workarounds to limit .sram section size by other means, like
disabling
Quoted 2 lines
some
Quoted 1 line
Quoted 1 line
options to reduce the code size. Your patch is one of those
workarounds...
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
But we've been patiently waiting for the following feature to come
into
Quoted 5 lines
gcc to
Quoted 4 lines
Quoted 4 lines
fix the issue properly:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268Since it's now part of gcc8, we should be able to use it. Not sure
how
Quoted 4 lines
to keep
Quoted 3 lines
Quoted 1 line
gcc7 backward compatibility though...
BTW, there were few attempts to "fix" it in U-boot as well, such as
[1],
Quoted 7 lines
but I
Quoted 3 lines
don't believe they got accepted. Tom?
I think the end result was waiting on the kernel community to agree on a path forward for
Kbuildand then bring that back.
Quoted 8 lines
U-Boot now supports -fmacro-prefix-map, so GCC 8 is OK. (see commit
1eb2e71ed)For GCC 7 or older, sorry, I have no idea what to do. My patch set [1] was an ugly hack,
and wrong in the first place.What I can suggest is, please use GCC 8.
Yeah I saw that but this patch is not their in 2018.01 release that TI fork is based on regardless I backported this patch to this version it did not bring the size below mark
I think it’s because we are using hardened toolchain and that enalbles extra options to enable pie and ssp since these options get added to CC they get passed into uboot straight
I think we should just disable security flags for u boot in OE and may be uboot make system should append fno-pie fno-stack-protector to nullify these options
Quoted 5 lines
Thanks.
Quoted 150 lines · Khem Raj
Quoted 131 lines · On Tue, Oct 16, 2018 at 7:39 PM <[email protected]> wrote:
Hi.
Quoted 13 lines
-----Original Message-----
From: Tom Rini [mailto:[email protected]]
Sent: Wednesday, October 17, 2018 3:59 AM
To: Denys Dmytriyenko <[email protected]>; Yamada, Masahiro/山田 真弘 <[email protected]>
Cc: Khem Raj <[email protected]>; [email protected]
Subject: Re: [meta-ti] [PATCH] beaglebone.conf: temporarily use genericam335x_evm_configfor U-bootQuoted 3 lines · Denys Dmytriyenko
Quoted 2 lines · Denys Dmytriyenko
Quoted 1 line · Khem Raj
On Tue, Oct 16, 2018 at 9:42 AM Tom Rini <[email protected]>
Quoted 3 lines · wrote:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines · Khem Raj
Quoted 1 line
On Sun, Oct 14, 2018 at 12:24 PM Denys Dmytriyenko <
Quoted 4 lines
Quoted 3 lines · wrote:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines · Khem Raj
Quoted 1 line
On Fri, Oct 12, 2018 at 8:00 PM Denys Dmytriyenko <
Quoted 3 lines
Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
There have been reports recently that
am335x_beaglebone_configQuoted 2 lines
generates bad SPL.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Until that is debugged and fixed, use generic
am335x_evm_configQuoted 7 lines
that covers all
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
AM335x platforms, including BeagleBone variants.
it fails to link
| arm-yoe-linux-gnueabi-ld.bfd: u-boot-spl section
`.rodata'
Quoted 10 lines
will not
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
fit in region `.sram'
| arm-yoe-linux-gnueabi-ld.bfd: region `.sram' overflowedby 5772 bytes
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
| make[2]: ***
[
/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-staging/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
spl/u-boot-spl] Error 1
FWIW, just built u-boot-ti-staging with gcc7 and gcc8 from
oe-core,
Quoted 8 lines
as well as
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Linaro gcc7 - no problems.
My distro inherits poky policies, and on master it now inherits hardening policies ( security flags) by defaults
do you happen to test poky ?I think we want to take a look at which of the security flags
really
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
make sense to use in this context. Thanks!
there could be more to it, since the distro uses thumb2 ISA by default, I am not sure
if u-boot overrides that and builds using arm mode ISA always but something to consider, I saw several reports about u-bootoverflowing
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
sram sections and most of
the solutions were "oh it works for me" or at the best yourtoolchain
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
is different then mine. here is mine use it and move on.
Khem,
Well, FWIW, Tom and I are very familiar with this issue. As a matter
of fact,
Quoted 1 line
Quoted 1 line
I first encountered it almost 2 years ago and had to prove there's
such
Quoted 8 lines
an
Quoted 1 line
Quoted 1 line
issue, because everyone was saying it works for them, something must
be wrong
Quoted 3 lines
Quoted 3 lines
with my OE builds... :)
While .sram region is very limited, the issue is exacerbated by the
fact that
Quoted 1 line
Quoted 1 line
all debug symbols from macros like
__FILE__are ended up in thatsection
Quoted 4 lines
as
Quoted 1 line
Quoted 1 line
well. So, the longer your build path, the larger the section becomes.
Once I
Quoted 1 line
Quoted 1 line
had instructions to reproduce the failure here internally with a
series
Quoted 2 lines
of
Quoted 1 line
Quoted 1 line
long-named nested directories like aaaaaa and bbbbbb, Nishanth
started
Quoted 7 lines
this
Quoted 4 lines
Quoted 4 lines
thread on U-boot mailing list:
https://lists.denx.de/pipermail/u-boot/2017-March/285031.htmlWe've had the corresponding bug open internally all this time, while
adding
Quoted 1 line
Quoted 1 line
workarounds to limit .sram section size by other means, like
disabling
Quoted 2 lines
some
Quoted 1 line
Quoted 1 line
options to reduce the code size. Your patch is one of those
workarounds...
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
But we've been patiently waiting for the following feature to come
into
Quoted 5 lines
gcc to
Quoted 4 lines
Quoted 4 lines
fix the issue properly:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268Since it's now part of gcc8, we should be able to use it. Not sure
how
Quoted 4 lines
to keep
Quoted 3 lines
Quoted 1 line
gcc7 backward compatibility though...
BTW, there were few attempts to "fix" it in U-boot as well, such as
[1],
Quoted 7 lines
but I
Quoted 3 lines
don't believe they got accepted. Tom?
I think the end result was waiting on the kernel community to agree on a path forward for
Kbuildand then bring that back.Quoted 8 lines
U-Boot now supports -fmacro-prefix-map, so GCC 8 is OK. (see commit
1eb2e71ed)For GCC 7 or older, sorry, I have no idea what to do. My patch set [1] was an ugly hack,
and wrong in the first place.What I can suggest is, please use GCC 8.
Yeah I saw that but this patch is not their in 2018.01 release that TI fork is based on regardless I backported this patch to this version it did not bring the size below mark
I think it’s because we are using hardened toolchain and that enalbles extra options to enable pie and ssp since these options get added to CC they get passed into uboot straight
Quoted 3 lines
I think we should just disable security flags for u boot in OE and may be uboot make system should append fno-pie fno-stack-protector to nullify these options
FWIW, as I mentioned earlier, just adding no-security flags to the recipe didn't really work. I'm open to more suggestions.
Signature · 1 line
Denys
try setting #GCCPIE = "" in local.conf
Quoted 161 lines · Denys Dmytriyenko
Quoted 150 lines · Khem Raj
Quoted 131 lines · On Tue, Oct 16, 2018 at 7:39 PM <[email protected]> wrote:
Hi.
Quoted 13 lines
-----Original Message-----
From: Tom Rini [mailto:[email protected]]
Sent: Wednesday, October 17, 2018 3:59 AM
To: Denys Dmytriyenko <[email protected]>; Yamada, Masahiro/山田 真弘 <[email protected]>
Cc: Khem Raj <[email protected]>; [email protected]
Subject: Re: [meta-ti] [PATCH] beaglebone.conf: temporarily use genericam335x_evm_configfor U-bootQuoted 3 lines · Denys Dmytriyenko
Quoted 2 lines · Denys Dmytriyenko
Quoted 1 line · Khem Raj
On Tue, Oct 16, 2018 at 9:42 AM Tom Rini <[email protected]>
Quoted 3 lines · wrote:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines · Khem Raj
Quoted 1 line
On Sun, Oct 14, 2018 at 12:24 PM Denys Dmytriyenko <
Quoted 4 lines
Quoted 3 lines · wrote:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines · Khem Raj
Quoted 1 line
On Fri, Oct 12, 2018 at 8:00 PM Denys Dmytriyenko <
Quoted 3 lines
Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
There have been reports recently that
am335x_beaglebone_configQuoted 2 lines
generates bad SPL.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Until that is debugged and fixed, use generic
am335x_evm_configQuoted 7 lines
that covers all
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
AM335x platforms, including BeagleBone variants.
it fails to link
| arm-yoe-linux-gnueabi-ld.bfd: u-boot-spl section
`.rodata'
Quoted 10 lines
will not
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
fit in region `.sram'
| arm-yoe-linux-gnueabi-ld.bfd: region `.sram' overflowedby 5772 bytes
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
| make[2]: ***
[
/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-staging/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
spl/u-boot-spl] Error 1
FWIW, just built u-boot-ti-staging with gcc7 and gcc8 from
oe-core,
Quoted 8 lines
as well as
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Linaro gcc7 - no problems.
My distro inherits poky policies, and on master it now inherits hardening policies ( security flags) by defaults
do you happen to test poky ?I think we want to take a look at which of the security flags
really
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
make sense to use in this context. Thanks!
there could be more to it, since the distro uses thumb2 ISA by default, I am not sure
if u-boot overrides that and builds using arm mode ISA always but something to consider, I saw several reports about u-bootoverflowing
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
sram sections and most of
the solutions were "oh it works for me" or at the best yourtoolchain
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
is different then mine. here is mine use it and move on.
Khem,
Well, FWIW, Tom and I are very familiar with this issue. As a matter
of fact,
Quoted 1 line
Quoted 1 line
I first encountered it almost 2 years ago and had to prove there's
such
Quoted 8 lines
an
Quoted 1 line
Quoted 1 line
issue, because everyone was saying it works for them, something must
be wrong
Quoted 3 lines
Quoted 3 lines
with my OE builds... :)
While .sram region is very limited, the issue is exacerbated by the
fact that
Quoted 1 line
Quoted 1 line
all debug symbols from macros like
__FILE__are ended up in thatsection
Quoted 4 lines
as
Quoted 1 line
Quoted 1 line
well. So, the longer your build path, the larger the section becomes.
Once I
Quoted 1 line
Quoted 1 line
had instructions to reproduce the failure here internally with a
series
Quoted 2 lines
of
Quoted 1 line
Quoted 1 line
long-named nested directories like aaaaaa and bbbbbb, Nishanth
started
Quoted 7 lines
this
Quoted 4 lines
Quoted 4 lines
thread on U-boot mailing list:
https://lists.denx.de/pipermail/u-boot/2017-March/285031.htmlWe've had the corresponding bug open internally all this time, while
adding
Quoted 1 line
Quoted 1 line
workarounds to limit .sram section size by other means, like
disabling
Quoted 2 lines
some
Quoted 1 line
Quoted 1 line
options to reduce the code size. Your patch is one of those
workarounds...
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
But we've been patiently waiting for the following feature to come
into
Quoted 5 lines
gcc to
Quoted 4 lines
Quoted 4 lines
fix the issue properly:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268Since it's now part of gcc8, we should be able to use it. Not sure
how
Quoted 4 lines
to keep
Quoted 3 lines
Quoted 1 line
gcc7 backward compatibility though...
BTW, there were few attempts to "fix" it in U-boot as well, such as
[1],
Quoted 7 lines
but I
Quoted 3 lines
don't believe they got accepted. Tom?
I think the end result was waiting on the kernel community to agree on a path forward for
Kbuildand then bring that back.Quoted 8 lines
U-Boot now supports -fmacro-prefix-map, so GCC 8 is OK. (see commit
1eb2e71ed)For GCC 7 or older, sorry, I have no idea what to do. My patch set [1] was an ugly hack,
and wrong in the first place.What I can suggest is, please use GCC 8.
Yeah I saw that but this patch is not their in 2018.01 release that TI fork is based on regardless I backported this patch to this version it did not bring the size below mark
I think it’s because we are using hardened toolchain and that enalbles extra options to enable pie and ssp since these options get added to CC they get passed into uboot straightQuoted 3 lines
I think we should just disable security flags for u boot in OE and may be uboot make system should append fno-pie fno-stack-protector to nullify these options
FWIW, as I mentioned earlier, just adding no-security flags to the recipe didn't really work. I'm open to more suggestions.
--
Denys
Quoted 150 lines · Khem Raj
Quoted 131 lines · On Tue, Oct 16, 2018 at 7:39 PM <[email protected]> wrote:
Hi.
Quoted 13 lines
-----Original Message-----
From: Tom Rini [mailto:[email protected]]
Sent: Wednesday, October 17, 2018 3:59 AM
To: Denys Dmytriyenko <[email protected]>; Yamada, Masahiro/山田 真弘 <[email protected]>
Cc: Khem Raj <[email protected]>; [email protected]
Subject: Re: [meta-ti] [PATCH] beaglebone.conf: temporarily use genericam335x_evm_configfor U-bootQuoted 3 lines · Denys Dmytriyenko
Quoted 2 lines · Denys Dmytriyenko
Quoted 1 line · Khem Raj
On Tue, Oct 16, 2018 at 9:42 AM Tom Rini <[email protected]>
Quoted 3 lines · wrote:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines · Khem Raj
Quoted 1 line
On Sun, Oct 14, 2018 at 12:24 PM Denys Dmytriyenko <
Quoted 4 lines
Quoted 3 lines · wrote:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines · Khem Raj
Quoted 1 line
On Fri, Oct 12, 2018 at 8:00 PM Denys Dmytriyenko <
Quoted 3 lines
Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
There have been reports recently that
am335x_beaglebone_configQuoted 2 lines
generates bad SPL.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Until that is debugged and fixed, use generic
am335x_evm_configQuoted 7 lines
that covers all
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
AM335x platforms, including BeagleBone variants.
it fails to link
| arm-yoe-linux-gnueabi-ld.bfd: u-boot-spl section
`.rodata'
Quoted 10 lines
will not
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
fit in region `.sram'
| arm-yoe-linux-gnueabi-ld.bfd: region `.sram' overflowedby 5772 bytes
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
| make[2]: ***
[
/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-staging/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
spl/u-boot-spl] Error 1
FWIW, just built u-boot-ti-staging with gcc7 and gcc8 from
oe-core,
Quoted 8 lines
as well as
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Linaro gcc7 - no problems.
My distro inherits poky policies, and on master it now inherits hardening policies ( security flags) by defaults
do you happen to test poky ?I think we want to take a look at which of the security flags
really
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
make sense to use in this context. Thanks!
there could be more to it, since the distro uses thumb2 ISA by default, I am not sure
if u-boot overrides that and builds using arm mode ISA always but something to consider, I saw several reports about u-bootoverflowing
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
sram sections and most of
the solutions were "oh it works for me" or at the best yourtoolchain
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
is different then mine. here is mine use it and move on.
Khem,
Well, FWIW, Tom and I are very familiar with this issue. As a matter
of fact,
Quoted 1 line
Quoted 1 line
I first encountered it almost 2 years ago and had to prove there's
such
Quoted 8 lines
an
Quoted 1 line
Quoted 1 line
issue, because everyone was saying it works for them, something must
be wrong
Quoted 3 lines
Quoted 3 lines
with my OE builds... :)
While .sram region is very limited, the issue is exacerbated by the
fact that
Quoted 1 line
Quoted 1 line
all debug symbols from macros like
__FILE__are ended up in thatsection
Quoted 4 lines
as
Quoted 1 line
Quoted 1 line
well. So, the longer your build path, the larger the section becomes.
Once I
Quoted 1 line
Quoted 1 line
had instructions to reproduce the failure here internally with a
series
Quoted 2 lines
of
Quoted 1 line
Quoted 1 line
long-named nested directories like aaaaaa and bbbbbb, Nishanth
started
Quoted 7 lines
this
Quoted 4 lines
Quoted 4 lines
thread on U-boot mailing list:
https://lists.denx.de/pipermail/u-boot/2017-March/285031.htmlWe've had the corresponding bug open internally all this time, while
adding
Quoted 1 line
Quoted 1 line
workarounds to limit .sram section size by other means, like
disabling
Quoted 2 lines
some
Quoted 1 line
Quoted 1 line
options to reduce the code size. Your patch is one of those
workarounds...
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
But we've been patiently waiting for the following feature to come
into
Quoted 5 lines
gcc to
Quoted 4 lines
Quoted 4 lines
fix the issue properly:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268Since it's now part of gcc8, we should be able to use it. Not sure
how
Quoted 4 lines
to keep
Quoted 3 lines
Quoted 1 line
gcc7 backward compatibility though...
BTW, there were few attempts to "fix" it in U-boot as well, such as
[1],
Quoted 7 lines
but I
Quoted 3 lines
don't believe they got accepted. Tom?
I think the end result was waiting on the kernel community to agree on a path forward for
Kbuildand then bring that back.Quoted 8 lines
U-Boot now supports -fmacro-prefix-map, so GCC 8 is OK. (see commit
1eb2e71ed)For GCC 7 or older, sorry, I have no idea what to do. My patch set [1] was an ugly hack,
and wrong in the first place.What I can suggest is, please use GCC 8.
Yeah I saw that but this patch is not their in 2018.01 release that TI fork is based on regardless I backported this patch to this version it did not bring the size below mark
I think it’s because we are using hardened toolchain and that enalbles extra options to enable pie and ssp since these options get added to CC they get passed into uboot straight
Quoted 3 lines
I think we should just disable security flags for u boot in OE and may be uboot make system should append fno-pie fno-stack-protector to nullify these options
OK, do you want to submit a patch for that or should I do one and just Suggested-by you? Thanks!
Signature · 1 line
Tom
Quoted 167 lines · Tom Rini
Quoted 11 lines · Khem Raj
Quoted 9 lines · On Tue, Oct 16, 2018 at 7:39 PM <[email protected]> wrote:
Hi.
Quoted 7 lines
-----Original Message-----
From: Tom Rini [mailto:[email protected]]
Sent: Wednesday, October 17, 2018 3:59 AM
To: Denys Dmytriyenko <[email protected]>; Yamada, Masahiro/山田 真弘 <[email protected]>
Cc: Khem Raj <[email protected]>; [email protected]
Subject: Re: [meta-ti] [PATCH] beaglebone.conf: temporarily usegeneric
Quoted 27 lines
Quoted 27 lines
Quoted 6 lines
am335x_evm_configfor U-bootQuoted 3 lines · Denys Dmytriyenko
Quoted 2 lines · Denys Dmytriyenko
Quoted 1 line · Khem Raj
On Tue, Oct 16, 2018 at 9:42 AM Tom Rini <[email protected]>
Quoted 3 lines · wrote:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines · Khem Raj
Quoted 1 line
On Sun, Oct 14, 2018 at 12:24 PM Denys Dmytriyenko <
Quoted 4 lines
Quoted 3 lines · wrote:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines · Khem Raj
Quoted 1 line
On Fri, Oct 12, 2018 at 8:00 PM Denys Dmytriyenko <
Quoted 3 lines
Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
There have been reports recently that
am335x_beaglebone_configQuoted 2 lines
generates bad SPL.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Until that is debugged and fixed, use generic
am335x_evm_configQuoted 4 lines
that covers all
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines
AM335x platforms, including BeagleBone variants.
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
it fails to link
| arm-yoe-linux-gnueabi-ld.bfd: u-boot-spl section
`.rodata'
Quoted 3 lines
will not
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
fit in region `.sram'
| arm-yoe-linux-gnueabi-ld.bfd: region `.sram'overflowed
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
by 5772 bytes
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
| make[2]: ***
[
/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-stagQuoted 4 lines
Quoted 4 lines
Quoted 4 lines
ing/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
spl/u-boot-spl] Error 1
FWIW, just built u-boot-ti-staging with gcc7 and gcc8
from
Quoted 5 lines
Quoted 5 lines
oe-core,
Quoted 4 lines
as well as
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
Linaro gcc7 - no problems.
My distro inherits poky policies, and on master it now
inherits
Quoted 11 lines
Quoted 11 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
hardening policies ( security flags) by defaults
do you happen to test poky ?I think we want to take a look at which of the security flags
really
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
make sense to use in this context. Thanks!
there could be more to it, since the distro uses thumb2 ISA by default, I am not sure
if u-boot overrides that and builds using arm mode ISA alwaysbut
Quoted 10 lines
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
something to consider, I saw several reports about u-boot
overflowing
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
sram sections and most of
the solutions were "oh it works for me" or at the best yourtoolchain
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
is different then mine. here is mine use it and move on.
Khem,
Well, FWIW, Tom and I are very familiar with this issue. As a
matter
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
of fact,
Quoted 1 line
Quoted 1 line
I first encountered it almost 2 years ago and had to prove
there's
Quoted 3 lines
Quoted 3 lines
such
Quoted 2 lines
an
Quoted 1 line
Quoted 1 line
issue, because everyone was saying it works for them, something
must
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
be wrong
Quoted 3 lines
Quoted 3 lines
with my OE builds... :)
While .sram region is very limited, the issue is exacerbated by
the
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
fact that
Quoted 1 line
Quoted 1 line
all debug symbols from macros like
__FILE__are ended up in thatsection
Quoted 2 lines
as
Quoted 1 line
Quoted 1 line
well. So, the longer your build path, the larger the section
becomes.
Quoted 11 lines
Quoted 11 lines
Quoted 2 lines
Once I
Quoted 1 line
Quoted 1 line
had instructions to reproduce the failure here internally with a
series
Quoted 2 lines
of
Quoted 1 line
Quoted 1 line
long-named nested directories like aaaaaa and bbbbbb, Nishanth
started
Quoted 5 lines
this
Quoted 4 lines
Quoted 4 lines
thread on U-boot mailing list:
https://lists.denx.de/pipermail/u-boot/2017-March/285031.htmlWe've had the corresponding bug open internally all this time,
while
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
adding
Quoted 1 line
Quoted 1 line
workarounds to limit .sram section size by other means, like
disabling
Quoted 2 lines
some
Quoted 1 line
Quoted 1 line
options to reduce the code size. Your patch is one of those
workarounds...
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
But we've been patiently waiting for the following feature to
come
Quoted 6 lines
Quoted 6 lines
into
Quoted 5 lines
gcc to
Quoted 4 lines
Quoted 4 lines
fix the issue properly:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268Since it's now part of gcc8, we should be able to use it. Not
sure
Quoted 4 lines
Quoted 4 lines
how
Quoted 3 lines
to keep
Quoted 2 lines
Quoted 1 line
gcc7 backward compatibility though...
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
Quoted 1 line
BTW, there were few attempts to "fix" it in U-boot as well, such as
[1],
Quoted 6 lines
but I
Quoted 3 lines
don't believe they got accepted. Tom?
I think the end result was waiting on the kernel community to agree
on a
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
path forward for
Kbuildand then bring that back.U-Boot now supports -fmacro-prefix-map, so GCC 8 is OK. (see commit
1eb2e71ed)Quoted 8 lines
Quoted 5 lines
For GCC 7 or older, sorry, I have no idea what to do. My patch set [1] was an ugly hack,
and wrong in the first place.What I can suggest is, please use GCC 8.
Yeah I saw that but this patch is not their in 2018.01 release that TI
fork
Quoted 6 lines
is based on regardless I backported this patch to this version it did not bring the size below mark
I think it’s because we are using hardened toolchain and that enalbles extra options to enable pie and ssp since these options get added to CC they get passed into uboot straight
Quoted 6 lines
Quoted 3 lines
I think we should just disable security flags for u boot in OE and may be uboot make system should append fno-pie fno-stack-protector to nullify these options
OK, do you want to submit a patch for that or should I do one and just Suggested-by you? Thanks!
This would not be acceptable change since it changes how we build gcc itself secondly it does not happen for master uboot
However if this works then we need to understand why it increas e the size
Quoted 4 lines
--
Tom
Quoted 1 line · Khem Raj
try setting #GCCPIE = "" in local.conf
Yeah, it works, but obviously rebuilds the entire toolchain...
Quoted 162 lines · Denys Dmytriyenko
Quoted 161 lines · Khem Raj
Quoted 150 lines · On Tue, Oct 16, 2018 at 7:39 PM <[email protected]> wrote:
Quoted 132 lines
Hi.
Quoted 13 lines
-----Original Message-----
From: Tom Rini [mailto:[email protected]]
Sent: Wednesday, October 17, 2018 3:59 AM
To: Denys Dmytriyenko <[email protected]>; Yamada, Masahiro/山田 真弘 <[email protected]>
Cc: Khem Raj <[email protected]>; [email protected]
Subject: Re: [meta-ti] [PATCH] beaglebone.conf: temporarily use genericam335x_evm_configfor U-bootQuoted 3 lines · Denys Dmytriyenko
Quoted 2 lines · Denys Dmytriyenko
Quoted 1 line · Khem Raj
On Tue, Oct 16, 2018 at 9:42 AM Tom Rini <[email protected]>
Quoted 3 lines · wrote:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines · Khem Raj
Quoted 1 line
On Sun, Oct 14, 2018 at 12:24 PM Denys Dmytriyenko <
Quoted 4 lines
Quoted 3 lines · wrote:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines · Khem Raj
Quoted 1 line
On Fri, Oct 12, 2018 at 8:00 PM Denys Dmytriyenko <
Quoted 3 lines
Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
There have been reports recently that
am335x_beaglebone_configQuoted 2 lines
generates bad SPL.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Until that is debugged and fixed, use generic
am335x_evm_configQuoted 7 lines
that covers all
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
AM335x platforms, including BeagleBone variants.
it fails to link
| arm-yoe-linux-gnueabi-ld.bfd: u-boot-spl section
`.rodata'
Quoted 10 lines
will not
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
fit in region `.sram'
| arm-yoe-linux-gnueabi-ld.bfd: region `.sram' overflowedby 5772 bytes
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
| make[2]: ***
[
/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-staging/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
spl/u-boot-spl] Error 1
FWIW, just built u-boot-ti-staging with gcc7 and gcc8 from
oe-core,
Quoted 8 lines
as well as
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Linaro gcc7 - no problems.
My distro inherits poky policies, and on master it now inherits hardening policies ( security flags) by defaults
do you happen to test poky ?I think we want to take a look at which of the security flags
really
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
make sense to use in this context. Thanks!
there could be more to it, since the distro uses thumb2 ISA by default, I am not sure
if u-boot overrides that and builds using arm mode ISA always but something to consider, I saw several reports about u-bootoverflowing
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
sram sections and most of
the solutions were "oh it works for me" or at the best yourtoolchain
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
is different then mine. here is mine use it and move on.
Khem,
Well, FWIW, Tom and I are very familiar with this issue. As a matter
of fact,
Quoted 1 line
Quoted 1 line
I first encountered it almost 2 years ago and had to prove there's
such
Quoted 8 lines
an
Quoted 1 line
Quoted 1 line
issue, because everyone was saying it works for them, something must
be wrong
Quoted 3 lines
Quoted 3 lines
with my OE builds... :)
While .sram region is very limited, the issue is exacerbated by the
fact that
Quoted 1 line
Quoted 1 line
all debug symbols from macros like
__FILE__are ended up in thatsection
Quoted 4 lines
as
Quoted 1 line
Quoted 1 line
well. So, the longer your build path, the larger the section becomes.
Once I
Quoted 1 line
Quoted 1 line
had instructions to reproduce the failure here internally with a
series
Quoted 2 lines
of
Quoted 1 line
Quoted 1 line
long-named nested directories like aaaaaa and bbbbbb, Nishanth
started
Quoted 7 lines
this
Quoted 4 lines
Quoted 4 lines
thread on U-boot mailing list:
https://lists.denx.de/pipermail/u-boot/2017-March/285031.htmlWe've had the corresponding bug open internally all this time, while
adding
Quoted 1 line
Quoted 1 line
workarounds to limit .sram section size by other means, like
disabling
Quoted 2 lines
some
Quoted 1 line
Quoted 1 line
options to reduce the code size. Your patch is one of those
workarounds...
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
But we've been patiently waiting for the following feature to come
into
Quoted 5 lines
gcc to
Quoted 4 lines
Quoted 4 lines
fix the issue properly:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268Since it's now part of gcc8, we should be able to use it. Not sure
how
Quoted 4 lines
to keep
Quoted 3 lines
Quoted 1 line
gcc7 backward compatibility though...
BTW, there were few attempts to "fix" it in U-boot as well, such as
[1],
Quoted 7 lines
but I
Quoted 3 lines
don't believe they got accepted. Tom?
I think the end result was waiting on the kernel community to agree on a path forward for
Kbuildand then bring that back.Quoted 8 lines
U-Boot now supports -fmacro-prefix-map, so GCC 8 is OK. (see commit
1eb2e71ed)For GCC 7 or older, sorry, I have no idea what to do. My patch set [1] was an ugly hack,
and wrong in the first place.What I can suggest is, please use GCC 8.
Yeah I saw that but this patch is not their in 2018.01 release that TI fork is based on regardless I backported this patch to this version it did not bring the size below mark
I think it’s because we are using hardened toolchain and that enalbles extra options to enable pie and ssp since these options get added to CC they get passed into uboot straightQuoted 3 lines
I think we should just disable security flags for u boot in OE and may be uboot make system should append fno-pie fno-stack-protector to nullify these options
FWIW, as I mentioned earlier, just adding no-security flags to the recipe didn't really work. I'm open to more suggestions.
--
Denys
Quoted 173 lines · Khem Raj
Quoted 171 lines · Tom Rini
Quoted 11 lines · Khem Raj
Quoted 9 lines · On Tue, Oct 16, 2018 at 7:39 PM <[email protected]> wrote:
Hi.
Quoted 7 lines
-----Original Message-----
From: Tom Rini [mailto:[email protected]]
Sent: Wednesday, October 17, 2018 3:59 AM
To: Denys Dmytriyenko <[email protected]>; Yamada, Masahiro/山田 真弘 <[email protected]>
Cc: Khem Raj <[email protected]>; [email protected]
Subject: Re: [meta-ti] [PATCH] beaglebone.conf: temporarily usegeneric
Quoted 27 lines
Quoted 27 lines
Quoted 6 lines
am335x_evm_configfor U-bootQuoted 3 lines · Denys Dmytriyenko
Quoted 2 lines · Denys Dmytriyenko
Quoted 1 line · Khem Raj
On Tue, Oct 16, 2018 at 9:42 AM Tom Rini <[email protected]>
Quoted 3 lines · wrote:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines · Khem Raj
Quoted 1 line
On Sun, Oct 14, 2018 at 12:24 PM Denys Dmytriyenko <
Quoted 4 lines
Quoted 3 lines · wrote:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines · Khem Raj
Quoted 1 line
On Fri, Oct 12, 2018 at 8:00 PM Denys Dmytriyenko <
Quoted 3 lines
Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
There have been reports recently that
am335x_beaglebone_configQuoted 2 lines
generates bad SPL.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Until that is debugged and fixed, use generic
am335x_evm_configQuoted 4 lines
that covers all
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines
AM335x platforms, including BeagleBone variants.
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
it fails to link
| arm-yoe-linux-gnueabi-ld.bfd: u-boot-spl section
`.rodata'
Quoted 3 lines
will not
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
fit in region `.sram'
| arm-yoe-linux-gnueabi-ld.bfd: region `.sram'overflowed
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
by 5772 bytes
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
| make[2]: ***
[
/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-stagQuoted 4 lines
Quoted 4 lines
Quoted 4 lines
ing/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
spl/u-boot-spl] Error 1
FWIW, just built u-boot-ti-staging with gcc7 and gcc8
from
Quoted 5 lines
Quoted 5 lines
oe-core,
Quoted 4 lines
as well as
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
Linaro gcc7 - no problems.
My distro inherits poky policies, and on master it now
inherits
Quoted 11 lines
Quoted 11 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
hardening policies ( security flags) by defaults
do you happen to test poky ?I think we want to take a look at which of the security flags
really
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
make sense to use in this context. Thanks!
there could be more to it, since the distro uses thumb2 ISA by default, I am not sure
if u-boot overrides that and builds using arm mode ISA alwaysbut
Quoted 10 lines
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
something to consider, I saw several reports about u-boot
overflowing
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
sram sections and most of
the solutions were "oh it works for me" or at the best yourtoolchain
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
is different then mine. here is mine use it and move on.
Khem,
Well, FWIW, Tom and I are very familiar with this issue. As a
matter
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
of fact,
Quoted 1 line
Quoted 1 line
I first encountered it almost 2 years ago and had to prove
there's
Quoted 3 lines
Quoted 3 lines
such
Quoted 2 lines
an
Quoted 1 line
Quoted 1 line
issue, because everyone was saying it works for them, something
must
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
be wrong
Quoted 3 lines
Quoted 3 lines
with my OE builds... :)
While .sram region is very limited, the issue is exacerbated by
the
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
fact that
Quoted 1 line
Quoted 1 line
all debug symbols from macros like
__FILE__are ended up in thatsection
Quoted 2 lines
as
Quoted 1 line
Quoted 1 line
well. So, the longer your build path, the larger the section
becomes.
Quoted 11 lines
Quoted 11 lines
Quoted 2 lines
Once I
Quoted 1 line
Quoted 1 line
had instructions to reproduce the failure here internally with a
series
Quoted 2 lines
of
Quoted 1 line
Quoted 1 line
long-named nested directories like aaaaaa and bbbbbb, Nishanth
started
Quoted 5 lines
this
Quoted 4 lines
Quoted 4 lines
thread on U-boot mailing list:
https://lists.denx.de/pipermail/u-boot/2017-March/285031.htmlWe've had the corresponding bug open internally all this time,
while
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
adding
Quoted 1 line
Quoted 1 line
workarounds to limit .sram section size by other means, like
disabling
Quoted 2 lines
some
Quoted 1 line
Quoted 1 line
options to reduce the code size. Your patch is one of those
workarounds...
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
But we've been patiently waiting for the following feature to
come
Quoted 6 lines
Quoted 6 lines
into
Quoted 5 lines
gcc to
Quoted 4 lines
Quoted 4 lines
fix the issue properly:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268Since it's now part of gcc8, we should be able to use it. Not
sure
Quoted 4 lines
Quoted 4 lines
how
Quoted 3 lines
to keep
Quoted 2 lines
Quoted 1 line
gcc7 backward compatibility though...
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
Quoted 1 line
BTW, there were few attempts to "fix" it in U-boot as well, such as
[1],
Quoted 6 lines
but I
Quoted 3 lines
don't believe they got accepted. Tom?
I think the end result was waiting on the kernel community to agree
on a
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
path forward for
Kbuildand then bring that back.U-Boot now supports -fmacro-prefix-map, so GCC 8 is OK. (see commit
1eb2e71ed)Quoted 8 lines
Quoted 5 lines
For GCC 7 or older, sorry, I have no idea what to do. My patch set [1] was an ugly hack,
and wrong in the first place.What I can suggest is, please use GCC 8.
Yeah I saw that but this patch is not their in 2018.01 release that TI
fork
Quoted 9 lines
is based on regardless I backported this patch to this version it did not bring the size below mark
I think it’s because we are using hardened toolchain and that enalbles extra options to enable pie and ssp since these options get added to CC they get passed into uboot straightI think we should just disable security flags for u boot in OE and may be uboot make system should append fno-pie fno-stack-protector to nullify these options
Quoted 8 lines
Quoted 2 lines
OK, do you want to submit a patch for that or should I do one and just Suggested-by you? Thanks!
This would not be acceptable change since it changes how we build gcc itself secondly it does not happen for master uboot
However if this works then we need to understand why it increas e the size
Even if this change is not acceptable upstream, I would prefer it locally in meta-ti recipe, instead of disabling more features to free up 5-6KB in SPL.
Signature · 1 line
Denys
Quoted 153 lines · Denys Dmytriyenko
Quoted 151 lines · Khem Raj
Quoted 149 lines · Tom Rini
Quoted 11 lines · Khem Raj
Quoted 9 lines · On Tue, Oct 16, 2018 at 7:39 PM <[email protected]> wrote:
Hi.
Quoted 7 lines
-----Original Message-----
From: Tom Rini [mailto:[email protected]]
Sent: Wednesday, October 17, 2018 3:59 AM
To: Denys Dmytriyenko <[email protected]>; Yamada, Masahiro/山田 真弘 <[email protected]>
Cc: Khem Raj <[email protected]>; [email protected]
Subject: Re: [meta-ti] [PATCH] beaglebone.conf: temporarily usegeneric
Quoted 27 lines
Quoted 27 lines
Quoted 6 lines
am335x_evm_configfor U-bootQuoted 3 lines · Denys Dmytriyenko
Quoted 2 lines · Denys Dmytriyenko
Quoted 1 line · Khem Raj
On Tue, Oct 16, 2018 at 9:42 AM Tom Rini <[email protected]>
Quoted 3 lines · wrote:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines · Khem Raj
Quoted 1 line
On Sun, Oct 14, 2018 at 12:24 PM Denys Dmytriyenko <
Quoted 4 lines
Quoted 3 lines · wrote:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines · Khem Raj
Quoted 1 line
On Fri, Oct 12, 2018 at 8:00 PM Denys Dmytriyenko <
Quoted 3 lines
Quoted 2 lines · wrote:
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
There have been reports recently that
am335x_beaglebone_configQuoted 2 lines
generates bad SPL.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Until that is debugged and fixed, use generic
am335x_evm_configQuoted 4 lines
that covers all
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
AM335x platforms, including BeagleBone variants.
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
it fails to link
| arm-yoe-linux-gnueabi-ld.bfd: u-boot-spl section
`.rodata'
Quoted 3 lines
will not
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
fit in region `.sram'
| arm-yoe-linux-gnueabi-ld.bfd: region `.sram'overflowed
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
by 5772 bytes
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
| make[2]: ***
[
/mnt/a/yoe/build/tmp/work/beaglebone-yoe-linux-gnueabi/u-boot-ti-stagQuoted 4 lines
Quoted 4 lines
Quoted 4 lines
ing/2018.01+gitAUTOINC+2cc52408bf-r24/git/scripts/Makefile.spl:349:
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
spl/u-boot-spl] Error 1
FWIW, just built u-boot-ti-staging with gcc7 and gcc8
from
Quoted 5 lines
Quoted 5 lines
oe-core,
Quoted 4 lines
as well as
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line
Linaro gcc7 - no problems.
My distro inherits poky policies, and on master it now
inherits
Quoted 11 lines
Quoted 11 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
hardening policies ( security flags) by defaults
do you happen to test poky ?I think we want to take a look at which of the security flags
really
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
make sense to use in this context. Thanks!
there could be more to it, since the distro uses thumb2 ISA by default, I am not sure
if u-boot overrides that and builds using arm mode ISA alwaysbut
Quoted 10 lines
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
something to consider, I saw several reports about u-boot
overflowing
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
sram sections and most of
the solutions were "oh it works for me" or at the best yourtoolchain
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
is different then mine. here is mine use it and move on.
Khem,
Well, FWIW, Tom and I are very familiar with this issue. As a
matter
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
of fact,
Quoted 1 line
Quoted 1 line
I first encountered it almost 2 years ago and had to prove
there's
Quoted 3 lines
Quoted 3 lines
such
Quoted 2 lines
an
Quoted 1 line
Quoted 1 line
issue, because everyone was saying it works for them, something
must
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
be wrong
Quoted 3 lines
Quoted 3 lines
with my OE builds... :)
While .sram region is very limited, the issue is exacerbated by
the
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
fact that
Quoted 1 line
Quoted 1 line
all debug symbols from macros like
__FILE__are ended up in thatsection
Quoted 2 lines
as
Quoted 1 line
Quoted 1 line
well. So, the longer your build path, the larger the section
becomes.
Quoted 11 lines
Quoted 11 lines
Quoted 2 lines
Once I
Quoted 1 line
Quoted 1 line
had instructions to reproduce the failure here internally with a
series
Quoted 2 lines
of
Quoted 1 line
Quoted 1 line
long-named nested directories like aaaaaa and bbbbbb, Nishanth
started
Quoted 5 lines
this
Quoted 4 lines
Quoted 4 lines
thread on U-boot mailing list:
https://lists.denx.de/pipermail/u-boot/2017-March/285031.htmlWe've had the corresponding bug open internally all this time,
while
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
adding
Quoted 1 line
Quoted 1 line
workarounds to limit .sram section size by other means, like
disabling
Quoted 2 lines
some
Quoted 1 line
Quoted 1 line
options to reduce the code size. Your patch is one of those
workarounds...
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
But we've been patiently waiting for the following feature to
come
Quoted 6 lines
Quoted 6 lines
into
Quoted 5 lines
gcc to
Quoted 4 lines
Quoted 4 lines
fix the issue properly:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268Since it's now part of gcc8, we should be able to use it. Not
sure
Quoted 4 lines
Quoted 4 lines
how
Quoted 3 lines
to keep
Quoted 2 lines
Quoted 1 line
gcc7 backward compatibility though...
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
Quoted 1 line
BTW, there were few attempts to "fix" it in U-boot as well, such as
[1],
Quoted 6 lines
but I
Quoted 3 lines
don't believe they got accepted. Tom?
I think the end result was waiting on the kernel community to agree
on a
Quoted 4 lines
Quoted 4 lines
Quoted 1 line
path forward for
Kbuildand then bring that back.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
U-Boot now supports -fmacro-prefix-map, so GCC 8 is OK. (see commit
1eb2e71ed)For GCC 7 or older, sorry, I have no idea what to do.
My patch set [1] was an ugly hack,
and wrong in theEven if this change is not acceptable upstream, I would prefer it locally in
meta-ti recipe, instead of disabling more features to free up 5-6KB in SPL. first place.
Quoted 20 lines
Quoted 20 lines
Quoted 18 lines
Quoted 5 lines
Quoted 2 lines
What I can suggest is, please use GCC 8.
Yeah I saw that but this patch is not their in 2018.01 release that TI
fork
Quoted 9 lines
is based on regardless I backported this patch to this version it did not bring the size below mark
I think it’s because we are using hardened toolchain and that enalbles extra options to enable pie and ssp since these options get added to CC they get passed into uboot straightI think we should just disable security flags for u boot in OE and may be uboot make system should append fno-pie fno-stack-protector to nullify these options
OK, do you want to submit a patch for that or should I do one and just Suggested-by you? Thanks!
Quoted 7 lines
Quoted 4 lines
This would not be acceptable change since it changes how we build gcc itself secondly it does not happen for master uboot
However if this works then we need to understand why it increas e the size
Even if this change is not acceptable upstream, I would prefer it locally in meta-ti recipe, instead of disabling more features to free up 5-6KB in SPL.
this is a distro level change. meta-ti is not appropriate place to decide that
Quoted 3 lines
--
Denys
Quoted 20 lines · Khem Raj
Quoted 19 lines · Denys Dmytriyenko
Quoted 19 lines
Quoted 8 lines
Quoted 1 line
Yeah I saw that but this patch is not their in 2018.01 release that TI
fork
Quoted 6 lines
is based on regardless I backported this patch to this version it did not bring the size below mark
I think it’s because we are using hardened toolchain and that enalbles extra options to enable pie and ssp since these options get added to CC they get passed into uboot straightQuoted 6 lines
Quoted 3 lines
I think we should just disable security flags for u boot in OE and may be uboot make system should append fno-pie fno-stack-protector to nullify these options
OK, do you want to submit a patch for that or should I do one and just Suggested-by you? Thanks!
This would not be acceptable change since it changes how we build gcc itself secondly it does not happen for master uboot
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
However if this works then we need to understand why it increas e the size
Even if this change is not acceptable upstream, I would prefer it locally in meta-ti recipe, instead of disabling more features to free up 5-6KB in SPL.
this is a distro level change. meta-ti is not appropriate place to decide that
Are we talking about passing fno-pie and fno-stack-protector to U-boot build that you suggested above? That is what I'm referring here. It can be BBB specific patch. That is until we figure out why it grows code so much...
Signature · 1 line
Denys
Quoted 24 lines · Denys Dmytriyenko
Quoted 22 lines · Khem Raj
Quoted 21 lines · Denys Dmytriyenko
Quoted 20 lines
Quoted 8 lines
Quoted 1 line
Yeah I saw that but this patch is not their in 2018.01 release that TI
fork
Quoted 6 lines
is based on regardless I backported this patch to this version it did not bring the size below mark
I think it’s because we are using hardened toolchain and that enalbles extra options to enable pie and ssp since these options get added to CC they get passed into uboot straightQuoted 6 lines
Quoted 3 lines
I think we should just disable security flags for u boot in OE and may be uboot make system should append fno-pie fno-stack-protector to nullify these options
OK, do you want to submit a patch for that or should I do one and just Suggested-by you? Thanks!
Yes, that's right.
This would not be acceptable change since it changes how we build gcc itself secondly it does not happen for master ubootHowever if this works then we need to understand why it increas e the size
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines
Even if this change is not acceptable upstream, I would prefer it locally in meta-ti recipe, instead of disabling more features to free up 5-6KB in SPL.
this is a distro level change. meta-ti is not appropriate place to decide that
Are we talking about passing fno-pie and fno-stack-protector to U-boot build that you suggested above? That is what I'm referring here. It can be BBB specific patch. That is until we figure out why it grows code so much...
oh I confused it with GCCPIE
Quoted 2 lines
--
Denys