boot/arm-trusted-firmware: add optional host-dtc dependency
PATCH 1/1 boot/arm-trusted-firmware: add optional host-dtc dependency
Some ATF configurations, such as the ones for the STM32MP1 processor family, require DTC during the build as Device Tree files are used. Without dtc, the build fails:
/bin/sh: 1: dtc: not found
dtc version too old (), you need at least version 1.4.4 plat/st/stm32mp1/platform.mk:239: recipe for target 'check_dtc_version' failed make[1]: *** [check_dtc_version] Error 1
To solve this, this commit implements a BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC option, in a way that mimics the BR2_TARGET_UBOOT_NEEDS_DTC option we already have for the U-Boot package.
--- boot/arm-trusted-firmware/Config.in | 7 +++++++ boot/arm-trusted-firmware/arm-trusted-firmware.mk | 4 ++++ 2 files changed, 11 insertions(+)
boot/arm-trusted-firmware/Config.in +7 -0
@@ -160,4 +160,11 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES Names of generated image files that are installed in the output images/ directory. +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC + bool "Needs dtc" + select BR2_PACKAGE_HOST_DTC + help + Select this option if your ATF board configuration + requires the Device Tree compiler to be available. + endif
boot/arm-trusted-firmware/arm-trusted-firmware.mk +4 -0
@@ -29,6 +29,10 @@ endif ARM_TRUSTED_FIRMWARE_INSTALL_IMAGES = YES +ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC),y) +ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-dtc +endif + ARM_TRUSTED_FIRMWARE_PLATFORM = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM)) ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_DEBUG),y)
Signature · 1 line
2.25.1
Yann E. MORIN
AppliedPATCH 1/1 boot/arm-trusted-firmware: add optional host-dtc dependency
Thomas, All,
On 2020-03-18 21:50 +0100, Thomas Petazzoni spake thusly:
Quoted 9 lines
Some ATF configurations, such as the ones for the STM32MP1 processor family, require DTC during the build as Device Tree files are used. Without dtc, the build fails:
/bin/sh: 1: dtc: not found
dtc version too old (), you need at least version 1.4.4plat/st/stm32mp1/platform.mk:239: recipe for target 'check_dtc_version' failed make[1]: *** [check_dtc_version] Error 1
Quoted 6 lines
To solve this, this commit implements a
BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTCoption, in a way that mimics theBR2_TARGET_UBOOT_NEEDS_DTCoption we already have for the U-Boot package.Signed-off-by Thomas Petazzoni <[email protected]>
Applied to master, thanks.
As discused on IRC, if this trend continues, we could/should switch to depending on the host package if it is enabled, rather than add yet more such _NEEDS_STUFF options...
Regards,
Yann E. MORIN.
Quoted 43 lines
--- boot/arm-trusted-firmware/Config.in | 7 +++++++ boot/arm-trusted-firmware/arm-trusted-firmware.mk | 4 ++++ 2 files changed, 11 insertions(+)boot/arm-trusted-firmware/Config.in +7
-0@@ -160,4 +160,11 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES Names of generated image files that are installed in the output images/ directory. +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC + bool "Needs dtc" + select BR2_PACKAGE_HOST_DTC + help + Select this option if your ATF board configuration + requires the Device Tree compiler to be available. + endifboot/arm-trusted-firmware/arm-trusted-firmware.mk +4
-0@@ -29,6 +29,10 @@ endif ARM_TRUSTED_FIRMWARE_INSTALL_IMAGES = YES +ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC),y) +ARM_TRUSTED_FIRMWARE_DEPENDENCIES += host-dtc +endif + ARM_TRUSTED_FIRMWARE_PLATFORM = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM)) ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_DEBUG),y)Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 boot/arm-trusted-firmware: add optional host-dtc dependency
In reply to Thomas PetazzoniQuoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Some ATF configurations, such as the ones for the STM32MP1 processor family, require DTC during the build as Device Tree files are used. Without dtc, the build fails:
/bin/sh: 1: dtc: not found
dtc version too old (), you need at least version 1.4.4plat/st/stm32mp1/platform.mk:239: recipe for target 'check_dtc_version' failed make[1]: *** [check_dtc_version] Error 1
Quoted 6 lines
To solve this, this commit implements a
BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTCoption, in a way that mimics theBR2_TARGET_UBOOT_NEEDS_DTCoption we already have for the U-Boot package.Signed-off-by Thomas Petazzoni <[email protected]>
It isn't really technically a bugfix, but it seems quite low risk and useful for the affected people, so committed to 2020.02.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard