]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - Makefile
Merge git://git.denx.de/u-boot-socfpga
[people/ms/u-boot.git] / Makefile
index a5f56880e36d3c4a8bc12476fafd6bd6cfb50b91..3d2b66a91f08a7925b6c0e7f71f488c03128f165 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -516,6 +516,9 @@ include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
        @# Otherwise, 'make silentoldconfig' would be invoked twice.
        $(Q)touch include/config/auto.conf
 
+u-boot.cfg spl/u-boot.cfg tpl/u-boot.cfg: include/config.h FORCE
+       $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.autoconf $(@)
+
 -include include/autoconf.mk
 -include include/autoconf.mk.dep
 
@@ -851,7 +854,7 @@ quiet_cmd_cfgcheck = CFGCHK  $2
 cmd_cfgcheck = $(srctree)/scripts/check-config.sh $2 \
                $(srctree)/scripts/config_whitelist.txt $(srctree)
 
-all:           $(ALL-y)
+all:           $(ALL-y) cfg
 ifeq ($(CONFIG_DM_I2C_COMPAT)$(CONFIG_SANDBOX),y)
        @echo "===================== WARNING ======================"
        @echo "This board uses CONFIG_DM_I2C_COMPAT. Please remove"
@@ -1229,13 +1232,16 @@ u-boot.elf: u-boot.bin
        $(Q)$(OBJCOPY) -I binary $(PLATFORM_ELFFLAGS) $< u-boot-elf.o
        $(call if_changed,u-boot-elf)
 
+ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(ARCH)/Makefile.postlink)
+
 # Rule to link u-boot
 # May be overridden by arch/$(ARCH)/config.mk
 quiet_cmd_u-boot__ ?= LD      $@
       cmd_u-boot__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_u-boot) -o $@ \
       -T u-boot.lds $(u-boot-init)                             \
       --start-group $(u-boot-main) --end-group                 \
-      $(PLATFORM_LIBS) -Map u-boot.map
+      $(PLATFORM_LIBS) -Map u-boot.map;                        \
+      $(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)
 
 quiet_cmd_smap = GEN     common/system_map.o
 cmd_smap = \
@@ -1245,7 +1251,7 @@ cmd_smap = \
                -c $(srctree)/common/system_map.c -o common/system_map.o
 
 u-boot:        $(u-boot-init) $(u-boot-main) u-boot.lds FORCE
-       $(call if_changed,u-boot__)
+       +$(call if_changed,u-boot__)
 ifeq ($(CONFIG_KALLSYMS),y)
        $(call cmd,smap)
        $(call cmd,u-boot__) common/system_map.o