[PATCH u-boot 38/39] ARM: enable LTO for some boards

Adam Ford aford173 at gmail.com
Sun Mar 7 17:14:07 CET 2021


On Sat, Mar 6, 2021 at 10:26 PM Marek Behún <marek.behun at nic.cz> wrote:
>
> Enable LTO for some boards that were tested by people on U-Boot Mailing
> List.
>

I have also confirmed this works on the r8a774a1_beacon board as well
and boots without issues.  The r8a774b1_beacon and r8a774e1_beacon
should be safe since the only real difference between them is the
device tree reference.

The RZ/G2 boards from Beacon don't use SPL, but wIthout LTO:
U-Boot  784324

With LTO:
U-Boot  757202

For a reduction of:
-27122 (-3.46%)

> Signed-off-by: Marek Behún <marek.behun at nic.cz>
> Tested-by: Adam Ford <aford173 at gmail.com>
> Tested-by: Pali Rohár <pali at kernel.org>
> ---
>  configs/da850evm_defconfig            | 1 +
>  configs/da850evm_direct_nor_defconfig | 1 +
>  configs/da850evm_nand_defconfig       | 1 +
>  configs/imx6q_logic_defconfig         | 1 +
>  configs/imx8mn_beacon_2g_defconfig    | 1 +
>  configs/imx8mn_beacon_defconfig       | 1 +
>  configs/nokia_rx51_defconfig          | 1 +
>  configs/turris_mox_defconfig          | 1 +
>  configs/turris_omnia_defconfig        | 1 +
>  9 files changed, 9 insertions(+)
>
> diff --git a/configs/da850evm_defconfig b/configs/da850evm_defconfig
> index 26e76a2929..6ff5e21bc6 100644
> --- a/configs/da850evm_defconfig
> +++ b/configs/da850evm_defconfig
> @@ -1,3 +1,4 @@
> +CONFIG_LTO=y
>  CONFIG_ARM=y
>  CONFIG_SYS_THUMB_BUILD=y
>  CONFIG_ARCH_DAVINCI=y
> diff --git a/configs/da850evm_direct_nor_defconfig b/configs/da850evm_direct_nor_defconfig
> index d3860a963d..06c7ce7c47 100644
> --- a/configs/da850evm_direct_nor_defconfig
> +++ b/configs/da850evm_direct_nor_defconfig
> @@ -1,3 +1,4 @@
> +CONFIG_LTO=y
>  CONFIG_ARM=y
>  CONFIG_ARCH_CPU_INIT=y
>  CONFIG_ARCH_DAVINCI=y
> diff --git a/configs/da850evm_nand_defconfig b/configs/da850evm_nand_defconfig
> index 0d0e9a148d..be737564e1 100644
> --- a/configs/da850evm_nand_defconfig
> +++ b/configs/da850evm_nand_defconfig
> @@ -1,3 +1,4 @@
> +CONFIG_LTO=y
>  CONFIG_ARM=y
>  CONFIG_SYS_THUMB_BUILD=y
>  CONFIG_ARCH_DAVINCI=y
> diff --git a/configs/imx6q_logic_defconfig b/configs/imx6q_logic_defconfig
> index 36dc24d080..0f8aea6983 100644
> --- a/configs/imx6q_logic_defconfig
> +++ b/configs/imx6q_logic_defconfig
> @@ -1,3 +1,4 @@
> +CONFIG_LTO=y
>  CONFIG_ARM=y
>  CONFIG_ARCH_MX6=y
>  CONFIG_SYS_TEXT_BASE=0x17800000
> diff --git a/configs/imx8mn_beacon_2g_defconfig b/configs/imx8mn_beacon_2g_defconfig
> index 58b8e49486..1c8cbc2c89 100644
> --- a/configs/imx8mn_beacon_2g_defconfig
> +++ b/configs/imx8mn_beacon_2g_defconfig
> @@ -1,3 +1,4 @@
> +CONFIG_LTO=y
>  CONFIG_ARM=y
>  CONFIG_ARCH_IMX8M=y
>  CONFIG_SYS_TEXT_BASE=0x40200000
> diff --git a/configs/imx8mn_beacon_defconfig b/configs/imx8mn_beacon_defconfig
> index d6a3385d8d..6457b9409a 100644
> --- a/configs/imx8mn_beacon_defconfig
> +++ b/configs/imx8mn_beacon_defconfig
> @@ -1,3 +1,4 @@
> +CONFIG_LTO=y
>  CONFIG_ARM=y
>  CONFIG_ARCH_IMX8M=y
>  CONFIG_SYS_TEXT_BASE=0x40200000
> diff --git a/configs/nokia_rx51_defconfig b/configs/nokia_rx51_defconfig
> index 312ca3a1a9..85ca627790 100644
> --- a/configs/nokia_rx51_defconfig
> +++ b/configs/nokia_rx51_defconfig
> @@ -1,3 +1,4 @@
> +CONFIG_LTO=y
>  CONFIG_ARM=y
>  # CONFIG_SYS_THUMB_BUILD is not set
>  CONFIG_ARCH_OMAP2PLUS=y
> diff --git a/configs/turris_mox_defconfig b/configs/turris_mox_defconfig
> index f938fbb475..2a351d9180 100644
> --- a/configs/turris_mox_defconfig
> +++ b/configs/turris_mox_defconfig
> @@ -1,3 +1,4 @@
> +CONFIG_LTO=y
>  CONFIG_ARM=y
>  CONFIG_ARCH_CPU_INIT=y
>  CONFIG_ARCH_MVEBU=y
> diff --git a/configs/turris_omnia_defconfig b/configs/turris_omnia_defconfig
> index 4b8843d7be..d7a2ec3592 100644
> --- a/configs/turris_omnia_defconfig
> +++ b/configs/turris_omnia_defconfig
> @@ -1,3 +1,4 @@
> +CONFIG_LTO=y
>  CONFIG_ARM=y
>  CONFIG_ARCH_CPU_INIT=y
>  CONFIG_SPL_SYS_THUMB_BUILD=y
> --
> 2.26.2
>


More information about the U-Boot mailing list