diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in index be51642918..8643dab36a 100644 --- a/boot/uboot/Config.in +++ b/boot/uboot/Config.in @@ -139,6 +139,13 @@ config BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE Path to the U-Boot configuration file. endif +config BR2_TARGET_UBOOT_NEEDS_DTC + bool "U-Boot needs dtc" + select BR2_PACKAGE_HOST_DTC + help + Select this option if your U-Boot board configuration + requires the Device Tree compiler to be available. + choice prompt "U-Boot binary format" default BR2_TARGET_UBOOT_FORMAT_BIN diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index 74940788ce..eee0dba23b 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -77,6 +77,10 @@ UBOOT_MAKE_OPTS += \ CROSS_COMPILE="$(TARGET_CROSS)" \ ARCH=$(UBOOT_ARCH) +ifeq ($(BR2_TARGET_UBOOT_NEEDS_DTC),y) +UBOOT_DEPENDENCIES += host-dtc +endif + # Helper function to fill the U-Boot config.h file. # Argument 1: option name # Argument 2: option value