uboot-mvebu: backport patch for Turris Omnia to enable LTO
[openwrt/openwrt.git] / package / boot / uboot-mvebu / patches / 0001-arm-mvebu-turris_omnia-Enable-LTO-by-default-on-Turr.patch
1 From ca4ecdce4cdcfab7df101b5df6ddad43d2f549e1 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Marek=20Beh=C3=BAn?= <kabel@kernel.org>
3 Date: Thu, 4 Apr 2024 09:50:50 +0200
4 Subject: [PATCH] arm: mvebu: turris_omnia: Enable LTO by default on Turris
5 Omnia
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 U-Boot builds for Turris Omnia are approaching the limit of 0xf0000
11 bytes, which is the size of the U-Boot partition on Omnia.
12
13 Enable LTO to get more size optimized binaries.
14
15 Signed-off-by: Marek BehĂșn <kabel@kernel.org>
16 Reviewed-by: Stefan Roese <sr@denx.de>
17 ---
18 configs/turris_omnia_defconfig | 1 +
19 1 file changed, 1 insertion(+)
20
21 --- a/configs/turris_omnia_defconfig
22 +++ b/configs/turris_omnia_defconfig
23 @@ -31,6 +31,7 @@ CONFIG_AHCI=y
24 CONFIG_OF_BOARD_FIXUP=y
25 CONFIG_SYS_MEMTEST_START=0x00800000
26 CONFIG_SYS_MEMTEST_END=0x00ffffff
27 +CONFIG_LTO=y
28 CONFIG_HAS_BOARD_SIZE_LIMIT=y
29 CONFIG_BOARD_SIZE_LIMIT=983040
30 CONFIG_FIT=y