]> git.sur5r.net Git - u-boot/blobdiff - Makefile
Merge branch 'master' of ssh://gemini/home/wd/git/u-boot/master
[u-boot] / Makefile
index d18a973a244f1cc86b4236b58ecaa15253946608..f8e13d782ad30079c5b04e1d91130d3e7128ad69 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -304,6 +304,21 @@ __LIBS := $(subst $(obj),,$(LIBS)) $(subst $(obj),,$(LIBBOARD))
 #########################################################################
 #########################################################################
 
+ifneq ($(CONFIG_BOARD_SIZE_LIMIT),)
+BOARD_SIZE_CHECK = \
+       @actual=`wc -c $@ | awk '{print $$1}'`; \
+       limit=$(CONFIG_BOARD_SIZE_LIMIT); \
+       if test $$actual -gt $$limit; then \
+               echo "$@ exceeds file size limit:"; \
+               echo "  limit:  $$limit bytes"; \
+               echo "  actual: $$actual bytes"; \
+               echo "  excess: $$((actual - limit)) bytes"; \
+               exit 1; \
+       fi
+else
+BOARD_SIZE_CHECK =
+endif
+
 # Always append ALL so that arch config.mk's can add custom ones
 ALL += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map $(U_BOOT_NAND) $(U_BOOT_ONENAND)
 
@@ -317,10 +332,12 @@ $(obj)u-boot.srec:        $(obj)u-boot
 
 $(obj)u-boot.bin:      $(obj)u-boot
                $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
+               $(BOARD_SIZE_CHECK)
 
 $(obj)u-boot.ldr:      $(obj)u-boot
                $(CREATE_LDR_ENV)
                $(LDR) -T $(CONFIG_BFIN_CPU) -c $@ $< $(LDR_FLAGS)
+               $(BOARD_SIZE_CHECK)
 
 $(obj)u-boot.ldr.hex:  $(obj)u-boot.ldr
                $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ -I binary
@@ -341,7 +358,7 @@ $(obj)u-boot.imx:       $(obj)u-boot.bin
 
 $(obj)u-boot.kwb:       $(obj)u-boot.bin
                $(obj)tools/mkimage -n $(KWD_CONFIG) -T kwbimage \
-               -a $(CONFIG_SYS_TEXT_BASE) -e $(TEXT_BASE) -d $< $@
+               -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) -d $< $@
 
 $(obj)u-boot.sha1:     $(obj)u-boot.bin
                $(obj)tools/ubsha1 $(obj)u-boot.bin
@@ -1010,28 +1027,6 @@ scpu_config:     unconfig
        fi
        @$(MKCONFIG) -n $@ -a pdnb3 arm ixp pdnb3 prodrive
 
-polaris_config \
-trizepsiv_config       :       unconfig
-       @mkdir -p $(obj)include
-       @if [ "$(findstring polaris,$@)" ] ; then \
-               echo "#define CONFIG_POLARIS 1" >>$(obj)include/config.h ; \
-       fi;
-       @$(MKCONFIG) -n $@ -a trizepsiv arm pxa trizepsiv
-
-vpac270_nor_256M_config \
-vpac270_nor_128M_config \
-vpac270_onenand_config : unconfig
-       @mkdir -p $(obj)include
-       @if [ "$(findstring onenand,$@)" ] ; then \
-               echo "#define CONFIG_ONENAND_U_BOOT" \
-                       >>$(obj)include/config.h ; \
-       fi;
-       @if [ "$(findstring 256M,$@)" ] ; then \
-               echo "#define CONFIG_256M_U_BOOT" \
-                       >>$(obj)include/config.h ; \
-       fi;
-       @$(MKCONFIG) -n $@ -a vpac270 arm pxa vpac270
-
 #########################################################################
 ## ARM1136 Systems
 #########################################################################
@@ -1189,88 +1184,6 @@ bf527-ezkit-v2_config    : unconfig
        @$(MKCONFIG) -t BF527_EZKIT_REV_2_1 \
                bf527-ezkit blackfin blackfin bf527-ezkit
 
-#========================================================================
-# SH3 (SuperH)
-#========================================================================
-
-#########################################################################
-## sh2 (Renesas SuperH)
-#########################################################################
-rsk7203_config: unconfig
-       @mkdir -p $(obj)include
-       @echo "#define CONFIG_RSK7203 1" > $(obj)include/config.h
-       @$(MKCONFIG) -a $@ sh sh2 rsk7203 renesas
-
-#########################################################################
-## sh3 (Renesas SuperH)
-#########################################################################
-
-mpr2_config: unconfig
-       @mkdir -p $(obj)include
-       @echo "#define CONFIG_MPR2 1" > $(obj)include/config.h
-       @$(MKCONFIG) -a $@ sh sh3 mpr2
-
-ms7720se_config: unconfig
-       @mkdir -p $(obj)include
-       @echo "#define CONFIG_MS7720SE 1" > $(obj)include/config.h
-       @$(MKCONFIG) -a $@ sh sh3 ms7720se
-
-#########################################################################
-## sh4 (Renesas SuperH)
-#########################################################################
-
-MigoR_config :       unconfig
-       @mkdir -p $(obj)include
-       @echo "#define CONFIG_MIGO_R 1" > $(obj)include/config.h
-       @$(MKCONFIG) -a $@ sh sh4 MigoR renesas
-
-ms7750se_config: unconfig
-       @mkdir -p $(obj)include
-       @echo "#define CONFIG_MS7750SE 1" > $(obj)include/config.h
-       @$(MKCONFIG) -a $@ sh sh4 ms7750se
-
-ms7722se_config :      unconfig
-       @mkdir -p $(obj)include
-       @echo "#define CONFIG_MS7722SE 1" > $(obj)include/config.h
-       @$(MKCONFIG) -a $@ sh sh4 ms7722se
-
-r2dplus_config  :   unconfig
-       @mkdir -p $(obj)include
-       @echo "#define CONFIG_R2DPLUS 1" > $(obj)include/config.h
-       @$(MKCONFIG) -a $@ sh sh4 r2dplus renesas
-
-r7780mp_config: unconfig
-       @mkdir -p $(obj)include
-       @echo "#define CONFIG_R7780MP 1" > $(obj)include/config.h
-       @$(MKCONFIG) -a $@ sh sh4 r7780mp renesas
-
-sh7763rdp_config  :   unconfig
-       @mkdir -p $(obj)include
-       @echo "#define CONFIG_SH7763RDP 1" > $(obj)include/config.h
-       @$(MKCONFIG) -a $@ sh sh4 sh7763rdp renesas
-
-sh7785lcr_32bit_config \
-sh7785lcr_config  :   unconfig
-       @mkdir -p $(obj)include
-       @mkdir -p $(obj)board/renesas/sh7785lcr
-       @echo "#define CONFIG_SH7785LCR 1" > $(obj)include/config.h
-       @if [ "$(findstring 32bit, $@)" ] ; then \
-               echo "#define CONFIG_SH_32BIT 1" >> $(obj)include/config.h ; \
-               echo "CONFIG_SYS_TEXT_BASE = 0x8ff80000" > \
-                       $(obj)board/renesas/sh7785lcr/config.tmp ; \
-       fi
-       @$(MKCONFIG) -n $@ -a sh7785lcr sh sh4 sh7785lcr renesas
-
-ap325rxa_config  :   unconfig
-       @mkdir -p $(obj)include
-       @echo "#define CONFIG_AP325RXA 1" > $(obj)include/config.h
-       @$(MKCONFIG) -a $@ sh sh4 ap325rxa renesas
-
-espt_config  :   unconfig
-       @mkdir -p $(obj)include
-       @echo "#define CONFIG_ESPT 1" > $(obj)include/config.h
-       @$(MKCONFIG) -a $@ sh sh4 espt
-
 #########################################################################
 #########################################################################