All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] configs/imx8{m,mm}pico: disable ATF SSP
@ 2022-10-22 14:20 Julien Olivain
  2022-10-27 14:22 ` [Buildroot] [PATCH 1/1] configs/imx8{m, mm}pico: " Fabio Estevam
  0 siblings, 1 reply; 6+ messages in thread
From: Julien Olivain @ 2022-10-22 14:20 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain

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@free.fr>
---
 configs/imx8mmpico_defconfig | 1 +
 configs/imx8mpico_defconfig  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/configs/imx8mmpico_defconfig b/configs/imx8mmpico_defconfig
index 7c19c8c81b..55fd2d01c1 100644
--- a/configs/imx8mmpico_defconfig
+++ b/configs/imx8mmpico_defconfig
@@ -22,6 +22,7 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://source.codeaurora.org/e
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="lf-5.10.72-2.2.0"
 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_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
 BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
diff --git a/configs/imx8mpico_defconfig b/configs/imx8mpico_defconfig
index 55746fb67e..d7e5b6273a 100644
--- a/configs/imx8mpico_defconfig
+++ b/configs/imx8mpico_defconfig
@@ -22,6 +22,7 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://source.codeaurora.org/e
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="lf-5.10.72-2.2.0"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mq"
 BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y
+# BR2_TARGET_ARM_TRUSTED_FIRMWARE_SSP is not set
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
 BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
-- 
2.38.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH 1/1] configs/imx8{m, mm}pico: disable ATF SSP
  2022-10-22 14:20 [Buildroot] [PATCH 1/1] configs/imx8{m,mm}pico: disable ATF SSP Julien Olivain
@ 2022-10-27 14:22 ` Fabio Estevam
  2022-10-27 14:33   ` Heiko Thiery
  2022-10-27 15:21   ` Baruch Siach via buildroot
  0 siblings, 2 replies; 6+ messages in thread
From: Fabio Estevam @ 2022-10-27 14:22 UTC (permalink / raw)
  To: Julien Olivain; +Cc: Heiko Thiery, buildroot

Hi Julien,

On Sat, Oct 22, 2022 at 11:21 AM Julien Olivain <ju.o@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@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.

Thanks
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH 1/1] configs/imx8{m, mm}pico: disable ATF SSP
  2022-10-27 14:22 ` [Buildroot] [PATCH 1/1] configs/imx8{m, mm}pico: " Fabio Estevam
@ 2022-10-27 14:33   ` Heiko Thiery
  2022-10-27 15:21   ` Baruch Siach via buildroot
  1 sibling, 0 replies; 6+ messages in thread
From: Heiko Thiery @ 2022-10-27 14:33 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Julien Olivain, buildroot

Hi,

Am Do., 27. Okt. 2022 um 16:22 Uhr schrieb Fabio Estevam <festevam@gmail.com>:
>
> Hi Julien,
>
> On Sat, Oct 22, 2022 at 11:21 AM Julien Olivain <ju.o@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@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.

I see the same issue with the kontron_pitx_imx8m_defconfig.

-- 
Heiko

>
> Thanks
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH 1/1] configs/imx8{m, mm}pico: disable ATF SSP
  2022-10-27 14:22 ` [Buildroot] [PATCH 1/1] configs/imx8{m, mm}pico: " Fabio Estevam
  2022-10-27 14:33   ` Heiko Thiery
@ 2022-10-27 15:21   ` Baruch Siach via buildroot
  2022-10-28  3:03     ` Fabio Estevam
  1 sibling, 1 reply; 6+ messages in thread
From: Baruch Siach via buildroot @ 2022-10-27 15:21 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Julien Olivain, Heiko Thiery, Sergey Matyukevich, buildroot

Hi Fabio,

On Thu, Oct 27 2022, Fabio Estevam wrote:
> On Sat, Oct 22, 2022 at 11:21 AM Julien Olivain <ju.o@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@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@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH 1/1] configs/imx8{m, mm}pico: disable ATF SSP
  2022-10-27 15:21   ` Baruch Siach via buildroot
@ 2022-10-28  3:03     ` Fabio Estevam
  2022-10-28  4:59       ` Heiko Thiery
  0 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2022-10-28  3:03 UTC (permalink / raw)
  To: Baruch Siach; +Cc: Julien Olivain, Heiko Thiery, Sergey Matyukevich, buildroot

Hi Baruch,

On Thu, Oct 27, 2022 at 12:24 PM Baruch Siach <baruch@tkos.co.il> wrote:

> 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.

Yes, that is a proper fix.

Thanks
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH 1/1] configs/imx8{m, mm}pico: disable ATF SSP
  2022-10-28  3:03     ` Fabio Estevam
@ 2022-10-28  4:59       ` Heiko Thiery
  0 siblings, 0 replies; 6+ messages in thread
From: Heiko Thiery @ 2022-10-28  4:59 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Julien Olivain, Sergey Matyukevich, buildroot

Hi,

Am Fr., 28. Okt. 2022 um 05:04 Uhr schrieb Fabio Estevam <festevam@gmail.com>:
>
> Hi Baruch,
>
> On Thu, Oct 27, 2022 at 12:24 PM Baruch Siach <baruch@tkos.co.il> wrote:
>
> > 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.
>
> Yes, that is a proper fix.
>
> Thanks

I can also confirm that it works again with the change.

-- 
Heiko
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-10-28  4:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-22 14:20 [Buildroot] [PATCH 1/1] configs/imx8{m,mm}pico: disable ATF SSP Julien Olivain
2022-10-27 14:22 ` [Buildroot] [PATCH 1/1] configs/imx8{m, mm}pico: " Fabio Estevam
2022-10-27 14:33   ` Heiko Thiery
2022-10-27 15:21   ` Baruch Siach via buildroot
2022-10-28  3:03     ` Fabio Estevam
2022-10-28  4:59       ` Heiko Thiery

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.