]> git.ipfire.org Git - thirdparty/u-boot.git/blobdiff - tools/Makefile
configs: Disable now unbuildable SPI options for boards
[thirdparty/u-boot.git] / tools / Makefile
index 8143c25666018c056d187e0ea1f27b643e0eb434..33e90a8025a738945c4906e3ea725e8db9381dc3 100644 (file)
@@ -1,9 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0+
 #
 # (C) Copyright 2000-2006
 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
 
 # Enable all the config-independent tools
 ifneq ($(HOST_TOOLS_ALL),)
@@ -60,6 +58,7 @@ hostprogs-$(CONFIG_FIT_SIGNATURE) += fit_info fit_check_sign
 
 hostprogs-$(CONFIG_CMD_BOOTEFI_SELFTEST) += file2include
 
+FIT_OBJS-$(CONFIG_FIT) := fit_common.o fit_image.o image-host.o common/image-fit.o
 FIT_SIG_OBJS-$(CONFIG_FIT_SIGNATURE) := common/image-sig.o
 
 # The following files are synced with upstream DTC.
@@ -82,19 +81,18 @@ ROCKCHIP_OBS = lib/rc4.o rkcommon.o rkimage.o rksd.o rkspi.o
 # common objs for dumpimage and mkimage
 dumpimage-mkimage-objs := aisimage.o \
                        atmelimage.o \
+                       $(FIT_OBJS-y) \
                        $(FIT_SIG_OBJS-y) \
                        common/bootm.o \
                        lib/crc32.o \
                        default_image.o \
                        lib/fdtdec_common.o \
                        lib/fdtdec.o \
-                       fit_common.o \
-                       fit_image.o \
-                       common/image-fit.o \
-                       image-host.o \
                        common/image.o \
                        imagetool.o \
                        imximage.o \
+                       imx8image.o \
+                       imx8mimage.o \
                        kwbimage.o \
                        lib/md5.o \
                        lpc32xximage.o \
@@ -107,15 +105,18 @@ dumpimage-mkimage-objs := aisimage.o \
                        stm32image.o \
                        $(ROCKCHIP_OBS) \
                        socfpgaimage.o \
+                       lib/crc16.o \
                        lib/sha1.o \
                        lib/sha256.o \
                        common/hash.o \
                        ublimage.o \
                        zynqimage.o \
                        zynqmpimage.o \
+                       zynqmpbif.o \
                        $(LIBFDT_OBJS) \
                        gpimage.o \
                        gpimage-common.o \
+                       mtk_image.o \
                        $(RSA_OBJS-y)
 
 dumpimage-objs := $(dumpimage-mkimage-objs) dumpimage.o
@@ -124,7 +125,7 @@ fit_info-objs   := $(dumpimage-mkimage-objs) fit_info.o
 fit_check_sign-objs   := $(dumpimage-mkimage-objs) fit_check_sign.o
 file2include-objs := file2include.o
 
-ifneq ($(CONFIG_MX23)$(CONFIG_MX28),)
+ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_FIT_SIGNATURE),)
 # Add CONFIG_MXS into host CFLAGS, so we can check whether or not register
 # the mxsimage support within tools/mxsimage.c .
 HOSTCFLAGS_mxsimage.o += -DCONFIG_MXS
@@ -134,6 +135,7 @@ ifdef CONFIG_FIT_SIGNATURE
 # This affects include/image.h, but including the board config file
 # is tricky, so manually define this options here.
 HOST_EXTRACFLAGS       += -DCONFIG_FIT_SIGNATURE
+HOST_EXTRACFLAGS       += -DCONFIG_FIT_SIGNATURE_MAX_SIZE=$(CONFIG_FIT_SIGNATURE_MAX_SIZE)
 endif
 
 ifdef CONFIG_SYS_U_BOOT_OFFS
@@ -146,6 +148,8 @@ endif
 
 # MXSImage needs LibSSL
 ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_ARMADA_38X)$(CONFIG_ARMADA_39X)$(CONFIG_FIT_SIGNATURE),)
+HOSTCFLAGS_kwbimage.o += \
+       $(shell pkg-config --cflags libssl libcrypto 2> /dev/null || echo "")
 HOSTLOADLIBES_mkimage += \
        $(shell pkg-config --libs libssl libcrypto 2> /dev/null || echo "-lssl -lcrypto")
 
@@ -195,6 +199,10 @@ hostprogs-$(CONFIG_RISCV) += prelink-riscv
 hostprogs-y += fdtgrep
 fdtgrep-objs += $(LIBFDT_OBJS) fdtgrep.o
 
+ifneq ($(TOOLS_ONLY),y)
+hostprogs-y += spl_size_limit
+endif
+
 hostprogs-$(CONFIG_MIPS) += mips-relocs
 
 # We build some files with extra pedantic flags to try to minimize things
@@ -250,7 +258,8 @@ HOST_EXTRACFLAGS += -include $(srctree)/include/compiler.h \
                -I$(srctree)/tools \
                -DUSE_HOSTCC \
                -D__KERNEL_STRICT_NAMES \
-               -D_GNU_SOURCE
+               -D_GNU_SOURCE \
+               -std=gnu99
 
 __build:       $(LOGO-y)
 
@@ -265,6 +274,7 @@ subdir- += env
 
 ifneq ($(CROSS_BUILD_TOOLS),)
 override HOSTCC = $(CC)
+override HOSTCFLAGS = $(CFLAGS)
 
 quiet_cmd_crosstools_strip = STRIP   $^
       cmd_crosstools_strip = $(STRIP) $^; touch $@