arm: mvebu: turris_omnia: Use thumb instructions in SPL to save space
PATCH 1/1 arm: mvebu: turris_omnia: Use thumb instructions in SPL to save space
With the latest changes to the drivers (SPI_FLASH_SPANSION etc), Travis reports that the SPL image is too big. Let's use the thumb instructions in SPL to save some space and make the image fit again.
--- configs/turris_omnia_defconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
configs/turris_omnia_defconfig +3 -2
@@ -1,4 +1,5 @@ CONFIG_ARM=y +CONFIG_SPL_SYS_THUMB_BUILD=y CONFIG_ARCH_MVEBU=y CONFIG_SYS_TEXT_BASE=0x00800000 CONFIG_SPL_LIBCOMMON_SUPPORT=y
@@ -7,13 +8,13 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_TURRIS_OMNIA=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL=y +CONFIG_NR_DRAM_BANKS=2 CONFIG_DEBUG_UART_BASE=0xd0012000 CONFIG_DEBUG_UART_CLOCK=250000000 CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI_SUPPORT=y CONFIG_DEBUG_UART=y CONFIG_DISTRO_DEFAULTS=y -CONFIG_NR_DRAM_BANKS=2 CONFIG_BOOTDELAY=3 CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_MISC_INIT_R=y
@@ -40,9 +41,9 @@ CONFIG_ENV_SPI_MAX_HZ=50000000 CONFIG_SPL_OF_TRANSLATE=y CONFIG_SCSI_AHCI=y CONFIG_ATSHA204A=y +CONFIG_DM_MMC=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_MV=y -CONFIG_DM_MMC=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_SPANSION=y CONFIG_PHY_MARVELL=y
Signature · 1 line
2.21.0
PATCH 1/1 arm: mvebu: turris_omnia: Use thumb instructions in SPL to save space
Stefan,
thanks for this. My workaround for this was to increase CONFIG_SPL_SIZE from 140 KiB to 160 KiB, in include/configs/turris_omnia.h.
But yours works as well. Perhaps we should do both if the image increases in the future...
Quoted 47 lines · On Thu, 25 Apr 2019 07:32:12 +0200 Stefan Roese <[email protected]> wrote:
With the latest changes to the drivers (
SPI_FLASH_SPANSIONetc), Travis reports that the SPL image is too big. Let's use the thumb instructions in SPL to save some space and make the image fit again.Signed-off-by Stefan Roese <[email protected]>Cc Baruch Siach <[email protected]>Cc Marek Behun <[email protected]>--- configs/turris_omnia_defconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)(quoted diff) +0
-0b/configs/turris_omnia_defconfig index
5ef3548647..a528a9b5bc100644configs/turris_omnia_defconfig +3
-2@@ -1,4 +1,5 @@ CONFIG_ARM=y +CONFIG_SPL_SYS_THUMB_BUILD=y CONFIG_ARCH_MVEBU=y CONFIG_SYS_TEXT_BASE=0x00800000 CONFIG_SPL_LIBCOMMON_SUPPORT=y@@ -7,13 +8,13 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_TURRIS_OMNIA=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL=y +CONFIG_NR_DRAM_BANKS=2 CONFIG_DEBUG_UART_BASE=0xd0012000 CONFIG_DEBUG_UART_CLOCK=250000000 CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI_SUPPORT=y CONFIG_DEBUG_UART=y CONFIG_DISTRO_DEFAULTS=y -CONFIG_NR_DRAM_BANKS=2 CONFIG_BOOTDELAY=3 CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_MISC_INIT_R=y@@ -40,9 +41,9 @@ CONFIG_ENV_SPI_MAX_HZ=50000000 CONFIG_SPL_OF_TRANSLATE=y CONFIG_SCSI_AHCI=y CONFIG_ATSHA204A=y +CONFIG_DM_MMC=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_MV=y -CONFIG_DM_MMC=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_SPANSION=y CONFIG_PHY_MARVELL=y
PATCH 1/1 arm: mvebu: turris_omnia: Use thumb instructions in SPL to save space
Hi Marek,
Quoted 9 lines · Marek Behún
Stefan,
thanks for this. My workaround for this was to increase
CONFIG_SPL_SIZEfrom 140 KiB to 160 KiB, ininclude/configs/turris_omnia.h.
But yours works as well. Perhaps we should do both if the image increases in the future...Reviewed-by Marek Behún <[email protected]>
Thanks. I would prefer to stay with this patch for now. Its shrinking effect is quite good (we're at 110994 for the SPL right now). And this is the patch that I have queued for the upcoming Marvell pull request.
Thanks,
Stefan
PATCH 1/1 arm: mvebu: turris_omnia: Use thumb instructions in SPL to save space
In reply to Stefan RoeseQuoted 7 lines · Stefan Roese
With the latest changes to the drivers (
SPI_FLASH_SPANSIONetc), Travis reports that the SPL image is too big. Let's use the thumb instructions in SPL to save some space and make the image fit again.Signed-off-by Stefan Roese <[email protected]>Cc Baruch Siach <[email protected]>Cc Marek Behun <[email protected]>
Applied to u-boot-marvell/master.
Thanks,
Stefan