clk: imx8qm: fix usdhc2 clocks
[oweals/u-boot.git] / Makefile
index 9fb90c0779a61aa2b39e859c28c85713313dce63..7e5fd23e7c3fdf554743b08e6b32afb09f3df621 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@
 VERSION = 2019
 PATCHLEVEL = 07
 SUBLEVEL =
-EXTRAVERSION = -rc1
+EXTRAVERSION = -rc3
 NAME =
 
 # *DOCUMENTATION*
@@ -337,6 +337,19 @@ endif
 #  KBUILD_MODULES := 1
 #endif
 
+define size_check
+       actual=$$( wc -c $1 | awk '{print $$1}'); \
+       limit=$$( printf "%d" $2 ); \
+       if test $$actual -gt $$limit; then \
+               echo "$1 exceeds file size limit:" >&2; \
+               echo "  limit:  $$limit bytes" >&2; \
+               echo "  actual: $$actual bytes" >&2; \
+               echo "  excess: $$((actual - limit)) bytes" >&2; \
+               exit 1; \
+       fi
+endef
+export size_check
+
 export KBUILD_MODULES KBUILD_BUILTIN
 export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD
 
@@ -778,20 +791,17 @@ LDPPFLAGS += \
 #########################################################################
 
 ifneq ($(CONFIG_BOARD_SIZE_LIMIT),)
-BOARD_SIZE_CHECK = \
-       @actual=`wc -c $@ | awk '{print $$1}'`; \
-       limit=`printf "%d" $(CONFIG_BOARD_SIZE_LIMIT)`; \
-       if test $$actual -gt $$limit; then \
-               echo "$@ exceeds file size limit:" >&2 ; \
-               echo "  limit:  $$limit bytes" >&2 ; \
-               echo "  actual: $$actual bytes" >&2 ; \
-               echo "  excess: $$((actual - limit)) bytes" >&2; \
-               exit 1; \
-       fi
+BOARD_SIZE_CHECK= @ $(call size_check,$@,$(CONFIG_BOARD_SIZE_LIMIT))
 else
 BOARD_SIZE_CHECK =
 endif
 
+ifneq ($(CONFIG_SPL_SIZE_LIMIT),0)
+SPL_SIZE_CHECK = @$(call size_check,$@,$$(tools/spl_size_limit))
+else
+SPL_SIZE_CHECK =
+endif
+
 # Statically apply RELA-style relocations (currently arm64 only)
 # This is useful for arm64 where static relocation needs to be performed on
 # the raw binary, but certain simulators only accept an ELF file (but don't
@@ -1014,6 +1024,17 @@ ifneq ($(CONFIG_DM_SPI_FLASH)$(CONFIG_OF_CONTROL),yy)
        @echo >&2 "See doc/driver-model/MIGRATION.txt for more info."
        @echo >&2 "===================================================="
 endif
+endif
+ifneq ($(CONFIG_WATCHDOG)$(CONFIG_HW_WATCHDOG),)
+ifneq ($(CONFIG_WDT),y)
+       @echo >&2 "===================== WARNING ======================"
+       @echo >&2 "This board does not use CONFIG_WDT (DM watchdog support)."
+       @echo >&2 "Please update the board to use CONFIG_WDT before the"
+       @echo >&2 "v2019.10 release."
+       @echo >&2 "Failure to update by the deadline may result in board removal."
+       @echo >&2 "See doc/driver-model/MIGRATION.txt for more info."
+       @echo >&2 "===================================================="
+endif
 endif
        @# Check that this build does not use CONFIG options that we do not
        @# know about unless they are in Kconfig. All the existing CONFIG
@@ -1047,6 +1068,10 @@ fit-dtb.blob.lzo: fit-dtb.blob
 
 fit-dtb.blob: dts/dt.dtb FORCE
        $(call if_changed,mkimage)
+ifneq ($(SOURCE_DATE_EPOCH),)
+       touch -d @$(SOURCE_DATE_EPOCH) fit-dtb.blob
+       chmod 0600 fit-dtb.blob
+endif
 
 MKIMAGEFLAGS_fit-dtb.blob = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
        -a 0 -e 0 -E \
@@ -1062,6 +1087,10 @@ endif
 
 u-boot.bin: u-boot-fit-dtb.bin FORCE
        $(call if_changed,copy)
+
+u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE
+       $(call if_changed,cat)
+
 else ifeq ($(CONFIG_OF_SEPARATE),y)
 u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE
        $(call if_changed,cat)
@@ -1075,6 +1104,7 @@ endif
 
 %.imx: %.bin
        $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
+       $(BOARD_SIZE_CHECK)
 
 %.vyb: %.imx
        $(Q)$(MAKE) $(build)=arch/arm/cpu/armv7/vf610 $@
@@ -1102,6 +1132,9 @@ OBJCOPYFLAGS_u-boot-spl.srec = $(OBJCOPYFLAGS_u-boot.srec)
 spl/u-boot-spl.srec: spl/u-boot-spl FORCE
        $(call if_changed,objcopy)
 
+%.scif: %.srec
+       $(Q)$(MAKE) $(build)=arch/arm/mach-rmobile $@
+
 OBJCOPYFLAGS_u-boot-nodtb.bin := -O binary \
                $(if $(CONFIG_X86_16BIT_INIT),-R .start16 -R .resetvec) \
                $(if $(CONFIG_MPC85XX_HAVE_RESET_VECTOR),-R .bootpg -R .resetvec)
@@ -1689,6 +1722,8 @@ u-boot.lds: $(LDSCRIPT) prepare FORCE
 
 spl/u-boot-spl.bin: spl/u-boot-spl
        @:
+       $(SPL_SIZE_CHECK)
+
 spl/u-boot-spl: tools prepare \
                $(if $(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_SPL_OF_PLATDATA),dts/dt.dtb) \
                $(if $(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_TPL_OF_PLATDATA),dts/dt.dtb)
@@ -1751,6 +1786,7 @@ checkarmreloc: u-boot
 envtools: scripts_basic $(version_h) $(timestamp_h)
        $(Q)$(MAKE) $(build)=tools/env
 
+tools-only: export TOOLS_ONLY=y
 tools-only: scripts_basic $(version_h) $(timestamp_h)
        $(Q)$(MAKE) $(build)=tools
 
@@ -1780,7 +1816,7 @@ CLEAN_DIRS  += $(MODVERDIR) \
                        $(filter-out include, $(shell ls -1 $d 2>/dev/null))))
 
 CLEAN_FILES += include/bmp_logo.h include/bmp_logo_data.h \
-              boot* u-boot* MLO* SPL System.map fit-dtb.blob
+              boot* u-boot* MLO* SPL System.map fit-dtb.blob*
 
 # Directories & files removed with 'make mrproper'
 MRPROPER_DIRS  += include/config include/generated spl tpl \