configs: sama5d2: enable CONFIG_LTO
PATCH 1/1 configs: sama5d2: enable CONFIG_LTO
arm-none-linux-gnueabihf-ld.bfd: u-boot-spl section __u_boot_list' will not fit in region .sram' arm-none-linux-gnueabihf-ld.bfd: region `.sram' overflowed by 100 bytes
SPL is at limit so to stop seeing above error in built, enable link time optimizations CONFIG_LTO.
---
Hello Mihai,
Can you please test also this patch, that sama5d2_xplained boots correctly ?
With the current tree, sama5d2_xplained configs no longer build as the SPL is overflown.
Thanks !
Eugen
configs/sama5d2_xplained_emmc_defconfig | 1 + configs/sama5d2_xplained_mmc_defconfig | 1 + configs/sama5d2_xplained_qspiflash_defconfig | 1 + configs/sama5d2_xplained_spiflash_defconfig | 1 + 4 files changed, 4 insertions(+)
configs/sama5d2_xplained_emmc_defconfig +1 -0
@@ -28,6 +28,7 @@ CONFIG_SPL_FS_FAT=y CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_SYS_LOAD_ADDR=0x22000000 CONFIG_DEBUG_UART=y +CONFIG_LTO=y CONFIG_ENV_VARS_UBOOT_CONFIG=y CONFIG_FIT=y CONFIG_SD_BOOT=y
configs/sama5d2_xplained_mmc_defconfig +1 -0
@@ -29,6 +29,7 @@ CONFIG_SPL_FS_FAT=y CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_SYS_LOAD_ADDR=0x22000000 CONFIG_DEBUG_UART=y +CONFIG_LTO=y CONFIG_ENV_VARS_UBOOT_CONFIG=y CONFIG_FIT=y CONFIG_SD_BOOT=y
configs/sama5d2_xplained_qspiflash_defconfig +1 -0
@@ -29,6 +29,7 @@ CONFIG_SPL_FS_FAT=y CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_SYS_LOAD_ADDR=0x22000000 CONFIG_DEBUG_UART=y +CONFIG_LTO=y CONFIG_ENV_VARS_UBOOT_CONFIG=y CONFIG_FIT=y CONFIG_QSPI_BOOT=y
configs/sama5d2_xplained_spiflash_defconfig +1 -0
@@ -31,6 +31,7 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI=y CONFIG_SYS_LOAD_ADDR=0x22000000 CONFIG_DEBUG_UART=y +CONFIG_LTO=y CONFIG_ENV_VARS_UBOOT_CONFIG=y CONFIG_FIT=y CONFIG_SPI_BOOT=y
Signature · 1 line
2.34.1
Hello Eugen,
I have successfully tested the binary on sama5d2_xplained board. Board is booting OK the zImage from fat (eMMC).
Best regards,
Mihai Sain
-----Original Message-----
From: Eugen Hristev <[email protected]>
Sent: Monday, July 24, 2023 1:08 PM
To: [email protected]; Mihai Sain - M19926 <[email protected]>
Cc: Eugen Hristev <[email protected]>
Subject: [PATCH] configs: sama5d2: enable CONFIG_LTO
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
arm-none-linux-gnueabihf-ld.bfd: u-boot-spl section __u_boot_list' will not fit in region .sram' arm-none-linux-gnueabihf-ld.bfd: region `.sram' overflowed by 100 bytes
SPL is at limit so to stop seeing above error in built, enable link time optimizations CONFIG_LTO.
---
Hello Mihai,
Can you please test also this patch, that sama5d2_xplained boots correctly ?
With the current tree, sama5d2_xplained configs no longer build as the SPL is overflown.
Thanks !
Eugen
configs/sama5d2_xplained_emmc_defconfig | 1 + configs/sama5d2_xplained_mmc_defconfig | 1 + configs/sama5d2_xplained_qspiflash_defconfig | 1 + configs/sama5d2_xplained_spiflash_defconfig | 1 + 4 files changed, 4 insertions(+)
configs/sama5d2_xplained_emmc_defconfig +1 -0
@@ -28,6 +28,7 @@ CONFIG_SPL_FS_FAT=y CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_SYS_LOAD_ADDR=0x22000000 CONFIG_DEBUG_UART=y +CONFIG_LTO=y CONFIG_ENV_VARS_UBOOT_CONFIG=y CONFIG_FIT=y CONFIG_SD_BOOT=y
configs/sama5d2_xplained_mmc_defconfig +1 -0
@@ -29,6 +29,7 @@ CONFIG_SPL_FS_FAT=y CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_SYS_LOAD_ADDR=0x22000000 CONFIG_DEBUG_UART=y +CONFIG_LTO=y CONFIG_ENV_VARS_UBOOT_CONFIG=y CONFIG_FIT=y CONFIG_SD_BOOT=y
configs/sama5d2_xplained_qspiflash_defconfig +1 -0
@@ -29,6 +29,7 @@ CONFIG_SPL_FS_FAT=y CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_SYS_LOAD_ADDR=0x22000000 CONFIG_DEBUG_UART=y +CONFIG_LTO=y CONFIG_ENV_VARS_UBOOT_CONFIG=y CONFIG_FIT=y CONFIG_QSPI_BOOT=y
configs/sama5d2_xplained_spiflash_defconfig +1 -1
@@ -31,6 +31,7 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI=y CONFIG_SYS_LOAD_ADDR=0x22000000 CONFIG_DEBUG_UART=y +CONFIG_LTO=y CONFIG_ENV_VARS_UBOOT_CONFIG=y CONFIG_FIT=y CONFIG_SPI_BOOT=y --
2.34.1
Quoted 1 line · On 7/24/23 13:29, [email protected] wrote:
Tested-by Mihai Sain<[email protected]>
Applied to u-boot-at91/master, thanks !
Quoted 9 lines · On 7/24/23 13:29, [email protected] wrote:
Hello Eugen,
I have successfully tested the binary on
sama5d2_xplainedboard. Board is booting OK the zImage from fat (eMMC).Tested-by Mihai Sain <[email protected]>Best regards,
Mihai Sain
Thank you for testing,
applied to u-boot-at91/master