[Buildroot] [PATCH 1/1] configs/imx8{m, mm}pico: disable ATF SSP

Baruch Siach baruch at tkos.co.il
Thu Oct 27 15:21:03 UTC 2022


Hi Fabio,

On Thu, Oct 27 2022, Fabio Estevam wrote:
> On Sat, Oct 22, 2022 at 11:21 AM Julien Olivain <ju.o at free.fr> wrote:
>>
>> imx8{m,mm}pico configs are currently failing at ATF link with output:
>>
>>     aarch64-buildroot-linux-gnu-ld: asm_stack_protector.o: in function `update_stack_protector_canary':
>>     (.text.asm.update_stack_protector_canary+0x4): undefined reference to `plat_get_stack_protector_canary'
>>
>> The ATF version in those configs does not provide platform level
>> support for SSP.
>>
>> This build failure was introduced by commit
>> 09acc7cbc91f50305730ca0690a58fb93529034b
>> "boot/arm-trusted-firmware: fix SSP support". Before this commit,
>> ATF SSP was globally disabled, by default.
>>
>> This commit fixes those build issues by disabling the ATF SSP in the
>> defconfigs.
>>
>> Fixes:
>>   - https://gitlab.com/buildroot.org/buildroot/-/jobs/3200498119
>>   - https://gitlab.com/buildroot.org/buildroot/-/jobs/3200498120
>>
>> Signed-off-by: Julien Olivain <ju.o at free.fr>
>
> I met the same build error when trying to build kontron_bl_imx8mm_defconfig.
>
> Tried your suggestion and it fixes the build error:
>
> diff --git a/configs/kontron_bl_imx8mm_defconfig
> b/configs/kontron_bl_imx8mm_defconfig
> index ff376662e9e5..b05828981081 100644
> --- a/configs/kontron_bl_imx8mm_defconfig
> +++ b/configs/kontron_bl_imx8mm_defconfig
> @@ -34,6 +34,7 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
>  BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.6"
>  BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mm"
>  BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y
> +# BR2_TARGET_ARM_TRUSTED_FIRMWARE_SSP is not set
>  BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="IMX_BOOT_UART_BASE=0x30880000"
>  BR2_TARGET_UBOOT=y
>  BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
>
> Does this need to be fixed globally? I suspect other defconfigs face
> the same error.

The global fix might be this:

diff --git a/boot/arm-trusted-firmware/Config.in b/boot/arm-trusted-firmware/Config.in
index 5070849d9b43..a9b9bbcc5a1f 100644
--- a/boot/arm-trusted-firmware/Config.in
+++ b/boot/arm-trusted-firmware/Config.in
@@ -212,7 +212,6 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN
 
 config BR2_TARGET_ARM_TRUSTED_FIRMWARE_SSP
 	bool "Build with SSP"
-	default y
 	depends on BR2_TOOLCHAIN_HAS_SSP
 	depends on !BR2_SSP_NONE
 	help

Commit cf176128ec4 ("boot/arm-trusted-firmware: add SSP option")
mentions that not all platform implement the require hook for SSP. So I
think that enabling SSP by default is not the right choice.

baruch

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -



More information about the buildroot mailing list