使用 Arm Trusted Firmware-v2.2 为 Avenger96 开发板构建错误

Build errors for Avenger96 board with Arm Trusted Firmware-v2.2

我正在使用 Buildroot 作为构建系统为 Avenger96 开发板构建 Linux 图像。

我正在做的步骤:

  1. 制作avenger96_defconfig
  2. 制作

我遇到以下错误:

/usr/bin/make -j1 O=/buildroot/output HOSTCC="/usr/bin/gcc" HOSTCXX="/usr/bin/g++"        syncconfig
make[1]: Entering directory '/buildroot'
make[1]: Leaving directory '/buildroot'
>>> arm-trusted-firmware v2.2 Building
PATH="/buildroot/output/host/bin:/buildroot/output/host/sbin:/usr/local/sbin:/usr/local                     /bin:/usr/sbin:/usr/bin:/sbin:/bin" ENABLE_STACK_PROTECTOR=0 /usr/bin/make -j9 -C /buildroot/output/build/arm-trusted-firmware-v2.2 DEBUG=1 CROSS_COMPILE="/buildroot/output     /host/bin/arm-buildroot-linux-uclibcgnueabihf-" STM32MP_SDMMC=1 AARCH32_SP=sp_min     DTB_FILE_NAME=stm32mp157a-avenger96.dtb PLAT=stm32mp1 ARM_ARCH_MAJOR=7 ARCH=aarch32 all
make[1]: Entering directory '/buildroot/output/build/arm-trusted-firmware-v2.2'
Including bl32/sp_min/sp_min.mk
make[2]: Nothing to be done for 'all'.
Building stm32mp1
  LD      build/stm32mp1/debug/bl2/bl2.elf
  LD      build/stm32mp1/debug/bl32/bl32.elf
/buildroot/output/host/bin/arm-buildroot-linux-uclibcgnueabihf-ld: ./build/stm32mp1     /debug/bl32/psci_off.o: in function `psci_do_cpu_off':
/buildroot/output/host/bin/arm-buildroot-linux-uclibcgnueabihf-ld: /buildroot/output   /build/arm-trusted-firmware-v2.2/lib/psci/psci_off.c:181: undefined reference to    `__stack_chk_fail'
/buildroot/output/host/bin/arm-buildroot-linux-uclibcgnueabihf-ld: /buildroot/output/build/arm-trusted-firmware-v2.2/lib/psci/psci_off.c:181: undefined reference to `__stack_chk_guard'
/buildroot/output/host/bin/arm-buildroot-linux-uclibcgnueabihf-ld: ./build/stm32mp1  /debug/bl2/stm32_hash.o./build/stm32mp1/debug/bl32/psci_suspend.o: in function `: in    function `psci_cpu_suspend_start':
stm32_hash_update/buildroot/output/build/arm-trusted-firmware-v2.2/lib   /psci/psci_suspend.c:':
272: undefined reference to `__stack_chk_fail'
/buildroot/output/host/bin/arm-buildroot-linux-uclibcgnueabihf-ld/buildroot/output   /build/arm-trusted-firmware-v2.2/drivers/st/crypto/stm32_hash.c:: 236: undefined reference   to `/buildroot/output/build/arm-trusted-firmware-v2.2/lib  /psci/psci_suspend.c:__stack_chk_fail'
272: undefined reference to `/buildroot/output/host/bin/arm-buildroot-linux-uclibcgnueabihf-ld: __stack_chk_guard/buildroot/output/build/arm-trusted-firmware-v2.2/drivers/st/crypto/stm32_hash.c:'
236: undefined reference to `__stack_chk_guard'
/buildroot/output/host/bin/arm-buildroot-linux-uclibcgnueabihf-ld: ./build/stm32mp1    /debug/bl2/stm32_hash.o: in function `stm32_hash_final':
 /buildroot/output/build/arm-trusted-firmware-v2.2/drivers/st/crypto/stm32_hash.c:263:    undefined reference to `__stack_chk_fail'
/buildroot/output/host/bin/arm-buildroot-linux-uclibcgnueabihf-ld: /buildroot/output  /build   /arm-trusted-firmware-v2.2/drivers/st/crypto/stm32_hash.c:263: undefined reference   to   `__stack_chk_guard'
/buildroot/output/host/bin/arm-buildroot-linux-uclibcgnueabihf-ld: ./build/stm32mp1    /debug/bl2/stm32_hash.o: in function `stm32_hash_register':
 /buildroot/output/build/arm-trusted-firmware-v2.2/drivers/st/crypto/stm32_hash.c:330:   undefined reference to `__stack_chk_fail'
 /buildroot/output/host/bin/arm-buildroot-linux-uclibcgnueabihf-ld: /buildroot/output/build/arm-trusted-firmware-v2.2/drivers/st/crypto/stm32_hash.c:330: undefined reference to `__stack_chk_guard'
 /buildroot/output/host/bin/arm-buildroot-linux-uclibcgnueabihf-ld: /buildroot/output   /host/bin/arm-buildroot-linux-uclibcgnueabihf-ld: ./build/stm32mp1/debug    /bl2/io_stm32image.o: in function `stm32image_partition_size':
 /buildroot/output/build/arm-trusted-firmware-v2.2/drivers/st/io/io_stm32image.c:243: undefined reference to `__stack_chk_fail'
/buildroot/output/host/bin/arm-buildroot-linux-uclibcgnueabihf-ld: /buildroot/output   /build/arm-trusted-firmware-v2.2/drivers/st/io/io_stm32image.c:243: undefined reference to `__stack_chk_guard'
 /buildroot/output/host/bin/arm-buildroot-linux-uclibcgnueabihf-ld: ./build/stm32mp1/debug/bl2/io_stm32image.o: in function `stm32image_partition_read':
 /buildroot/output/build/arm-trusted-firmware-v2.2/drivers/st/io/io_stm32image.c:354:  undefined reference to `__stack_chk_fail'

还有更多

我附上了完整的日志文件。我不理解这些“未定义引用”问题的原因。有人可以告诉我如何解决这个问题吗?

提前致谢!

P.S: 我正在使用 Ubuntu 20.04

ATF log_1 ATF log_2 ATF log_3

这已由包含在 2021.11 版本(即发布此问题时的最新版本)中的 Buildroot 提交 ccac9a5bbbd7374187a0f0017101ece0c202851d 修复。