]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - Makefile
85xx: Bump up the BOOTMAP to 16M on FSL 85xx boards
[people/ms/u-boot.git] / Makefile
index 3877c97209821a4be294936184e2ea0184b2653c..25a62541d1be50da422866b14f2975a2bb356bee 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -140,8 +140,8 @@ endif
 # The "tools" are needed early, so put this first
 # Don't include stuff already done in $(LIBS)
 SUBDIRS        = tools \
-         examples \
-         api_examples
+         examples/standalone \
+         examples/api
 
 .PHONY : $(SUBDIRS)
 
@@ -151,50 +151,10 @@ ifeq ($(obj)include/config.mk,$(wildcard $(obj)include/config.mk))
 include $(obj)include/config.mk
 export ARCH CPU BOARD VENDOR SOC
 
-ifndef CROSS_COMPILE
+# set default to nothing for native builds
 ifeq ($(HOSTARCH),$(ARCH))
-CROSS_COMPILE =
-else
-ifeq ($(ARCH),ppc)
-CROSS_COMPILE = ppc_8xx-
-endif
-ifeq ($(ARCH),arm)
-CROSS_COMPILE = arm-linux-
-endif
-ifeq ($(ARCH),i386)
-CROSS_COMPILE = i386-linux-
-endif
-ifeq ($(ARCH),mips)
-CROSS_COMPILE = mips_4KC-
-endif
-ifeq ($(ARCH),nios)
-CROSS_COMPILE = nios-elf-
-endif
-ifeq ($(ARCH),nios2)
-CROSS_COMPILE = nios2-elf-
-endif
-ifeq ($(ARCH),m68k)
-CROSS_COMPILE = m68k-elf-
-endif
-ifeq ($(ARCH),microblaze)
-CROSS_COMPILE = mb-
-endif
-ifeq ($(ARCH),blackfin)
-CROSS_COMPILE = bfin-uclinux-
-endif
-ifeq ($(ARCH),avr32)
-CROSS_COMPILE = avr32-linux-
+CROSS_COMPILE ?=
 endif
-ifeq ($(ARCH),sh)
-CROSS_COMPILE = sh4-linux-
-endif
-ifeq ($(ARCH),sparc)
-CROSS_COMPILE = sparc-elf-
-endif  # sparc
-endif  # HOSTARCH,ARCH
-endif  # CROSS_COMPILE
-
-export CROSS_COMPILE
 
 # load other configuration
 include $(TOPDIR)/config.mk
@@ -246,7 +206,6 @@ LIBS += drivers/misc/libmisc.a
 LIBS += drivers/mmc/libmmc.a
 LIBS += drivers/mtd/libmtd.a
 LIBS += drivers/mtd/nand/libnand.a
-LIBS += drivers/mtd/nand_legacy/libnand_legacy.a
 LIBS += drivers/mtd/onenand/libonenand.a
 LIBS += drivers/mtd/ubi/libubi.a
 LIBS += drivers/mtd/spi/libspi_flash.a
@@ -352,7 +311,7 @@ GEN_UBOOT = \
 $(obj)u-boot:          depend $(SUBDIRS) $(OBJS) $(LIBBOARD) $(LIBS) $(LDSCRIPT)
                $(GEN_UBOOT)
 ifeq ($(CONFIG_KALLSYMS),y)
-               smap=`$(call SYSTEM_MAP,u-boot) | awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\0"}'` ; \
+               smap=`$(call SYSTEM_MAP,u-boot) | awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\\\000"}'` ; \
                $(CC) $(CFLAGS) -DSYSTEM_MAP="\"$${smap}\"" -c common/system_map.c -o $(obj)common/system_map.o
                $(GEN_UBOOT) $(obj)common/system_map.o
 endif
@@ -428,7 +387,6 @@ TAG_SUBDIRS += drivers/misc
 TAG_SUBDIRS += drivers/mmc
 TAG_SUBDIRS += drivers/mtd
 TAG_SUBDIRS += drivers/mtd/nand
-TAG_SUBDIRS += drivers/mtd/nand_legacy
 TAG_SUBDIRS += drivers/mtd/onenand
 TAG_SUBDIRS += drivers/mtd/spi
 TAG_SUBDIRS += drivers/net
@@ -483,6 +441,7 @@ $(obj)include/autoconf.mk: $(obj)include/config.h
        mv $@.tmp $@
 
 sinclude $(obj)include/autoconf.mk.dep
+sinclude $(obj)include/autoconf.mk
 
 #########################################################################
 else   # !config.mk
@@ -695,6 +654,16 @@ MVBC_P_config: unconfig
 o2dnt_config:  unconfig
        @$(MKCONFIG) o2dnt ppc mpc5xxx o2dnt
 
+pcm030_config \
+pcm030_LOWBOOT_config: unconfig
+       @mkdir -p $(obj)include $(obj)board/phytec/pcm030
+       @ >$(obj)include/config.h
+       @[ -z "$(findstring LOWBOOT_,$@)" ] || \
+               { echo "TEXT_BASE = 0xFF000000" >$(obj)board/phytec/pcm030/config.tmp ; \
+                 echo "... with LOWBOOT configuration" ; \
+               }
+       @$(MKCONFIG) -a pcm030 ppc mpc5xxx pcm030 phytec
+
 pf5200_config: unconfig
        @$(MKCONFIG) pf5200  ppc mpc5xxx pf5200 esd
 
@@ -2580,6 +2549,9 @@ MPC8641HPCN_config:    unconfig
 sbc8641d_config:       unconfig
        @$(MKCONFIG) $(@:_config=) ppc mpc86xx sbc8641d
 
+XPEDITE5170_config:    unconfig
+       @$(MKCONFIG) $(@:_config=) ppc mpc86xx xpedite5170 xes
+
 #########################################################################
 ## 74xx/7xx Systems
 #########################################################################
@@ -2740,12 +2712,22 @@ at91sam9xeek_config     :       unconfig
 at91sam9261ek_nandflash_config \
 at91sam9261ek_dataflash_cs0_config \
 at91sam9261ek_dataflash_cs3_config \
-at91sam9261ek_config   :       unconfig
-       @mkdir -p $(obj)include
+at91sam9261ek_config \
+at91sam9g10ek_nandflash_config \
+at91sam9g10ek_dataflash_cs0_config \
+at91sam9g10ek_dataflash_cs3_config \
+at91sam9g10ek_config   :       unconfig
+       @mkdir -p $(obj)include
+       @if [ "$(findstring 9g10,$@)" ] ; then \
+               echo "#define CONFIG_AT91SAM9G10EK 1"   >>$(obj)include/config.h ; \
+               $(XECHO) "... 9G10 Variant" ; \
+       else \
+               echo "#define CONFIG_AT91SAM9261EK 1"   >>$(obj)include/config.h ; \
+       fi;
        @if [ "$(findstring _nandflash,$@)" ] ; then \
                echo "#define CONFIG_SYS_USE_NANDFLASH 1"       >>$(obj)include/config.h ; \
                $(XECHO) "... with environment variable in NAND FLASH" ; \
-       elif [ "$(findstring dataflash_cs3,$@)" ] ; then \
+       elif [ "$(findstring dataflash_cs0,$@)" ] ; then \
                echo "#define CONFIG_SYS_USE_DATAFLASH_CS3 1"   >>$(obj)include/config.h ; \
                $(XECHO) "... with environment variable in SPI DATAFLASH CS3" ; \
        else \
@@ -2797,6 +2779,31 @@ meesc_config     :       unconfig
 pm9261_config  :       unconfig
        @$(MKCONFIG) $(@:_config=) arm arm926ejs pm9261 ronetix at91
 
+at91sam9m10g45ek_nandflash_config \
+at91sam9m10g45ek_dataflash_config \
+at91sam9m10g45ek_dataflash_cs0_config \
+at91sam9m10g45ek_config \
+at91sam9g45ekes_nandflash_config \
+at91sam9g45ekes_dataflash_config \
+at91sam9g45ekes_dataflash_cs0_config \
+at91sam9g45ekes_config :       unconfig
+       @mkdir -p $(obj)include
+               @if [ "$(findstring 9m10,$@)" ] ; then \
+               echo "#define CONFIG_AT91SAM9M10G45EK 1"        >>$(obj)include/config.h ; \
+               $(XECHO) "... 9M10G45 Variant" ; \
+       else \
+               echo "#define CONFIG_AT91SAM9G45EKES 1" >>$(obj)include/config.h ; \
+       fi;
+
+       @if [ "$(findstring _nandflash,$@)" ] ; then \
+               echo "#define CONFIG_SYS_USE_NANDFLASH 1"       >>$(obj)include/config.h ; \
+               $(XECHO) "... with environment variable in NAND FLASH" ; \
+       else \
+               echo "#define CONFIG_ATMEL_SPI 1"       >>$(obj)include/config.h ; \
+               $(XECHO) "... with environment variable in SPI DATAFLASH CS0" ; \
+       fi;
+       @$(MKCONFIG) -a at91sam9m10g45ek arm arm926ejs at91sam9m10g45ek atmel at91
+
 pm9263_config  :       unconfig
        @$(MKCONFIG) $(@:_config=) arm arm926ejs pm9263 ronetix at91
 
@@ -2860,9 +2867,9 @@ nhk8815_onenand_config:   unconfig
        @ > $(obj)include/config.h
        @if [ "$(findstring _onenand, $@)" ] ; then \
                echo "#define CONFIG_BOOT_ONENAND" >> $(obj)include/config.h; \
-               $(XECHO) "... configured for OneNand Flash"; \
+               $(XECHO) "... configured to boot from OneNand Flash"; \
        else \
-               $(XECHO) "... configured for Nand Flash"; \
+               $(XECHO) "... configured to boot from Nand Flash"; \
        fi
        @$(MKCONFIG) -a nhk8815 arm arm926ejs nhk8815 st nomadik
 
@@ -3143,8 +3150,16 @@ imx31_phycore_config     : unconfig
 mx31ads_config         : unconfig
        @$(MKCONFIG) $(@:_config=) arm arm1136 mx31ads freescale mx31
 
-mx31pdk_config         : unconfig
-       @$(MKCONFIG) $(@:_config=) arm arm1136 mx31pdk freescale mx31
+mx31pdk_config \
+mx31pdk_nand_config    : unconfig
+       @mkdir -p $(obj)include
+       @if [ -n "$(findstring _nand_,$@)" ]; then                                      \
+               echo "#define CONFIG_NAND_U_BOOT" >> $(obj)include/config.h;            \
+       else                                                                            \
+               echo "#define CONFIG_SKIP_LOWLEVEL_INIT" >> $(obj)include/config.h;     \
+               echo "#define CONFIG_SKIP_RELOCATE_UBOOT" >> $(obj)include/config.h;    \
+       fi
+       @$(MKCONFIG) -a mx31pdk arm arm1136 mx31pdk freescale mx31
 
 omap2420h4_config      : unconfig
        @$(MKCONFIG) $(@:_config=) arm arm1136 omap2420h4 NULL omap24xx
@@ -3518,18 +3533,14 @@ sh7763rdp_config  :   unconfig
 xtract_sh7785lcr = $(subst _32bit,,$(subst _config,,$1))
 sh7785lcr_32bit_config \
 sh7785lcr_config  :   unconfig
-       @ >include/config.h
-       @echo "#define CONFIG_SH7785LCR 1" >> include/config.h
+       @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 ; \
-               cp $(obj)board/renesas/sh7785lcr/u-boot_32bit \
-                       $(obj)board/renesas/sh7785lcr/u-boot.lds ; \
                echo "TEXT_BASE = 0x8ff80000" > \
                        $(obj)board/renesas/sh7785lcr/config.tmp ; \
                  $(XECHO) " ... enable 32-Bit Address Extended Mode" ; \
-       else \
-               cp $(obj)board/renesas/sh7785lcr/u-boot_29bit \
-                       $(obj)board/renesas/sh7785lcr/u-boot.lds ; \
        fi
        @$(MKCONFIG) -a $(call xtract_sh7785lcr,$@) sh sh4 sh7785lcr renesas
 
@@ -3538,6 +3549,11 @@ ap325rxa_config  :   unconfig
        @echo "#define CONFIG_AP325RXA 1" > $(obj)include/config.h
        @$(MKCONFIG) -a $(@:_config=) sh sh4 ap325rxa renesas
 
+espt_config  :   unconfig
+       @mkdir -p $(obj)include
+       @echo "#define CONFIG_ESPT 1" > $(obj)include/config.h
+       @$(MKCONFIG) -a $(@:_config=) sh sh4 espt
+
 #========================================================================
 # SPARC
 #========================================================================
@@ -3576,11 +3592,16 @@ grsim_leon2_config : unconfig
 #########################################################################
 
 clean:
-       @rm -f $(obj)examples/82559_eeprom $(obj)examples/eepro100_eeprom \
-              $(obj)examples/hello_world  $(obj)examples/interrupt       \
-              $(obj)examples/mem_to_mem_idma2intr                        \
-              $(obj)examples/sched        $(obj)examples/smc91111_eeprom \
-              $(obj)examples/test_burst   $(obj)examples/timer
+       @rm -f $(obj)examples/standalone/82559_eeprom                     \
+              $(obj)examples/standalone/eepro100_eeprom                  \
+              $(obj)examples/standalone/hello_world                      \
+              $(obj)examples/standalone/interrupt                        \
+              $(obj)examples/standalone/mem_to_mem_idma2intr             \
+              $(obj)examples/standalone/sched                            \
+              $(obj)examples/standalone/smc91111_eeprom                  \
+              $(obj)examples/standalone/test_burst                       \
+              $(obj)examples/standalone/timer
+       @rm -f $(obj)examples/api/demo{,.bin}
        @rm -f $(obj)tools/bmp_logo        $(obj)tools/easylogo/easylogo  \
               $(obj)tools/env/{fw_printenv,fw_setenv}                    \
               $(obj)tools/envcrc                                         \
@@ -3597,7 +3618,7 @@ clean:
        @rm -f $(obj)include/bmp_logo.h
        @rm -f $(obj)nand_spl/{u-boot-spl,u-boot-spl.map,System.map}
        @rm -f $(obj)onenand_ipl/onenand-{ipl,ipl.bin,ipl-2k.bin,ipl-4k.bin,ipl.map}
-       @rm -f $(obj)api_examples/demo $(TIMESTAMP_FILE) $(VERSION_FILE)
+       @rm -f $(TIMESTAMP_FILE) $(VERSION_FILE)
        @find $(OBJTREE) -type f \
                \( -name 'core' -o -name '*.bak' -o -name '*~' \
                -o -name '*.o'  -o -name '*.a' -o -name '*.exe' \) -print \
@@ -3616,7 +3637,6 @@ clobber:  clean
        @rm -f $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm
        @[ ! -d $(obj)nand_spl ] || find $(obj)nand_spl -name "*" -type l -print | xargs rm -f
        @[ ! -d $(obj)onenand_ipl ] || find $(obj)onenand_ipl -name "*" -type l -print | xargs rm -f
-       @[ ! -d $(obj)api_examples ] || find $(obj)api_examples -name "*" -type l -print | xargs rm -f
 
 ifeq ($(OBJTREE),$(SRCTREE))
 mrproper \