2 # (C) Copyright 2000-2006
3 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 # See file CREDITS for list of people who contributed to this
8 # This program is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU General Public License as
10 # published by the Free Software Foundation; either version 2 of
11 # the License, or (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
28 U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
29 VERSION_FILE = include/version_autogenerated.h
31 HOSTARCH := $(shell uname -m | \
39 HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \
40 sed -e 's/\(cygwin\).*/cygwin/')
42 export HOSTARCH HOSTOS
44 # Deal with colliding definitions from tcsh etc.
47 #########################################################################
49 TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
52 ifeq ($(COMPRESSED_UBOOT),1)
54 export export COMPRESSED_UBOOT
57 ifeq (include/config.mk,$(wildcard include/config.mk))
58 # load ARCH, BOARD, and CPU configuration
59 include include/config.mk
60 export ARCH CPU BOARD VENDOR SOC
62 ifeq ($(HOSTARCH),ppc)
66 CROSS_COMPILE = powerpc-linux-
69 CROSS_COMPILE = arm-linux-
72 ifeq ($(HOSTARCH),i386)
75 CROSS_COMPILE = i386-linux-
79 CROSS_COMPILE = mips-linux-
82 CROSS_COMPILE = nios-elf-
85 CROSS_COMPILE = nios2-elf-
88 CROSS_COMPILE = m68k-elf-
90 ifeq ($(ARCH),microblaze)
93 ifeq ($(ARCH),blackfin)
94 CROSS_COMPILE = bfin-elf-
101 # load other configuration
102 include $(TOPDIR)/config.mk
105 #########################################################################
106 # U-Boot objects....order is important (i.e. start must be first)
107 OBJS = cpu/$(CPU)/start.o
109 ifeq ($(COMPRESSED_UBOOT),1)
110 OBJS_BOOTSTRAP = cpu/$(CPU)/start_bootstrap.o
113 LIBS = lib_generic/libgeneric.a
114 LIBS += common/libcommon.a
115 LIBS += board/$(BOARDDIR)/lib$(BOARD).a
116 LIBS += cpu/$(CPU)/lib$(CPU).a
119 LIBS += cpu/$(CPU)/$(SOC)/lib$(SOC).a
122 LIBS += lib_$(ARCH)/lib$(ARCH).a
123 LIBS += drivers/libdrivers.a
126 LIBS += httpd/libhttpd.a
129 ifeq ($(COMPRESSED_UBOOT),1)
130 LIBS_BOOTSTRAP = lib_bootstrap/libbootstrap.a
131 LIBS_BOOTSTRAP += board/$(BOARDDIR)/lib$(BOARD).a
132 LIBS_BOOTSTRAP += cpu/$(CPU)/lib$(CPU).a
133 LIBS_BOOTSTRAP += cpu/$(CPU)/$(SOC)/lib$(SOC).a
138 ifeq ($(COMPRESSED_UBOOT),1)
139 .PHONY : $(LIBS_BOOTSTRAP)
143 PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
145 # The "tools" are needed early, so put this first
146 # Don't include stuff already done in $(LIBS)
151 #########################################################################
152 #########################################################################
154 ALL = u-boot.srec u-boot.bin System.map
156 ifeq ($(COMPRESSED_UBOOT),1)
157 all: $(ALL) tuboot.bin
163 $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@
166 $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@
169 $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
171 u-boot.img: u-boot.bin
172 ./tools/mkimage -A $(ARCH) -T firmware -C none \
173 -a $(TEXT_BASE) -e 0 \
174 -n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' $(VERSION_FILE) | \
175 sed -e 's/"[ ]*$$/ for $(BOARD) board"/') \
179 $(OBJDUMP) -d $< > $@
181 u-boot: depend version $(SUBDIRS) $(OBJS) $(LIBS) $(LDSCRIPT)
182 UNDEF_SYM=`$(OBJDUMP) -x $(LIBS) |sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
183 $(LD) $(LDFLAGS) $$UNDEF_SYM $(OBJS) \
184 --start-group $(LIBS) --end-group $(PLATFORM_LIBS) \
185 -Map u-boot.map -o u-boot
188 $(MAKE) -C `dirname $@`
193 ifeq ($(COMPRESSED_UBOOT),1)
194 LZMA = $(BUILD_TOPDIR)/host_util/lzma
196 tuboot.bin: System.map bootstrap.bin u-boot.lzimg
197 @cat bootstrap.bin > $@
198 @cat u-boot.lzimg >> $@
200 u-boot.lzimg: $(obj)u-boot.bin System.map
201 @rm -rf u-boot.bin.lzma
202 #$(LZMA) e $(obj)u-boot.bin u-boot.bin.lzma
203 $(LZMA) --best --keep $(obj)u-boot.bin
204 ./tools/mkimage -A mips -T firmware -C lzma \
205 -a 0x$(shell grep "T _start" $(TOPDIR)/System.map | awk '{ printf "%s", $$1 }') \
206 -e 0x$(shell grep "T _start" $(TOPDIR)/System.map | awk '{ printf "%s", $$1 }') \
207 -n 'u-boot image' -d $(obj)u-boot.bin.lzma $@
209 bootstrap.bin: bootstrap
210 $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
212 bootstrap: depend version $(SUBDIRS) $(OBJS_BOOTSTRAP) $(LIBS_BOOTSTRAP) $(LDSCRIPT_BOOTSTRAP)
213 UNDEF_SYM=`$(OBJDUMP) -x $(LIBS_BOOTSTRAP) |sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
214 $(LD) $(LDFLAGS_BOOTSTRAP) $$UNDEF_SYM $(OBJS_BOOTSTRAP) \
215 --start-group $(LIBS_BOOTSTRAP) --end-group $(PLATFORM_LIBS) \
216 -Map bootstrap.map -o bootstrap
219 $(MAKE) -C `dirname $@`
223 @echo -n "#define U_BOOT_VERSION \"U-Boot " > $(VERSION_FILE); \
224 echo -n "$(U_BOOT_VERSION)" >> $(VERSION_FILE); \
225 echo "\"" >> $(VERSION_FILE)
228 $(MAKE) -C tools/gdb || exit 1
231 @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir .depend ; done
234 ctags -w `find $(SUBDIRS) include \
235 lib_generic board/$(BOARDDIR) cpu/$(CPU) lib_$(ARCH) \
236 fs/cramfs fs/fat fs/fdos fs/jffs2 \
237 net disk rtc dtt drivers drivers/sk98lin common \
238 \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
241 etags -a `find $(SUBDIRS) include \
242 lib_generic board/$(BOARDDIR) cpu/$(CPU) lib_$(ARCH) \
243 fs/cramfs fs/fat fs/fdos fs/jffs2 \
244 net disk rtc dtt drivers drivers/sk98lin common \
245 \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
249 grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
252 #########################################################################
254 all install u-boot u-boot.srec depend dep:
255 @echo "System not configured - see README" >&2
259 #########################################################################
262 @rm -f include/config.h include/config.mk board/*/config.tmp
264 #========================================================================
266 #========================================================================
267 #########################################################################
268 ## MIPS32 AR7100 (24K)
269 #########################################################################
271 hornet_common_config :
273 @echo "#define CONFIG_AR7240 1" >> include/config.h
274 @echo "#define CONFIG_MACH_HORNET 1" >> include/config.h
275 @echo "#define CONFIG_HORNET_1_1_WAR 1" >> include/config.h
276 @echo "#define NEW_DDR_TAP_CAL 1" >> include/config.h
278 ifdef CONFIG_BOOTDELAY
279 @echo "#define CONFIG_BOOTDELAY "$(CONFIG_BOOTDELAY) >> include/config.h
282 @echo "#define CONFIG_DELAY_TO_AUTORUN_HTTPD 3" >> include/config.h
283 @echo "#define CONFIG_DELAY_TO_AUTORUN_CONSOLE 5" >> include/config.h
284 @echo "#define CONFIG_DELAY_TO_AUTORUN_NETCONSOLE 7" >> include/config.h
286 # max delay time for button pressing
287 @echo "#define CONFIG_MAX_BUTTON_PRESSING 10" >> include/config.h
289 # don't show info about console (in, out, err...)
290 @echo "#define CFG_CONSOLE_INFO_QUIET" >> include/config.h
292 wr703n_config : unconfig hornet_common_config
293 @echo '======= Configuring for TP-Link TL-WR703N at:' `date` '======='
294 @echo "#define CONFIG_FOR_TPLINK_WR703N_V1 1" >> include/config.h
295 @echo "#define GPIO_SYS_LED_BIT 27" >> include/config.h
296 @echo "#define GPIO_SYS_LED_ON 0" >> include/config.h
297 @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
298 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 4" >> include/config.h
299 @echo "#define BOARD_CUSTOM_STRING \"AP121 (AR9331) U-Boot for TL-WR703N\"" >> include/config.h
301 @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
303 wr720n_v3_CH_config : unconfig hornet_common_config
304 @echo '======= Configuring for TP-Link TL-WR720N v3 CH at:' `date` '======='
305 @echo "#define CONFIG_FOR_TPLINK_WR720N_V3 1" >> include/config.h
306 @echo "#define GPIO_SYS_LED_BIT 27" >> include/config.h
307 @echo "#define GPIO_SYS_LED_ON 0" >> include/config.h
308 @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
309 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 4" >> include/config.h
310 @echo "#define BOARD_CUSTOM_STRING \"AP121 (AR9331) U-Boot for TL-WR720N v3 CH\"" >> include/config.h
312 @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
314 wr710n_config : unconfig hornet_common_config
315 @echo '======= Configuring for TP-Link TL-WR710N at:' `date` '======='
316 @echo "#define CONFIG_FOR_TPLINK_WR710N_V1 1" >> include/config.h
317 @echo "#define GPIO_SYS_LED_BIT 27" >> include/config.h
318 @echo "#define GPIO_SYS_LED_ON 0" >> include/config.h
319 @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
320 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 8" >> include/config.h
321 @echo "#define BOARD_CUSTOM_STRING \"AP121 (AR9331) U-Boot for TL-WR710N\"" >> include/config.h
323 @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
325 mr3020_config : unconfig hornet_common_config
326 @echo '======= Configuring for TP-Link TL-MR3020 at:' `date` '======='
327 @echo "#define CONFIG_FOR_TPLINK_MR3020_V1 1" >> include/config.h
328 @echo "#define GPIO_INTERNET_LED_BIT 27" >> include/config.h
329 @echo "#define GPIO_INTERNET_LED_ON 0" >> include/config.h
330 @echo "#define GPIO_WPS_LED_BIT 26" >> include/config.h
331 @echo "#define GPIO_WPS_LED_ON 0" >> include/config.h
332 @echo "#define GPIO_WLAN_LED_BIT 0" >> include/config.h
333 @echo "#define GPIO_WLAN_LED_ON 1" >> include/config.h
334 @echo "#define GPIO_ETH_LED_BIT 17" >> include/config.h
335 @echo "#define GPIO_ETH_LED_ON 0" >> include/config.h
336 @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
337 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 4" >> include/config.h
338 @echo "#define BOARD_CUSTOM_STRING \"AP121 (AR9331) U-Boot for TL-MR3020\"" >> include/config.h
340 @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
342 mr3040_config : unconfig hornet_common_config
343 @echo '======= Configuring for TP-Link TL-MR3040 at:' `date` '======='
344 @echo "#define CONFIG_FOR_TPLINK_MR3040_V1V2 1" >> include/config.h
345 @echo "#define GPIO_INTERNET_LED_BIT 27" >> include/config.h
346 @echo "#define GPIO_INTERNET_LED_ON 0" >> include/config.h
347 @echo "#define GPIO_WLAN_LED_BIT 26" >> include/config.h
348 @echo "#define GPIO_WLAN_LED_ON 0" >> include/config.h
349 @echo "#define GPIO_ETH_LED_BIT 17" >> include/config.h
350 @echo "#define GPIO_ETH_LED_ON 0" >> include/config.h
351 @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
352 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 4" >> include/config.h
353 @echo "#define BOARD_CUSTOM_STRING \"AP121 (AR9331) U-Boot for TL-MR3040\"" >> include/config.h
355 @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
357 mr10u_config : unconfig hornet_common_config
358 @echo '======= Configuring for TP-Link TL-MR10U at:' `date` '======='
359 @echo "#define CONFIG_FOR_TPLINK_MR10U_V1 1" >> include/config.h
360 @echo "#define GPIO_SYS_LED_BIT 27" >> include/config.h
361 @echo "#define GPIO_SYS_LED_ON 0" >> include/config.h
362 @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
363 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 4" >> include/config.h
364 @echo "#define BOARD_CUSTOM_STRING \"AP121 (AR9331) U-Boot for TL-MR10U\"" >> include/config.h
366 @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
368 mr13u_config : unconfig hornet_common_config
369 @echo '======= Configuring for TP-Link TL-MR13U at:' `date` '======='
370 @echo "#define CONFIG_FOR_TPLINK_MR13U_V1 1" >> include/config.h
371 @echo "#define GPIO_SYS_LED_BIT 27" >> include/config.h
372 @echo "#define GPIO_SYS_LED_ON 0" >> include/config.h
373 @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
374 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 4" >> include/config.h
375 @echo "#define BOARD_CUSTOM_STRING \"AP121 (AR9331) U-Boot for TL-MR13U\"" >> include/config.h
377 @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
379 wr740n_v4_config : unconfig hornet_common_config
380 @echo '======= Configuring for TP-Link TL-WR740N v4 at:' `date` '======='
381 @echo "#define CONFIG_FOR_TPLINK_WR740N_V4 1" >> include/config.h
382 @echo "#define GPIO_SYS_LED_BIT 27" >> include/config.h
383 @echo "#define GPIO_SYS_LED_ON 0" >> include/config.h
384 @echo "#define GPIO_WLAN_LED_BIT 0" >> include/config.h
385 @echo "#define GPIO_WLAN_LED_ON 1" >> include/config.h
386 @echo "#define GPIO_LAN1_LED_BIT 14" >> include/config.h
387 @echo "#define GPIO_LAN1_LED_ON 1" >> include/config.h
388 @echo "#define GPIO_LAN2_LED_BIT 15" >> include/config.h
389 @echo "#define GPIO_LAN2_LED_ON 1" >> include/config.h
390 @echo "#define GPIO_LAN3_LED_BIT 16" >> include/config.h
391 @echo "#define GPIO_LAN3_LED_ON 1" >> include/config.h
392 @echo "#define GPIO_LAN4_LED_BIT 17" >> include/config.h
393 @echo "#define GPIO_LAN4_LED_ON 0" >> include/config.h
394 @echo "#define GPIO_INTERNET_LED_BIT 13" >> include/config.h
395 @echo "#define GPIO_INTERNET_LED_ON 1" >> include/config.h
396 @echo "#define GPIO_QSS_LED_BIT 1" >> include/config.h
397 @echo "#define GPIO_QSS_LED_ON 1" >> include/config.h
398 @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
399 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 4" >> include/config.h
400 @echo "#define BOARD_CUSTOM_STRING \"AP121 (AR9331) U-Boot for TL-WR74xN/D v4\"" >> include/config.h
402 @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
404 mr3220_v2_config : unconfig hornet_common_config
405 @echo '======= Configuring for TP-Link TL-MR3220 v2 at:' `date` '======='
406 @echo "#define CONFIG_FOR_TPLINK_MR3220_V2 1" >> include/config.h
407 @echo "#define GPIO_SYS_LED_BIT 27" >> include/config.h
408 @echo "#define GPIO_SYS_LED_ON 0" >> include/config.h
409 @echo "#define GPIO_WLAN_LED_BIT 0" >> include/config.h
410 @echo "#define GPIO_WLAN_LED_ON 1" >> include/config.h
411 @echo "#define GPIO_LAN1_LED_BIT 14" >> include/config.h
412 @echo "#define GPIO_LAN1_LED_ON 1" >> include/config.h
413 @echo "#define GPIO_LAN2_LED_BIT 15" >> include/config.h
414 @echo "#define GPIO_LAN2_LED_ON 1" >> include/config.h
415 @echo "#define GPIO_LAN3_LED_BIT 16" >> include/config.h
416 @echo "#define GPIO_LAN3_LED_ON 1" >> include/config.h
417 @echo "#define GPIO_LAN4_LED_BIT 17" >> include/config.h
418 @echo "#define GPIO_LAN4_LED_ON 0" >> include/config.h
419 @echo "#define GPIO_INTERNET_LED_BIT 13" >> include/config.h
420 @echo "#define GPIO_INTERNET_LED_ON 1" >> include/config.h
421 @echo "#define GPIO_QSS_LED_BIT 1" >> include/config.h
422 @echo "#define GPIO_QSS_LED_ON 1" >> include/config.h
423 @echo "#define GPIO_USB_LED_BIT 26" >> include/config.h
424 @echo "#define GPIO_USB_LED_ON 1" >> include/config.h
425 @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
426 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 4" >> include/config.h
427 @echo "#define BOARD_CUSTOM_STRING \"AP121 (AR9331) U-Boot for TL-MR3220 v2\"" >> include/config.h
429 @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
431 dir505_config : unconfig hornet_common_config
432 @echo '======= Configuring for D-Link DIR-505 at:' `date` '======='
433 @echo "#define CONFIG_FOR_DLINK_DIR505_A1 1" >> include/config.h
434 @echo "#define GPIO_SYS_LED_BIT 27" >> include/config.h
435 @echo "#define GPIO_SYS_LED_ON 0" >> include/config.h
437 # we will use WPS button instead of reset
438 @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
439 @echo "#define GPIO_RST_BUTTON_IS_ACTIVE_LOW 1" >> include/config.h
441 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 8" >> include/config.h
442 @echo "#define BOARD_CUSTOM_STRING \"AP121 (AR9331) U-Boot for DIR-505\"" >> include/config.h
444 @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
446 carambola2_config : unconfig hornet_common_config
447 @echo '======= Configuring for 8devices Carambola 2 at:' `date` '======='
448 @echo "#define CONFIG_FOR_8DEVICES_CARAMBOLA2 1" >> include/config.h
450 # Carambola 2 uses uncompressed version
451 @echo "#undef COMPRESSED_UBOOT" >> include/config.h
453 # Carambola 2 uses 40 MHz oscillator
454 @echo "#define CONFIG_40MHZ_XTAL_SUPPORT 1" >> include/config.h
456 @echo "#define GPIO_WLAN_LED_BIT 0" >> include/config.h
457 @echo "#define GPIO_WLAN_LED_ON 0" >> include/config.h
458 @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
460 # Carambola 2 development board has RST button pulled up, so it is active at low
461 @echo "#define GPIO_RST_BUTTON_IS_ACTIVE_LOW 1" >> include/config.h
463 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 16" >> include/config.h
464 @echo "#define BOARD_CUSTOM_STRING \"AP121 (AR9331) U-Boot for CARAMBOLA2 v1\"" >> include/config.h
466 @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
468 db12x_config : unconfig
469 @echo '======= Configuring for TP-Link TL-WDR3600/43x0 at:' `date` '======='
471 @echo "#define CONFIG_WASP_SUPPORT 1" >> include/config.h
472 @echo "#undef CFG_ATHRS26_PHY" >> include/config.h
473 @echo "#define DDR2_32BIT_SUPPORT 1" >> include/config.h
474 @echo "#define CONFIG_AG7240_GE0_IS_CONNECTED 1" >> include/config.h
475 @echo "#define CONFIG_AR7240 1" >> include/config.h
476 @echo "#define CONFIG_WASP 1" >> include/config.h
478 ifdef CONFIG_BOOTDELAY
479 @echo "#define CONFIG_BOOTDELAY "$(CONFIG_BOOTDELAY) >> include/config.h
482 @echo "#define CONFIG_DELAY_TO_AUTORUN_HTTPD 3" >> include/config.h
483 @echo "#define CONFIG_DELAY_TO_AUTORUN_CONSOLE 5" >> include/config.h
484 @echo "#define CONFIG_DELAY_TO_AUTORUN_NETCONSOLE 7" >> include/config.h
486 # max delay time for button pressing
487 @echo "#define CONFIG_MAX_BUTTON_PRESSING 10" >> include/config.h
489 # don't show info about console (in, out, err...)
490 @echo "#define CFG_CONSOLE_INFO_QUIET" >> include/config.h
492 @echo "#define CONFIG_ATHRS17_PHY 1" >> include/config.h
493 @echo "#define CFG_AG7240_NMACS 1" >> include/config.h
494 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 8" >> include/config.h
495 @echo "#define BOARD_CUSTOM_STRING \"DB120 (AR9344) U-Boot for TL-WDR3600/43x0\"" >> include/config.h
497 @./mkconfig -a db12x mips mips db12x ar7240 ar7240
499 #########################################################################
500 #########################################################################
501 #########################################################################
506 \( -name 'core' -o -name '*.bak' -o -name '*~' \
507 -o -name '*.o' -o -name '*.a' -o -name .depend \) -print \
509 @rm -f tools/mkimage tools/envcrc
510 @rm -f lib_bootstrap/*.o
511 @rm -f lib_bootstrap/*.a
512 @rm -f bootstrap bootstrap.bin tuboot.bin u-boot.lzimg u-boot.bin.lzma bootstrap.map
516 @find . -type f \( -name .depend \
517 -o -name '*.srec' -o -name '*.bin' -o -name u-boot.img \) \
520 @rm -f $(OBJS) *.bak tags TAGS include/version_autogenerated.h
522 @rm -f u-boot u-boot.map u-boot.hex $(ALL)
523 @rm -f tools/crc32.c tools/environment.c
524 @rm -f cpu/mpc824x/bedbug_603e.c
525 @rm -f include/asm/proc include/asm/arch include/asm
528 distclean: clobber unconfig
531 F=`basename $(TOPDIR)` ; cd .. ; \
532 gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
534 #########################################################################