X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=scripts%2FMakefile.spl;h=07db0bff8dfb364195bdf08529d1f30d342bdaee;hb=a3d6e386176e3702d8f975b1c2b10162c3e15fc0;hp=bf677aa42a6027fb7a069f20507a793eea819df8;hpb=c71630838d908e410ee83f0164327e1fd515f1ca;p=u-boot diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index bf677aa42a..07db0bff8d 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -21,13 +21,10 @@ _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) include $(srctree)/scripts/Kbuild.include -CONFIG_SPL_BUILD := y -export CONFIG_SPL_BUILD +UBOOTINCLUDE := -I$(obj)/include $(UBOOTINCLUDE) -KBUILD_CPPFLAGS += -DCONFIG_SPL_BUILD -ifeq ($(CONFIG_TPL_BUILD),y) -KBUILD_CPPFLAGS += -DCONFIG_TPL_BUILD -endif +-include $(obj)/include/config/auto.conf +-include $(obj)/include/autoconf.mk ifeq ($(CONFIG_TPL_BUILD),y) export CONFIG_TPL_BUILD @@ -36,14 +33,6 @@ else SPL_BIN := u-boot-spl endif -include include/config.mk - -ifeq ($(CONFIG_TPL_BUILD),y) - -include include/tpl-autoconf.mk -else - -include include/spl-autoconf.mk -endif - include $(srctree)/config.mk # Enable garbage collection of un-used sections for SPL @@ -53,20 +42,6 @@ LDFLAGS_FINAL += --gc-sections # FIX ME cpp_flags := $(KBUILD_CPPFLAGS) $(PLATFORM_CPPFLAGS) $(UBOOTINCLUDE) \ $(NOSTDINC_FLAGS) -c_flags := $(KBUILD_CFLAGS) $(cpp_flags) - -# Auto-generate the spl-autoconf.mk file (which is included by all makefiles for SPL) -quiet_cmd_autoconf = GEN $@ - cmd_autoconf = \ - $(CPP) $(c_flags) -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && \ - sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp > $@; \ - rm $@.tmp - -include/tpl-autoconf.mk: include/config.h - $(call cmd,autoconf) - -include/spl-autoconf.mk: include/config.h - $(call cmd,autoconf) HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(srctree)/board/$(VENDOR)/common/Makefile),y,n) @@ -206,6 +181,10 @@ ALL-y += $(obj)/sunxi-spl.bin endif endif +ifeq ($(CONFIG_SYS_SOC),"at91") +ALL-y += boot.bin +endif + all: $(ALL-y) ifdef CONFIG_SAMSUNG @@ -241,13 +220,13 @@ $(obj)/sunxi-spl.bin: $(obj)/$(SPL_BIN).bin endif quiet_cmd_u-boot-spl = LD $@ - cmd_u-boot-spl = cd $(obj) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) \ + cmd_u-boot-spl = (cd $(obj) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) \ $(patsubst $(obj)/%,%,$(u-boot-spl-init)) --start-group \ $(patsubst $(obj)/%,%,$(u-boot-spl-main)) --end-group \ - $(PLATFORM_LIBS) -Map $(SPL_BIN).map -o $(SPL_BIN) + $(PLATFORM_LIBS) -Map $(SPL_BIN).map -o $(SPL_BIN)) -$(obj)/$(SPL_BIN): $(u-boot-spl-init) $(u-boot-spl-main) $(obj)/u-boot-spl.lds - $(call cmd,u-boot-spl) +$(obj)/$(SPL_BIN): $(u-boot-spl-init) $(u-boot-spl-main) $(obj)/u-boot-spl.lds FORCE + $(call if_changed,u-boot-spl) $(sort $(u-boot-spl-init) $(u-boot-spl-main)): $(u-boot-spl-dirs) ;