#
-# (C) Copyright 2000-2008
+# (C) Copyright 2000-2009
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# See file CREDITS for list of people who contributed to this
#
VERSION = 2009
-PATCHLEVEL = 03
+PATCHLEVEL = 06
SUBLEVEL =
-EXTRAVERSION = -rc2
+EXTRAVERSION =
ifneq "$(SUBLEVEL)" ""
U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
else
ARCH = ppc
endif
+# The "tools" are needed early, so put this first
+# Don't include stuff already done in $(LIBS)
+SUBDIRS = tools \
+ examples \
+ api_examples
+
+.PHONY : $(SUBDIRS)
+
ifeq ($(obj)include/config.mk,$(wildcard $(obj)include/config.mk))
# load ARCH, BOARD, and CPU configuration
endif
LIBS += drivers/rtc/librtc.a
LIBS += drivers/serial/libserial.a
-LIBS += drivers/usb/libusb.a
+LIBS += drivers/twserial/libtws.a
+LIBS += drivers/usb/gadget/libusb_gadget.a
+LIBS += drivers/usb/host/libusb_host.a
+LIBS += drivers/usb/musb/libusb_musb.a
LIBS += drivers/video/libvideo.a
+LIBS += drivers/watchdog/libwatchdog.a
LIBS += common/libcommon.a
LIBS += libfdt/libfdt.a
LIBS += api/libapi.a
# Add GCC lib
PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
-# The "tools" are needed early, so put this first
-# Don't include stuff already done in $(LIBS)
-SUBDIRS = tools \
- examples \
- api_examples
-
-.PHONY : $(SUBDIRS)
-
ifeq ($(CONFIG_NAND_U_BOOT),y)
NAND_SPL = nand_spl
U_BOOT_NAND = $(obj)u-boot-nand.bin
#########################################################################
#########################################################################
+# 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)
-ifeq ($(ARCH),blackfin)
-ALL += $(obj)u-boot.ldr
-endif
all: $(ALL)
$(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
$(obj)u-boot.ldr: $(obj)u-boot
+ $(obj)tools/envcrc --binary > $(obj)env-ldr.o
$(LDR) -T $(CONFIG_BFIN_CPU) -c $@ $< $(LDR_FLAGS)
$(obj)u-boot.ldr.hex: $(obj)u-boot.ldr
$(obj)u-boot.dis: $(obj)u-boot
$(OBJDUMP) -d $< > $@
-$(obj)u-boot: depend $(SUBDIRS) $(OBJS) $(LIBBOARD) $(LIBS) $(LDSCRIPT)
+GEN_UBOOT = \
UNDEF_SYM=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \
sed -n -e 's/.*\($(SYM_PREFIX)__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
cd $(LNDIR) && $(LD) $(LDFLAGS) $$UNDEF_SYM $(__OBJS) \
--start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
-Map u-boot.map -o u-boot
+$(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"}'` ; \
+ $(CC) $(CFLAGS) -DSYSTEM_MAP="\"$${smap}\"" -c common/system_map.c -o $(obj)common/system_map.o
+ $(GEN_UBOOT) $(obj)common/system_map.o
+endif
-$(OBJS): depend $(obj)include/autoconf.mk
+$(OBJS): depend
$(MAKE) -C cpu/$(CPU) $(if $(REMOTE_BUILD),$@,$(notdir $@))
-$(LIBS): depend $(obj)include/autoconf.mk $(SUBDIRS)
+$(LIBS): depend $(SUBDIRS)
$(MAKE) -C $(dir $(subst $(obj),,$@))
-$(LIBBOARD): depend $(LIBS) $(obj)include/autoconf.mk
+$(LIBBOARD): depend $(LIBS)
$(MAKE) -C $(dir $(subst $(obj),,$@))
-$(SUBDIRS): depend $(obj)include/autoconf.mk
+$(SUBDIRS): depend
$(MAKE) -C $@ all
-$(LDSCRIPT): depend $(obj)include/autoconf.mk
+$(LDSCRIPT): depend
$(MAKE) -C $(dir $@) $(notdir $@)
$(NAND_SPL): $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
$(MAKE) -C nand_spl/board/$(BOARDDIR) all
-$(U_BOOT_NAND): $(NAND_SPL) $(obj)u-boot.bin $(obj)include/autoconf.mk
+$(U_BOOT_NAND): $(NAND_SPL) $(obj)u-boot.bin
cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin
$(ONENAND_IPL): $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
$(MAKE) -C onenand_ipl/board/$(BOARDDIR) all
-$(U_BOOT_ONENAND): $(ONENAND_IPL) $(obj)u-boot.bin $(obj)include/autoconf.mk
+$(U_BOOT_ONENAND): $(ONENAND_IPL) $(obj)u-boot.bin
cat $(obj)onenand_ipl/onenand-ipl-2k.bin $(obj)u-boot.bin > $(obj)u-boot-onenand.bin
cat $(obj)onenand_ipl/onenand-ipl-4k.bin $(obj)u-boot.bin > $(obj)u-boot-flexonenand.bin
env:
$(MAKE) -C tools/env all MTD_VERSION=${MTD_VERSION} || exit 1
-depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE)
+depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir _depend ; done
TAG_SUBDIRS += include
> cscope.files
cscope -b -q -k
-$(obj)System.map: $(obj)u-boot
- @$(NM) $< | \
+SYSTEM_MAP = \
+ $(NM) $1 | \
grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
- sort > $(obj)System.map
+ LC_ALL=C sort
+$(obj)System.map: $(obj)u-boot
+ @$(call SYSTEM_MAP,$<) > $(obj)System.map
#
# Auto-generate the autoconf.mk file (which is included by all makefiles)
o2dnt_config: unconfig
@$(MKCONFIG) o2dnt ppc mpc5xxx o2dnt
+pcm030_config \
+pcm030_LOWBOOT_config: unconfig
+ @ >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
## MPC512x Systems
#########################################################################
-ads5121_config \
-ads5121_rev2_config \
+aria_config: unconfig
+ @$(MKCONFIG) -a aria ppc mpc512x aria davedenx
+
+mecp5123_config: unconfig
+ @$(MKCONFIG) -a mecp5123 ppc mpc512x mecp5123 esd
+
+mpc5121ads_config \
+mpc5121ads_rev2_config \
: unconfig
@mkdir -p $(obj)include
@if [ "$(findstring rev2,$@)" ] ; then \
echo "#define CONFIG_ADS5121_REV2 1" > $(obj)include/config.h; \
fi
- @$(MKCONFIG) -a ads5121 ppc mpc512x ads5121
-
+ @$(MKCONFIG) -a mpc5121ads ppc mpc512x mpc5121ads freescale
#########################################################################
## MPC8xx Systems
@echo "TEXT_BASE = 0x01000000" > $(obj)board/amcc/sequoia/config.tmp
@echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk
+sequoia_ramboot_config \
+rainier_ramboot_config: unconfig
+ @mkdir -p $(obj)include $(obj)board/amcc/sequoia
+ @echo "#define CONFIG_SYS_RAMBOOT" > $(obj)include/config.h
+ @echo "#define CONFIG_$$(echo $(subst ,,$(@:_config=)) | \
+ tr '[:lower:]' '[:upper:]')" >> $(obj)include/config.h
+ @$(MKCONFIG) -n $@ -a sequoia ppc ppc4xx sequoia amcc
+ @echo "TEXT_BASE = 0x01000000" > $(obj)board/amcc/sequoia/config.tmp
+ @echo "LDSCRIPT = board/amcc/sequoia/u-boot-ram.lds" >> \
+ $(obj)board/amcc/sequoia/config.tmp
+
taihu_config: unconfig
@$(MKCONFIG) $(@:_config=) ppc ppc4xx taihu amcc
MPC8568MDS_config: unconfig
@$(MKCONFIG) $(@:_config=) ppc mpc85xx mpc8568mds freescale
+MPC8569MDS_config: unconfig
+ @$(MKCONFIG) $(@:_config=) ppc mpc85xx mpc8569mds freescale
+
MPC8572DS_36BIT_config \
MPC8572DS_config: unconfig
@mkdir -p $(obj)include
fi
@$(MKCONFIG) -a MPC8572DS ppc mpc85xx mpc8572ds freescale
+P2020DS_36BIT_config \
+P2020DS_config: unconfig
+ @mkdir -p $(obj)include
+ @if [ "$(findstring _36BIT_,$@)" ] ; then \
+ echo "#define CONFIG_PHYS_64BIT" >>$(obj)include/config.h ; \
+ $(XECHO) "... enabling 36-bit physical addressing." ; \
+ fi
+ @$(MKCONFIG) -a P2020DS ppc mpc85xx p2020ds freescale
+
PM854_config: unconfig
@$(MKCONFIG) $(@:_config=) ppc mpc85xx pm854
sbc8641d_config: unconfig
@$(MKCONFIG) $(@:_config=) ppc mpc86xx sbc8641d
+XPEDITE5170_config: unconfig
+ @$(MKCONFIG) $(@:_config=) ppc mpc86xx xpedite5170 xes
+
#########################################################################
## 74xx/7xx Systems
#########################################################################
at91rm9200dk_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm920t at91rm9200dk atmel at91rm9200
+at91rm9200ek_config : unconfig
+ @$(MKCONFIG) $(@:_config=) arm arm920t at91rm9200ek atmel at91rm9200
+
cmc_pu2_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm920t cmc_pu2 NULL at91rm9200
at91sam9260ek_nandflash_config \
at91sam9260ek_dataflash_cs0_config \
at91sam9260ek_dataflash_cs1_config \
-at91sam9260ek_config : unconfig
- @mkdir -p $(obj)include
+at91sam9260ek_config \
+at91sam9g20ek_nandflash_config \
+at91sam9g20ek_dataflash_cs0_config \
+at91sam9g20ek_dataflash_cs1_config \
+at91sam9g20ek_config : unconfig
+ @mkdir -p $(obj)include
+ @if [ "$(findstring 9g20,$@)" ] ; then \
+ echo "#define CONFIG_AT91SAM9G20EK 1" >>$(obj)include/config.h ; \
+ $(XECHO) "... 9G20 Variant" ; \
+ else \
+ echo "#define CONFIG_AT91SAM9260EK 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" ; \
echo "#define CONFIG_SYS_USE_DATAFLASH_CS1 1" >>$(obj)include/config.h ; \
$(XECHO) "... with environment variable in SPI DATAFLASH CS1" ; \
fi;
- @$(MKCONFIG) -n at91sam9xeek -a at91sam9260ek arm arm926ejs at91sam9260ek atmel at91sam9
+ @$(MKCONFIG) -n at91sam9xeek -a at91sam9260ek arm arm926ejs at91sam9260ek atmel at91
at91sam9261ek_nandflash_config \
at91sam9261ek_dataflash_cs0_config \
fi;
@$(MKCONFIG) -a at91sam9261ek arm arm926ejs at91sam9261ek atmel at91
+at91sam9263ek_norflash_config \
+at91sam9263ek_norflash_boot_config \
at91sam9263ek_nandflash_config \
at91sam9263ek_dataflash_config \
at91sam9263ek_dataflash_cs0_config \
@if [ "$(findstring _nandflash,$@)" ] ; then \
echo "#define CONFIG_SYS_USE_NANDFLASH 1" >>$(obj)include/config.h ; \
$(XECHO) "... with environment variable in NAND FLASH" ; \
+ elif [ "$(findstring norflash,$@)" ] ; then \
+ echo "#define CONFIG_SYS_USE_NORFLASH 1" >>$(obj)include/config.h ; \
+ $(XECHO) "... with environment variable in NOR FLASH" ; \
else \
echo "#define CONFIG_SYS_USE_DATAFLASH 1" >>$(obj)include/config.h ; \
$(XECHO) "... with environment variable in SPI DATAFLASH CS0" ; \
fi;
+ @if [ "$(findstring norflash_boot,$@)" ] ; then \
+ echo "#define CONFIG_SYS_USE_BOOT_NORFLASH 1" >>$(obj)include/config.h ; \
+ $(XECHO) "... and boot from NOR FLASH" ; \
+ fi;
@$(MKCONFIG) -a at91sam9263ek arm arm926ejs at91sam9263ek atmel at91
at91sam9rlek_nandflash_config \
fi;
@$(MKCONFIG) -a at91sam9rlek arm arm926ejs at91sam9rlek atmel at91
+meesc_config : unconfig
+ @$(MKCONFIG) $(@:_config=) arm arm926ejs meesc esd at91
+
+pm9261_config : unconfig
+ @$(MKCONFIG) $(@:_config=) arm arm926ejs pm9261 ronetix at91
+
+pm9263_config : unconfig
+ @$(MKCONFIG) $(@:_config=) arm arm926ejs pm9263 ronetix at91
+
########################################################################
## ARM Integrator boards - see doc/README-integrator for more info.
integratorap_config \
ap920t_config \
ap926ejs_config \
ap946es_config: unconfig
- @board/armltd/integratorap/split_by_variant.sh $@
+ @board/armltd/integrator/split_by_variant.sh ap $@
integratorcp_config \
cp_config \
cp922_config \
cp922_XA10_config \
cp1026_config: unconfig
- @board/armltd/integratorcp/split_by_variant.sh $@
+ @board/armltd/integrator/split_by_variant.sh cp $@
davinci_dvevm_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs dvevm davinci davinci
davinci_sonata_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs sonata davinci davinci
+davinci_dm355evm_config : unconfig
+ @$(MKCONFIG) $(@:_config=) arm arm926ejs dm355evm davinci davinci
+
lpd7a400_config \
lpd7a404_config: unconfig
@$(MKCONFIG) $(@:_config=) arm lh7a40x lpd7a40x
netstar_config: unconfig
@$(MKCONFIG) $(@:_config=) arm arm925t netstar
-nmdk8815_config \
-nmdk8815_onenand_config: unconfig
+nhk8815_config \
+nhk8815_onenand_config: unconfig
@mkdir -p $(obj)include
@ > $(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 nmdk8815 arm arm926ejs nmdk8815 st nomadik
+ @$(MKCONFIG) -a nhk8815 arm arm926ejs nhk8815 st nomadik
omap1510inn_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm925t omap1510inn
@$(MKCONFIG) $(@:_config=) arm arm720t modnet50
evb4510_config : unconfig
- @$(MKCONFIG) $(@:_config=) arm arm720t evb4510
+ @$(MKCONFIG) $(@:_config=) arm arm720t evb4510 NULL s3c4510b
lpc2292sodimm_config: unconfig
@$(MKCONFIG) $(@:_config=) arm arm720t lpc2292sodimm NULL lpc2292
omap3_zoom1_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 zoom1 omap3 omap3
+omap3_zoom2_config : unconfig
+ @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 zoom2 omap3 omap3
+
#########################################################################
## XScale Systems
#########################################################################
pxa255_idp_config: unconfig
@$(MKCONFIG) $(@:_config=) arm pxa pxa255_idp
+polaris_config \
trizepsiv_config : unconfig
- @$(MKCONFIG) $(@:_config=) arm pxa trizepsiv
+ @mkdir -p $(obj)include
+ @if [ "$(findstring polaris,$@)" ] ; then \
+ echo "#define CONFIG_POLARIS 1" >>$(obj)include/config.h ; \
+ fi;
+ @$(MKCONFIG) -a trizepsiv arm pxa trizepsiv
wepep250_config : unconfig
@$(MKCONFIG) $(@:_config=) arm pxa wepep250
imx31_phycore_eet_config \
imx31_phycore_config : unconfig
+ @mkdir -p $(obj)include
@if [ -n "$(findstring _eet_,$@)" ]; then \
echo "#define CONFIG_IMX31_PHYCORE_EET" >> $(obj)include/config.h; \
fi
mx31ads_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm1136 mx31ads 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
#========================================================================
# Analog Devices boards
-BFIN_BOARDS = bf533-ezkit bf533-stamp bf537-stamp bf561-ezkit
+BFIN_BOARDS = bf518f-ezbrd bf526-ezbrd bf527-ezkit bf533-ezkit bf533-stamp \
+ bf537-pnav bf537-stamp bf538f-ezkit bf548-ezkit bf561-ezkit
+
+# Bluetechnix tinyboards
+BFIN_BOARDS += cm-bf527 cm-bf533 cm-bf537e cm-bf548 cm-bf561 tcm-bf537
+
+# Misc third party boards
+BFIN_BOARDS += bf537-minotaur bf537-srv1 blackstamp
+
+# I-SYST Micromodule
+BFIN_BOARDS += ibf-dsp561
$(BFIN_BOARDS:%=%_config) : unconfig
@$(MKCONFIG) $(@:_config=) blackfin blackfin $(@:_config=)
$(obj)board/netstar/{eeprom,crcek,crcit,*.srec,*.bin} \
$(obj)board/trab/trab_fkt $(obj)board/voiceblue/eeprom \
$(obj)board/armltd/{integratorap,integratorcp}/u-boot.lds \
- $(obj)board/{bf533-ezkit,bf533-stamp,bf537-stamp,bf561-ezkit}/u-boot.lds \
+ $(obj)lib_blackfin/u-boot.lds \
$(obj)cpu/blackfin/bootrom-asm-offsets.[chs]
@rm -f $(obj)include/bmp_logo.h
@rm -f $(obj)nand_spl/{u-boot-spl,u-boot-spl.map,System.map}
@rm -f $(obj)api_examples/demo $(TIMESTAMP_FILE) $(VERSION_FILE)
@find $(OBJTREE) -type f \
\( -name 'core' -o -name '*.bak' -o -name '*~' \
- -o -name '*.o' -o -name '*.a' \) -print \
+ -o -name '*.o' -o -name '*.a' -o -name '*.exe' \) -print \
| xargs rm -f
clobber: clean
@rm -f $(OBJS) $(obj)*.bak $(obj)ctags $(obj)etags $(obj)TAGS \
$(obj)cscope.* $(obj)*.*~
@rm -f $(obj)u-boot $(obj)u-boot.map $(obj)u-boot.hex $(ALL)
- @rm -f $(obj)tools/{crc32.c,env_embedded.c,env/crc32.c,md5.c,sha1.c,inca-swap-bytes}
- @rm -f $(obj)tools/{image.c,fdt.c,fdt_ro.c,fdt_rw.c,fdt_strerror.c,zlib.h}
- @rm -f $(obj)tools/{fdt_wip.c,libfdt_internal.h}
+ @rm -f $(obj)tools/{env/crc32.c,inca-swap-bytes}
@rm -f $(obj)cpu/mpc824x/bedbug_603e.c
@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