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,
27 EXTRAVERSION = -$(shell git rev-parse --short=8 HEAD)
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 ifdef COMPRESSED_UBOOT
53 ifndef CONFIG_SKIP_LOWLEVEL_INIT
55 export export COMPRESSED_UBOOT
59 ifeq (include/config.mk,$(wildcard include/config.mk))
60 # load ARCH, BOARD, and CPU configuration
61 include include/config.mk
62 export ARCH CPU BOARD VENDOR SOC
64 ifeq ($(HOSTARCH),ppc)
68 CROSS_COMPILE = powerpc-linux-
71 CROSS_COMPILE = arm-linux-
74 ifeq ($(HOSTARCH),i386)
77 CROSS_COMPILE = i386-linux-
81 CROSS_COMPILE = mips-linux-
84 CROSS_COMPILE = nios-elf-
87 CROSS_COMPILE = nios2-elf-
90 CROSS_COMPILE = m68k-elf-
92 ifeq ($(ARCH),microblaze)
95 ifeq ($(ARCH),blackfin)
96 CROSS_COMPILE = bfin-elf-
103 # load other configuration
104 include $(TOPDIR)/config.mk
107 #########################################################################
108 # U-Boot objects....order is important (i.e. start must be first)
109 OBJS = cpu/$(CPU)/start.o
111 ifdef COMPRESSED_UBOOT
112 ifndef CONFIG_SKIP_LOWLEVEL_INIT
113 OBJS_BOOTSTRAP = cpu/$(CPU)/start_bootstrap.o
117 LIBS = lib_generic/libgeneric.a
118 LIBS += common/libcommon.a
119 LIBS += board/$(BOARDDIR)/lib$(BOARD).a
120 LIBS += cpu/$(CPU)/lib$(CPU).a
123 LIBS += cpu/$(CPU)/$(SOC)/lib$(SOC).a
126 LIBS += lib_$(ARCH)/lib$(ARCH).a
127 LIBS += drivers/libdrivers.a
130 LIBS += httpd/libhttpd.a
133 ifdef COMPRESSED_UBOOT
134 ifndef CONFIG_SKIP_LOWLEVEL_INIT
135 LIBS_BOOTSTRAP = lib_bootstrap/libbootstrap.a
136 LIBS_BOOTSTRAP += board/$(BOARDDIR)/lib$(BOARD).a
137 LIBS_BOOTSTRAP += cpu/$(CPU)/lib$(CPU).a
138 LIBS_BOOTSTRAP += cpu/$(CPU)/$(SOC)/lib$(SOC).a
144 ifdef COMPRESSED_UBOOT
145 ifndef CONFIG_SKIP_LOWLEVEL_INIT
146 .PHONY : $(LIBS_BOOTSTRAP)
151 PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
153 # The "tools" are needed early, so put this first
154 # Don't include stuff already done in $(LIBS)
159 #########################################################################
160 #########################################################################
162 ALL = u-boot.srec u-boot.bin System.map
164 ifdef COMPRESSED_UBOOT
165 ifndef CONFIG_SKIP_LOWLEVEL_INIT
166 all: $(ALL) tuboot.bin
168 all: $(ALL) u-boot.img
171 all: $(ALL) u-boot.img
175 $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@
178 $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@
181 $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
183 u-boot.img: u-boot.bin
184 @/bin/echo -e "\e[32m> Preparing U-Boot image \"u-boot.img\"...\e[0m"
185 ./tools/mkimage -A $(ARCH) -T firmware -C none \
186 -a $(TEXT_BASE) -e 0 \
187 -n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' $(VERSION_FILE) | \
188 sed -e 's/"[ ]*$$/ for $(BOARD) board"/') \
192 $(OBJDUMP) -d $< > $@
194 u-boot: depend version $(SUBDIRS) $(OBJS) $(LIBS) $(LDSCRIPT)
195 UNDEF_SYM=`$(OBJDUMP) -x $(LIBS) |sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
196 $(LD) $(LDFLAGS) $$UNDEF_SYM $(OBJS) \
197 --start-group $(LIBS) --end-group $(PLATFORM_LIBS) \
198 -Map u-boot.map -o u-boot
201 $(MAKE) -C `dirname $@`
206 ifdef COMPRESSED_UBOOT
207 ifndef CONFIG_SKIP_LOWLEVEL_INIT
208 LZMA = $(BUILD_TOPDIR)/host_util/lzma
210 tuboot.bin: System.map bootstrap.bin u-boot.lzimg
211 @cat bootstrap.bin > $@
212 @cat u-boot.lzimg >> $@
214 u-boot.lzimg: $(obj)u-boot.bin System.map
215 @rm -rf u-boot.bin.lzma
216 $(LZMA) --best --keep $(obj)u-boot.bin
217 @/bin/echo -e "\e[32m> Preparing compressed U-Boot image \"u-boot.lzimg\"...\e[0m"
218 ./tools/mkimage -A mips -T firmware -C lzma \
219 -a 0x$(shell grep "T _start" $(TOPDIR)/System.map | awk '{ printf "%s", $$1 }') \
220 -e 0x$(shell grep "T _start" $(TOPDIR)/System.map | awk '{ printf "%s", $$1 }') \
221 -n 'u-boot image' -d $(obj)u-boot.bin.lzma $@
223 bootstrap.bin: bootstrap
224 $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
226 bootstrap: depend version $(SUBDIRS) $(OBJS_BOOTSTRAP) $(LIBS_BOOTSTRAP) $(LDSCRIPT_BOOTSTRAP)
227 UNDEF_SYM=`$(OBJDUMP) -x $(LIBS_BOOTSTRAP) |sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
228 $(LD) $(LDFLAGS_BOOTSTRAP) $$UNDEF_SYM $(OBJS_BOOTSTRAP) \
229 --start-group $(LIBS_BOOTSTRAP) --end-group $(PLATFORM_LIBS) \
230 -Map bootstrap.map -o bootstrap
233 $(MAKE) -C `dirname $@`
238 @echo -n "#define U_BOOT_VERSION \"U-Boot " > $(VERSION_FILE); \
239 echo -n "$(U_BOOT_VERSION)" >> $(VERSION_FILE); \
240 echo "\"" >> $(VERSION_FILE)
243 $(MAKE) -C tools/gdb || exit 1
246 @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir .depend ; done
249 ctags -w `find $(SUBDIRS) include \
250 lib_generic board/$(BOARDDIR) cpu/$(CPU) lib_$(ARCH) \
251 fs/cramfs fs/fat fs/fdos fs/jffs2 \
252 net disk rtc dtt drivers drivers/sk98lin common \
253 \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
256 etags -a `find $(SUBDIRS) include \
257 lib_generic board/$(BOARDDIR) cpu/$(CPU) lib_$(ARCH) \
258 fs/cramfs fs/fat fs/fdos fs/jffs2 \
259 net disk rtc dtt drivers drivers/sk98lin common \
260 \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`
264 grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
267 #########################################################################
269 all install u-boot u-boot.srec depend dep:
270 @echo "System not configured - see README" >&2
274 #########################################################################
277 @rm -f include/config.h include/config.mk board/*/config.tmp
279 #========================================================================
281 #========================================================================
282 #########################################################################
283 ## MIPS32 AR7100 (24K)
284 #########################################################################
287 @echo "/* Temporary solution */" >> include/config.h
288 @echo "/* AR933x */" >> include/config.h
289 @echo "#define QCA_AR9330_SOC 0x00001" >> include/config.h
290 @echo "#define QCA_AR9331_SOC 0x00002" >> include/config.h
291 @echo "#define QCA_AR933X_SOC (QCA_AR9330_SOC | QCA_AR9331_SOC)" >> include/config.h
292 @echo "/* AR934x */" >> include/config.h
293 @echo "#define QCA_AR9341_SOC 0x00010" >> include/config.h
294 @echo "#define QCA_AR9342_SOC 0x00020" >> include/config.h
295 @echo "#define QCA_AR9344_SOC 0x00040" >> include/config.h
296 @echo "#define QCA_AR934X_SOC (QCA_AR9341_SOC | QCA_AR9342_SOC | QCA_AR9344_SOC)" >> include/config.h
297 @echo "/* QCA953x */" >> include/config.h
298 @echo "#define QCA_QCA9531_SOC 0x00100" >> include/config.h
299 @echo "#define QCA_QCA9533_SOC 0x00200" >> include/config.h
300 @echo "#define QCA_QCA953X_SOC (QCA_QCA9531_SOC | QCA_QCA9533_SOC)" >> include/config.h
301 @echo "/* QCA956x */" >> include/config.h
302 @echo "#define QCA_QCA9561_SOC 0x01000" >> include/config.h
303 @echo "#define QCA_QCA9563_SOC 0x02000" >> include/config.h
304 @echo "#define QCA_QCA956X_SOC (QCA_QCA9561_SOC | QCA_QCA9563_SOC)" >> include/config.h
305 @echo "/* QCA955x */" >> include/config.h
306 @echo "#define QCA_QCA9557_SOC 0x10000" >> include/config.h
307 @echo "#define QCA_QCA9558_SOC 0x20000" >> include/config.h
308 @echo "#define QCA_QCA955X_SOC (QCA_QCA9557_SOC | QCA_QCA9558_SOC)" >> include/config.h
309 @echo "" >> include/config.h
311 ifdef CONFIG_BOOTDELAY
312 @echo "#define CONFIG_BOOTDELAY "$(CONFIG_BOOTDELAY) >> include/config.h
315 ifdef CONFIG_MAX_UBOOT_SIZE_KB
316 @echo "#define CONFIG_MAX_UBOOT_SIZE_KB "$(CONFIG_MAX_UBOOT_SIZE_KB) >> include/config.h
320 @echo "#define CFG_PLL_FREQ "$(CFG_PLL_FREQ) >> include/config.h
323 ifdef DISABLE_CONSOLE_OUTPUT
324 @echo "#define CONFIG_SILENT_CONSOLE 1" >> include/config.h
327 ifdef CONFIG_SKIP_LOWLEVEL_INIT
328 @echo "#define CONFIG_SKIP_LOWLEVEL_INIT 1" >> include/config.h
329 @echo "#undef COMPRESSED_UBOOT" >> include/config.h
332 @echo "#define CONFIG_DELAY_TO_AUTORUN_HTTPD 3" >> include/config.h
333 @echo "#define CONFIG_DELAY_TO_AUTORUN_CONSOLE 5" >> include/config.h
334 @echo "#define CONFIG_DELAY_TO_AUTORUN_NETCONSOLE 7" >> include/config.h
336 # max delay time for button pressing
337 @echo "#define CONFIG_MAX_BUTTON_PRESSING 10" >> include/config.h
339 # don't show info about console (in, out, err...)
340 @echo "#define CFG_CONSOLE_INFO_QUIET" >> include/config.h
342 hornet_common_config : common_config
343 @echo "#define SOC_TYPE QCA_AR933X_SOC" >> include/config.h
344 @echo "#define CONFIG_MACH_HORNET 1" >> include/config.h
346 wr703n_config : unconfig hornet_common_config
347 @/bin/echo -e '\e[32m> Configuring for TP-Link TL-WR703N at:' `date` '\e[0m'
348 @echo "#define CONFIG_FOR_TPLINK_WR703N_V1 1" >> include/config.h
349 @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
350 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 4" >> include/config.h
351 @echo "#define BOARD_CUSTOM_STRING \"TP-Link TL-WR703N\"" >> include/config.h
353 @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
355 wr720n_v3_CH_config : unconfig hornet_common_config
356 @/bin/echo -e '\e[32m> Configuring for TP-Link TL-WR720N v3 CH at:' `date` '\e[0m'
357 @echo "#define CONFIG_FOR_TPLINK_WR720N_V3 1" >> include/config.h
358 @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
359 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 4" >> include/config.h
360 @echo "#define BOARD_CUSTOM_STRING \"TP-Link TL-WR720N v3 CH\"" >> include/config.h
362 @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
364 wr710n_config : unconfig hornet_common_config
365 @/bin/echo -e '\e[32m> Configuring for TP-Link TL-WR710N at:' `date` '\e[0m'
366 @echo "#define CONFIG_FOR_TPLINK_WR710N_V1 1" >> include/config.h
367 @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
368 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 8" >> include/config.h
369 @echo "#define BOARD_CUSTOM_STRING \"TP-Link TL-WR710N\"" >> include/config.h
371 @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
373 mr3020_config : unconfig hornet_common_config
374 @/bin/echo -e '\e[32m> Configuring for TP-Link TL-MR3020 at:' `date`.'\e[0m'
375 @echo "#define CONFIG_FOR_TPLINK_MR3020_V1 1" >> include/config.h
376 @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
377 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 4" >> include/config.h
378 @echo "#define BOARD_CUSTOM_STRING \"TP-Link TL-MR3020\"" >> include/config.h
380 @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
382 mr3040_config : unconfig hornet_common_config
383 @/bin/echo -e '\e[32m> Configuring for TP-Link TL-MR3040 at:' `date` '\e[0m'
384 @echo "#define CONFIG_FOR_TPLINK_MR3040_V1V2 1" >> include/config.h
385 @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
386 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 4" >> include/config.h
387 @echo "#define BOARD_CUSTOM_STRING \"TP-Link TL-MR3040\"" >> include/config.h
389 @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
391 mr10u_config : unconfig hornet_common_config
392 @/bin/echo -e '\e[32m> Configuring for TP-Link TL-MR10U at:' `date` '\e[0m'
393 @echo "#define CONFIG_FOR_TPLINK_MR10U_V1 1" >> include/config.h
394 @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
395 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 4" >> include/config.h
396 @echo "#define BOARD_CUSTOM_STRING \"TP-Link TL-MR10U\"" >> include/config.h
398 @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
400 mr13u_config : unconfig hornet_common_config
401 @/bin/echo -e '\e[32m> Configuring for TP-Link TL-MR13U at:' `date` '\e[0m'
402 @echo "#define CONFIG_FOR_TPLINK_MR13U_V1 1" >> include/config.h
403 @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
404 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 4" >> include/config.h
405 @echo "#define BOARD_CUSTOM_STRING \"TP-Link TL-MR13U\"" >> include/config.h
407 @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
409 wr740n_v4_config : unconfig hornet_common_config
410 @/bin/echo -e '\e[32m> Configuring for TP-Link TL-WR740N v4 at:' `date` '\e[0m'
411 @echo "#define CONFIG_FOR_TPLINK_WR740N_V4 1" >> include/config.h
412 @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
413 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 4" >> include/config.h
414 @echo "#define BOARD_CUSTOM_STRING \"TP-Link TL-WR74xN/D v4\"" >> include/config.h
416 @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
418 mr3220_v2_config : unconfig hornet_common_config
419 @/bin/echo -e '\e[32m> Configuring for TP-Link TL-MR3220 v2 at:' `date` '\e[0m'
420 @echo "#define CONFIG_FOR_TPLINK_MR3220_V2 1" >> include/config.h
421 @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
422 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 4" >> include/config.h
423 @echo "#define BOARD_CUSTOM_STRING \"TP-Link TL-MR3220 v2\"" >> include/config.h
425 @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
427 dir505_config : unconfig hornet_common_config
428 @/bin/echo -e '\e[32m> Configuring for D-Link DIR-505 at:' `date` '\e[0m'
429 @echo "#define CONFIG_FOR_DLINK_DIR505_A1 1" >> include/config.h
431 # we will use WPS button instead of reset
432 @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
433 @echo "#define GPIO_RST_BUTTON_IS_ACTIVE_LOW 1" >> include/config.h
435 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 8" >> include/config.h
436 @echo "#define BOARD_CUSTOM_STRING \"D-Link DIR-505\"" >> include/config.h
438 @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
440 gs_oolite_v1_dev_config : unconfig hornet_common_config
441 @/bin/echo -e '\e[32m> Configuring for GS-Oolite v1 with dev board at:' `date` '\e[0m'
442 @echo "#define CONFIG_FOR_GS_OOLITE_V1_DEV 1" >> include/config.h
443 @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
444 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 16" >> include/config.h
445 @echo "#define BOARD_CUSTOM_STRING \"Gainstrong GS-Oolite v1\"" >> include/config.h
447 @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
449 black_swift_board_config : unconfig hornet_common_config
450 @echo '======= Configuring for Black Swift board (128K compressed) at:' `date` '======='
451 @echo "#define CONFIG_FOR_BLACK_SWIFT_BOARD 1" >> include/config.h
452 @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
453 @echo "#define GPIO_RST_BUTTON_IS_ACTIVE_LOW 1" >> include/config.h
454 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 16" >> include/config.h
455 @echo "#define BOARD_CUSTOM_STRING \"Black Swift board\"" >> include/config.h
457 @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
459 carambola2_config : unconfig hornet_common_config
460 @/bin/echo -e '\e[32m> Configuring for 8devices Carambola 2 at:' `date` '\e[0m'
461 @echo "#define CONFIG_FOR_8DEVICES_CARAMBOLA2 1" >> include/config.h
463 # Carambola 2 uses uncompressed version
464 @echo "#undef COMPRESSED_UBOOT" >> include/config.h
466 # Carambola 2 uses 40 MHz oscillator
467 @echo "#define CONFIG_40MHZ_XTAL_SUPPORT 1" >> include/config.h
469 @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
470 @echo "#define GPIO_RST_BUTTON_IS_ACTIVE_LOW 1" >> include/config.h
472 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 16" >> include/config.h
473 @echo "#define BOARD_CUSTOM_STRING \"8devices Carambola2 v1\"" >> include/config.h
475 @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
477 dragino_v2_ms14_config : unconfig hornet_common_config
478 @/bin/echo -e '\e[32m> Configuring for Dragino Dragino v2 (MS14) at:' `date` '\e[0m'
479 @echo "#define CONFIG_FOR_DRAGINO_V2 1" >> include/config.h
480 @echo "#undef COMPRESSED_UBOOT" >> include/config.h
481 @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
482 @echo "#define GPIO_RST_BUTTON_IS_ACTIVE_LOW 1" >> include/config.h
483 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 16" >> include/config.h
484 @echo "#define WEBFAILSAFE_DISABLE_ART_UPGRADE 1" >> include/config.h
485 @echo "#define WEBFAILSAFE_DISABLE_UBOOT_UPGRADE 1" >> include/config.h
486 @echo "#define BOARD_CUSTOM_STRING \"Dragino v2 MS14\"" >> include/config.h
488 @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
490 villagetelco_mp2_config : unconfig hornet_common_config
491 @/bin/echo -e '\e[32m> Configuring for Village Telco Mesh Potato 2 at:' `date` '\e[0m'
492 @echo "#define CONFIG_FOR_MESH_POTATO_V2 1" >> include/config.h
493 @echo "#undef COMPRESSED_UBOOT" >> include/config.h
494 @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
495 @echo "#define GPIO_RST_BUTTON_IS_ACTIVE_LOW 1" >> include/config.h
496 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 16" >> include/config.h
497 @echo "#define WEBFAILSAFE_DISABLE_ART_UPGRADE 1" >> include/config.h
498 @echo "#define WEBFAILSAFE_DISABLE_UBOOT_UPGRADE 1" >> include/config.h
499 @echo "#define BOARD_CUSTOM_STRING \"Village Telco Mesh Potato 2\"" >> include/config.h
501 @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
503 gl-inet_config : unconfig hornet_common_config
504 @/bin/echo -e '\e[32m> Configuring for GL.iNet at:' `date` '\e[0m'
505 @echo "#define CONFIG_FOR_GL_INET 1" >> include/config.h
506 @echo "#define GPIO_RST_BUTTON_BIT 11" >> include/config.h
507 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 8" >> include/config.h
508 @echo "#define BOARD_CUSTOM_STRING \"GL.iNet\"" >> include/config.h
510 @./mkconfig -a ap121 mips mips ap121 ar7240 ar7240
512 wasp_common_config : common_config
513 @echo "#define CONFIG_WASP 1" >> include/config.h
514 @echo "#define CONFIG_WASP_SUPPORT 1" >> include/config.h
516 wdr3600_43x0_config : unconfig wasp_common_config
517 @/bin/echo -e '\e[32m> Configuring for TP-Link TL-WDR3600/43x0 at:' `date` '\e[0m'
518 @echo "#define SOC_TYPE QCA_AR9344_SOC" >> include/config.h
519 @echo "#define CONFIG_FOR_TPLINK_WDR3600_WDR43X0_V1 1" >> include/config.h
520 @echo "#define DDR2_32BIT_SUPPORT 1" >> include/config.h
521 @echo "#define CFG_ATHRS17_PHY 1" >> include/config.h
522 @echo "#define CFG_AG7240_NMACS 1" >> include/config.h
523 @echo "#define CFG_DUAL_PHY_SUPPORT 1" >> include/config.h
524 @echo "#define GPIO_RST_BUTTON_BIT 16" >> include/config.h
525 @echo "#define GPIO_RST_BUTTON_IS_ACTIVE_LOW 1" >> include/config.h
526 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 8" >> include/config.h
527 @echo "#define BOARD_CUSTOM_STRING \"TP-Link TL-WDR3600/43x0\"" >> include/config.h
529 @./mkconfig -a db12x mips mips db12x ar7240 ar7240
531 wdr3500_config : unconfig wasp_common_config
532 @/bin/echo -e '\e[32m> Configuring for TP-Link TL-WDR3500 at:' `date` '\e[0m'
533 @echo "#define SOC_TYPE QCA_AR9344_SOC" >> include/config.h
534 @echo "#define CONFIG_FOR_TPLINK_WDR3500_V1 1" >> include/config.h
535 @echo "#define DDR2_32BIT_SUPPORT 1" >> include/config.h
536 @echo "#define CFG_ATHRS27_PHY 1" >> include/config.h
537 @echo "#define CFG_AG7240_NMACS 2" >> include/config.h
538 @echo "#define GPIO_RST_BUTTON_BIT 16" >> include/config.h
539 @echo "#define GPIO_RST_BUTTON_IS_ACTIVE_LOW 1" >> include/config.h
540 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 8" >> include/config.h
541 @echo "#define BOARD_CUSTOM_STRING \"TP-Link TL-WDR3500\"" >> include/config.h
543 @./mkconfig -a db12x mips mips db12x ar7240 ar7240
545 mr3420_v2_config : unconfig wasp_common_config
546 @/bin/echo -e '\e[32m> Configuring for TP-Link TL-MR3420 v2 at:' `date` '\e[0m'
547 @echo "#define SOC_TYPE QCA_AR9341_SOC" >> include/config.h
548 @echo "#define CONFIG_FOR_TPLINK_MR3420_V2 1" >> include/config.h
549 @echo "#define CONFIG_AP123 1" >> include/config.h
550 @echo "#define DDR2_32BIT_SUPPORT 1" >> include/config.h
551 @echo "#define CFG_ATHRS27_PHY 1" >> include/config.h
552 @echo "#define CFG_AG7240_NMACS 2" >> include/config.h
553 @echo "#define GPIO_RST_BUTTON_BIT 17" >> include/config.h
554 @echo "#define GPIO_RST_BUTTON_IS_ACTIVE_LOW 1" >> include/config.h
555 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 4" >> include/config.h
556 @echo "#define BOARD_CUSTOM_STRING \"TP-Link TL-MR3420 v2\"" >> include/config.h
558 @./mkconfig -a db12x mips mips db12x ar7240 ar7240
560 wr841n_v8_config : unconfig wasp_common_config
561 @/bin/echo -e '\e[32m> Configuring for TP-Link TL-WR841N/D v8 at:' `date` '\e[0m'
562 @echo "#define SOC_TYPE QCA_AR9341_SOC" >> include/config.h
563 @echo "#define CONFIG_FOR_TPLINK_WR841N_V8 1" >> include/config.h
564 @echo "#define CONFIG_AP123 1" >> include/config.h
565 @echo "#define DDR2_32BIT_SUPPORT 1" >> include/config.h
566 @echo "#define CFG_ATHRS27_PHY 1" >> include/config.h
567 @echo "#define CFG_AG7240_NMACS 2" >> include/config.h
568 @echo "#define GPIO_RST_BUTTON_BIT 17" >> include/config.h
569 @echo "#define GPIO_RST_BUTTON_IS_ACTIVE_LOW 1" >> include/config.h
570 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 4" >> include/config.h
571 @echo "#define BOARD_CUSTOM_STRING \"TP-Link TL-WR841N/D v8\"" >> include/config.h
573 @./mkconfig -a db12x mips mips db12x ar7240 ar7240
575 wa830re_v2_wa801nd_v2_config : unconfig wasp_common_config
576 @/bin/echo -e '\e[32m> Configuring for TP-Link TL-WA830RE/TL-WA801ND v2 at:' `date` '\e[0m'
577 @echo "#define SOC_TYPE QCA_AR9341_SOC" >> include/config.h
578 @echo "#define CONFIG_FOR_TPLINK_WA830RE_V2_WA801ND_V2 1" >> include/config.h
579 @echo "#define CONFIG_AP123 1" >> include/config.h
580 @echo "#define DDR2_32BIT_SUPPORT 1" >> include/config.h
581 @echo "#define CFG_ATHRS27_PHY 1" >> include/config.h
582 @echo "#define CFG_AG7240_NMACS 2" >> include/config.h
583 @echo "#define GPIO_RST_BUTTON_BIT 17" >> include/config.h
584 @echo "#define GPIO_RST_BUTTON_IS_ACTIVE_LOW 1" >> include/config.h
585 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 4" >> include/config.h
586 @echo "#define BOARD_CUSTOM_STRING \"TP-Link TL-WA830RE/TL-WA801ND v2\"" >> include/config.h
588 @./mkconfig -a db12x mips mips db12x ar7240 ar7240
590 ap143_common_config : common_config
591 @echo "#define CONFIG_ATHEROS 1" >> include/config.h
592 @echo "#define CONFIG_MACH_QCA953x 1" >> include/config.h
594 tplink_wr820n_CH_config : unconfig ap143_common_config
595 @/bin/echo -e '\e[32m> Configuring for TP-Link TL-WR820N CH at:' `date` '\e[0m'
596 @echo "#define SOC_TYPE QCA_QCA953X_SOC" >> include/config.h
597 @echo "#define CONFIG_FOR_TPLINK_WR820N_CH 1" >> include/config.h
598 @echo "#define CFG_ATHRS27_PHY 1" >> include/config.h
599 @echo "#define CFG_ATH_GMAC_NMACS 2" >> include/config.h
600 @echo "#define DEFAULT_FLASH_SIZE_IN_MB 4" >> include/config.h
601 @echo "#define GPIO_RST_BUTTON_BIT 12" >> include/config.h
602 @echo "#define GPIO_RST_BUTTON_IS_ACTIVE_LOW 1" >> include/config.h
603 @echo "#define BOARD_CUSTOM_STRING \"TP-Link TL-WR820N CH\"" >> include/config.h
604 @echo "#define CFG_PLL_FREQ CFG_PLL_400_400_200" >> include/config.h
606 @./mkconfig -a ap143 mips mips ap143 ar7240 ar7240
608 #########################################################################
609 #########################################################################
610 #########################################################################
613 @/bin/echo -e "\e[32m> Making $@...\e[0m"
615 \( -name 'core' -o -name '*.bak' -o -name '*~' \
616 -o -name '*.o' -o -name '*.a' -o -name .depend \) -print \
618 @rm -f tools/mkimage tools/envcrc
619 @rm -f lib_bootstrap/*.o
620 @rm -f lib_bootstrap/*.a
621 @rm -f bootstrap bootstrap.bin tuboot.bin u-boot.lzimg u-boot.bin.lzma bootstrap.map
624 @/bin/echo -e "\e[32m> Making $@...\e[0m"
625 @find . -type f \( -name .depend \
626 -o -name '*.srec' -o -name '*.bin' -o -name u-boot.img \) \
629 @rm -f $(OBJS) *.bak tags TAGS include/version_autogenerated.h
631 @rm -f u-boot u-boot.map u-boot.hex $(ALL)
632 @rm -f tools/crc32.c tools/environment.c
633 @rm -f cpu/mpc824x/bedbug_603e.c
634 @rm -f include/asm/proc include/asm/arch include/asm
637 distclean: clobber unconfig
640 F=`basename $(TOPDIR)` ; cd .. ; \
641 gtar --force-local -zcvf `date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
643 #########################################################################