1c02897fa47adc14a792a61b5591515abdf57f1f
[oweals/u-boot_mod.git] / u-boot / Makefile
1 #
2 # Copyright (C) 2016 Piotr Dymacz <piotr@dymacz.pl>
3 #
4 # (C) Copyright 2000-2006 Wolfgang Denk,
5 # DENX Software Engineering, wd@denx.de.
6 #
7 # SPDX-License-Identifier: GPL-2.0
8 #
9
10 VERSION      = 1
11 PATCHLEVEL   = 1
12 SUBLEVEL     = 4
13 EXTRAVERSION = -$(shell git rev-parse --short=8 HEAD)
14 ISREPODIRTY  = $(shell if git diff-files | read dummy; then echo 1; else echo 0; fi)
15 VERSION_FILE = include/version_autogenerated.h
16
17 MKCONFIG = $(BUILD_TOPDIR)/u-boot/mkconfig
18 MKIMAGE  = $(BUILD_TOPDIR)/u-boot/tools/mkimage
19 LZMA     = $(BUILD_TOPDIR)/host_util/lzma/lzma
20
21 # Show in version string if we are not building from clean repository
22 ifeq ($(ISREPODIRTY),1)
23   U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)"-dirty"
24 else
25   U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)"-clean"
26 endif
27
28 # ===============================================================
29
30 TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
31 export TOPDIR
32
33 # Some variables passed as arguments in cmd
34 ifneq ($(IMG_SIZE),)
35   CONFIG_MAX_UBOOT_SIZE = $(IMG_SIZE)
36   export CONFIG_MAX_UBOOT_SIZE
37 endif
38
39 ifeq ($(IMG_LZMA),1)
40   COMPRESSED_UBOOT = 1
41   export COMPRESSED_UBOOT
42 endif
43
44 ifeq ($(IMG_RAM),1)
45   CONFIG_SKIP_LOWLEVEL_INIT = 1
46   export CONFIG_SKIP_LOWLEVEL_INIT
47 endif
48
49 ifneq ($(DEVICE_VENDOR),)
50   DEVICE_VENDOR = $(DEVICE_VENDOR)
51   export DEVICE_VENDOR
52 endif
53
54 # Never use LZMA compression
55 # for a RAM version of image
56 ifdef CONFIG_SKIP_LOWLEVEL_INIT
57   unexport COMPRESSED_UBOOT
58   COMPRESSED_UBOOT =
59 endif
60
61 ifndef CROSS_COMPILE
62   $(error "CROSS_COMPILE is not defined!")
63 endif
64 export CROSS_COMPILE
65
66 ifndef STAGING_DIR
67   $(error "STAGING_DIR is not defined!")
68 endif
69 export STAGING_DIR
70
71 # Endianness
72 ifndef ENDIANNESS
73   ENDIANNESS=-EB
74 endif
75 export ENDIANNESS
76
77 # =======================
78 # CUSTOM HELPER FUNCTIONS
79 # =======================
80
81 define echo_green
82   echo -e "\e[92m$(1)\e[0m"
83 endef
84
85 define echo_red
86   echo -e "\e[91m$(1)\e[0m"
87 endef
88
89 define echo_yellow
90   echo -e "\e[93m$(1)\e[0m"
91 endef
92
93 define ih_name
94 U-Boot $(strip $(subst ",,$(U_BOOT_VERSION)))
95 endef
96
97 # $(1): name
98 # $(2): path
99 define echo_size
100 @echo "$(1): `wc -c < $(strip $(2))` Bytes"
101 endef
102
103 # $(1): define name
104 # $(2): define value
105 define define_add
106   len=$$((5 - ($$(expr length $(1))/8))); \
107   tab=`printf '%*s' "$$len" | tr ' ' "\t"`; \
108   echo -ne "#define $(strip $(1))$${tab}" >> include/config.h; \
109   echo -e  '$(strip $(2))' >> include/config.h
110 endef
111
112 # $(1): define name
113 define undef_add
114   echo -e '#undef $(strip $(1))' >> include/config.h
115 endef
116
117 # $(1): path
118 define include_add
119   echo -e '#include <$(strip $(1))>' >> include/config.h
120 endef
121
122 # $(1): name
123 define board_name
124 $(if $(1),$(strip $(1)),OEM/Unknown)
125 endef
126
127 # $(1): size
128 define flash_size
129 $(if $(1),$(strip $(1)),4)
130 endef
131
132 # $(1): vendor, board name/model
133 # $(2): hostname
134 # $(3): default FLASH size in MB
135 # $(4): reset button GPIO number
136 # $(5): 1 if reset button is active low
137 # $(6): SOC_TYPE
138 define config_init
139   $(call echo_green,Preparing configuration for target: $@)
140   echo
141
142   $(call echo_yellow,  Device vendor/model:\t$(call board_name,$(1)))
143   $(if $(DEVICE_VENDOR), \
144     $(call echo_yellow,  Custom recovery web:\tyes ($(DEVICE_VENDOR))), \
145     $(call echo_yellow,  Custom recovery web:\tno) \
146   )
147
148   $(if $(CONFIG_MAX_UBOOT_SIZE), \
149     $(call echo_yellow,  Image size limit:\t$$(($(CONFIG_MAX_UBOOT_SIZE) / 1024)) KB),
150     $(call echo_yellow,  Image size limit:\tnot specified)
151   )
152
153   $(call echo_yellow,  Default FLASH size:\t$(call flash_size,$(3)) MB)
154
155   $(if $(4),
156     $(call echo_yellow,  GPIO reset button:\t$(strip $(4))), \
157     $(call echo_yellow,  GPIO reset button:\tnot specified) \
158   )
159
160   $(if $(5),
161     $(if $(filter $(5),1),
162       $(call echo_yellow,  Button active low:\tyes), \
163       $(call echo_yellow,  Button active low:\tno) \
164     ), \
165     $(call echo_yellow,  Button active low:\tn/a) \
166   )
167
168   $(if $(filter $(COMPRESSED_UBOOT),1), \
169     $(call echo_yellow,  LZMA compression:\tyes), \
170     $(call echo_yellow,  LZMA compression:\tno) \
171   )
172
173   $(if $(filter $(CONFIG_SKIP_LOWLEVEL_INIT),1), \
174     $(call echo_yellow,  RAM-loadable only:\tyes), \
175     $(call echo_yellow,  RAM-loadable only:\tno) \
176   )
177
178   $(if $(2),$(call define_add,CONFIG_HOSTNAME,u-boot_$(strip $(2))))
179
180   $(if $(4),$(call define_add,CONFIG_GPIO_RESET_BTN,$(strip $(4))))
181   $(if $(filter $(5),1),$(call define_add,CONFIG_GPIO_RESET_BTN_ACTIVE_LOW,1))
182   $(if $(CONFIG_MAX_UBOOT_SIZE), \
183     $(call define_add,CONFIG_MAX_UBOOT_SIZE,$(CONFIG_MAX_UBOOT_SIZE))
184     $(call define_add,CONFIG_MAX_UBOOT_SIZE_HEX,$(shell printf '0x%X' $(CONFIG_MAX_UBOOT_SIZE)))
185   )
186
187   $(if $(filter $(CONFIG_SKIP_LOWLEVEL_INIT),1), \
188     $(call define_add,CONFIG_SKIP_LOWLEVEL_INIT,1) \
189   )
190   $(if $(filter $(CONFIG_SKIP_LOWLEVEL_INIT),1), \
191     $(call undef_add,COMPRESSED_UBOOT) \
192   )
193
194   $(if $(6), \
195     $(call define_add,SOC_TYPE,$(6)) \
196   )
197
198   $(call define_add,CONFIG_BOARD_CUSTOM_STRING,$(call board_name,$(1)))
199   $(call define_add,CONFIG_DEFAULT_FLASH_SIZE_IN_MB,$(call flash_size,$(3)))
200
201   echo
202 endef
203
204 # ===============================================================
205
206 # First, check if configuration was done
207 ifneq (include/config.mk, $(wildcard include/config.mk))
208 all install u-boot u-boot.srec depend dep:
209         $(error "System was not configured!")
210 else
211 # Load ARCH, BOARD, and CPU configuration
212 include include/config.mk
213 export ARCH CPU BOARD VENDOR SOC
214
215 # Load other configuration
216 include $(TOPDIR)/config.mk
217
218 # ===============================================================
219 # U-Boot objects....order is important (i.e. start must be first)
220 OBJS = cpu/$(CPU)/start.o
221
222 LIBS  = lib_generic/libgeneric.a
223 LIBS += common/libcommon.a
224
225 LIBS += lib_$(ARCH)/lib$(ARCH).a
226 LIBS += drivers/libdrivers.a
227 LIBS += net/libnet.a
228 LIBS += rtc/librtc.a
229 LIBS += $(BOARDLIBS)
230
231 LIBS_SHARED  = board/$(BOARDDIR)/lib$(BOARD).a
232 LIBS_SHARED += httpd/libhttpd.a
233 ifdef SOC
234   LIBS_SHARED += cpu/$(CPU)/$(SOC)/lib$(SOC).a
235 endif
236 LIBS_SHARED += cpu/$(CPU)/lib$(CPU).a
237
238 ifdef COMPRESSED_UBOOT
239   OBJS_BOOTSTRAP = cpu/$(CPU)/start_bootstrap.o
240   LIBS_BOOTSTRAP = lib_bootstrap/libbootstrap.a
241   PHONY_LIBS = $(LIBS_BOOTSTRAP) $(LIBS_SHARED)
242 else
243   PHONY_LIBS = $(LIBS) $(LIBS_SHARED)
244 endif
245 .PHONY: $(PHONY_LIBS)
246
247 # Add GCC lib
248 PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
249
250 # The "tools" are needed early, so put this first
251 # Don't include stuff already done in $(LIBS)
252 SUBDIRS = tools
253
254 .PHONY: $(SUBDIRS)
255
256 # ===============================================================
257
258 ALL = u-boot.srec u-boot.bin System.map
259
260 ifdef COMPRESSED_UBOOT
261 all: $(ALL) tuboot.bin
262 else
263 all: $(ALL) u-boot.img
264 endif
265
266 u-boot.hex: u-boot
267         $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@
268
269 u-boot.srec: u-boot
270         $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@
271
272 u-boot.bin: u-boot
273         $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
274
275 u-boot.img: u-boot.bin
276         @echo
277         $(call echo_green,Preparing regular U-Boot image $@...)
278         $(MKIMAGE) -A $(ARCH) -T firmware -C none -a $(TEXT_BASE) \
279                    -e 0 -n '$(call ih_name)' -d $< $@
280
281 u-boot.dis: u-boot
282         $(OBJDUMP) -d $< > $@
283
284 u-boot: fsdata depend version $(SUBDIRS) $(OBJS) $(LIBS) $(LIBS_SHARED) $(LDSCRIPT)
285         UNDEF_SYM=`$(OBJDUMP) -x $(LIBS) $(LIBS_SHARED) | \
286                    sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p' | \
287                    sort | uniq`; \
288         $(LD) $(LDFLAGS) $$UNDEF_SYM $(OBJS) \
289               --start-group $(LIBS) $(LIBS_SHARED) \
290               --end-group $(PLATFORM_LIBS) \
291               -Map u-boot.map -o u-boot
292
293 $(LIBS_SHARED):
294         $(MAKE) -C `dirname $@`
295
296 $(LIBS):
297         $(MAKE) -C `dirname $@`
298
299 $(SUBDIRS):
300         $(MAKE) -C $@ all
301
302 # For LZMA compressed image
303 ifdef COMPRESSED_UBOOT
304 tuboot.bin: System.map bootstrap.bin u-boot.lzimg
305         @echo
306         $(call echo_green,Merging bootstrap.bin with u-boot.lzimg...)
307         $(call echo_size,    Bootstrap size,bootstrap.bin)
308         $(call echo_size,   LZMA image size,u-boot.lzimg)
309         @cat bootstrap.bin > $@
310         @cat u-boot.lzimg >> $@
311         $(call echo_size,  Total image size,$@)
312
313 u-boot.lzimg: lzma_host $(obj)u-boot.bin System.map
314         @echo
315         @rm -rf u-boot.bin.lzma
316         @$(call echo_green,Compressing U-Boot image $<...)
317         @$(LZMA) --best --keep $(obj)u-boot.bin
318         $(call echo_green,Preparing LZMA compressed U-Boot image $@...)
319         $(MKIMAGE) -A $(ARCH) -T firmware -C lzma \
320                    -a 0x$(shell grep "T _start" $(TOPDIR)/System.map | \
321                     awk '{ printf "%s", $$1 }') \
322                    -e 0x$(shell grep "T _start" $(TOPDIR)/System.map | \
323                     awk '{ printf "%s", $$1 }') \
324                    -n '$(call ih_name)' -d $(obj)u-boot.bin.lzma $@
325
326 bootstrap.bin: bootstrap
327         $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
328
329 bootstrap: depend version $(SUBDIRS) $(OBJS_BOOTSTRAP) $(LIBS_BOOTSTRAP) $(LIBS_SHARED) $(LDSCRIPT_BOOTSTRAP)
330         UNDEF_SYM=`$(OBJDUMP) -x $(LIBS_BOOTSTRAP) | \
331                    sed  -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p' | \
332                    sort | uniq`; \
333         $(LD) $(LDFLAGS_BOOTSTRAP) $$UNDEF_SYM $(OBJS_BOOTSTRAP) \
334               --start-group $(LIBS_BOOTSTRAP) $(LIBS_SHARED) \
335               --end-group $(PLATFORM_LIBS) \
336               -Map bootstrap.map -o bootstrap
337
338 $(LIBS_BOOTSTRAP):
339         $(MAKE) -C `dirname $@`
340
341 lzma_host:
342         @echo
343         $(call echo_green,Building lzma host utility...)
344         $(MAKE) -C $(BUILD_TOPDIR)/host_util/lzma -f makefile.gcc all
345 endif # ifdef COMPRESSED_UBOOT
346
347 version:
348         @echo -n "#define U_BOOT_VERSION \"U-Boot $(U_BOOT_VERSION)\"" > $(VERSION_FILE)
349
350 fsdata:
351         $(call echo_green,Preparing web server files...)
352         @echo
353         cd httpd && ./vendors/makefsdatac $(DEVICE_VENDOR)
354
355 depend dep:
356         @for dir in $(SUBDIRS); do $(MAKE) -C $$dir .depend; done
357
358 System.map: u-boot
359         @$(NM) $< | \
360                grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
361                sort > System.map
362 endif # include/config.mk
363
364 # =====================
365 # COMMON/SHARED TARGETS
366 # =====================
367
368 unconfig:
369         @$(call echo_green,Removing configuration...)
370         @rm -f include/config.h include/config.mk board/*/config.tmp
371
372 config_common:
373         @ >include/config.h
374         @$(call include_add,soc/soc_list.h)
375         @$(call define_add,CONFIG_BUILD_DATE_UTC,$(shell date -u +"%Y-%m-%d"))
376
377 ar933x_common: unconfig config_common
378         @$(call define_add,CFG_AG7240_NMACS,2)
379         @$(call define_add,CFG_ATHRS26_PHY,1)
380         @$(call define_add,CONFIG_MACH_HORNET,1)
381
382 ar934x_common: unconfig config_common
383         @$(call define_add,CONFIG_WASP,1)
384         @$(call define_add,CONFIG_WASP_SUPPORT,1)
385
386 qca953x_common: unconfig config_common
387         @$(call define_add,CONFIG_ATHEROS,1)
388         @$(call define_add,CONFIG_MACH_QCA953x,1)
389
390 lsdk_kernel:
391         @$(call define_add,CONFIG_LSDK_KERNEL,1)
392
393 # =============================
394 # TARGETS IN ALPHABETICAL ORDER
395 # =============================
396
397 8devices_carambola2: ar933x_common
398         @$(call config_init,8devices Carambola 2,carambola-v2,16,11,1,QCA_AR9331_SOC)
399         @$(call define_add,CONFIG_FOR_8DEVICES_CARAMBOLA2,1)
400         @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
401
402 alfa-network_ap121f: ar933x_common
403         @$(call config_init,ALFA Network AP121F,ap121f,16,12,1,QCA_AR9331_SOC)
404         @$(call define_add,CONFIG_FOR_ALFA_NETWORK_AP121F,1)
405         @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
406
407 alfa-network_hornet-ub: ar933x_common
408         @$(call config_init,ALFA Network Hornet-UB,hornet-ub,8,12,1,QCA_AR9331_SOC)
409         @$(call define_add,CONFIG_FOR_ALFA_NETWORK_HORNET_UB,1)
410         @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
411
412 alfa-network_n5q: ar934x_common
413         @$(call config_init,ALFA Network N5Q,n5q,16,11,1,QCA_AR9344_SOC)
414         @$(call define_add,CONFIG_FOR_ALFA_NETWORK_N5Q,1)
415         @$(call define_add,CFG_ATHRS27_PHY,1)
416         @$(call define_add,CFG_AG7240_NMACS,2)
417         @$(MKCONFIG) -a db12x mips mips db12x ar7240 ar7240
418
419 alfa-network_r36a: qca953x_common
420         @$(call config_init,ALFA Network R36A,r36a,16,2,1,QCA_QCA9531_SOC)
421         @$(call define_add,CONFIG_FOR_ALFA_NETWORK_R36A,1)
422         @$(call define_add,CFG_ATHRS27_PHY,1)
423         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
424         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
425
426 alfa-network_tube2h: ar933x_common
427         @$(call config_init,ALFA Network Tube2H,tube2h,8,12,1,QCA_AR9331_SOC)
428         @$(call define_add,CONFIG_FOR_ALFA_NETWORK_TUBE2H,1)
429         @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
430
431 comfast_cf-e314n: qca953x_common
432         @$(call config_init,Comfast CF-E314N,cf-e314n,16,17,1,QCA_QCA9531_SOC)
433         @$(call define_add,CONFIG_FOR_COMFAST_CF_E314N,1)
434         @$(call define_add,CFG_ATHRS27_PHY,1)
435         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
436         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
437
438 comfast_cf-e320n_v2: qca953x_common
439         @$(call config_init,Comfast CF-E320N v2,cf-e320n-v2,16,17,1,QCA_QCA9531_SOC)
440         @$(call define_add,CONFIG_FOR_COMFAST_CF_E320N_V2,1)
441         @$(call define_add,CFG_ATHRS27_PHY,1)
442         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
443         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
444
445 comfast_cf-e520n: qca953x_common
446         @$(call config_init,Comfast CF-E520N,cf-e520n,8,17,1,QCA_QCA9531_SOC)
447         @$(call define_add,CONFIG_FOR_COMFAST_CF_E520N,1)
448         @$(call define_add,CFG_ATHRS27_PHY,1)
449         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
450         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
451
452 comfast_cf-e530n: qca953x_common
453         @$(call config_init,Comfast CF-E530N,cf-e530n,8,17,1,QCA_QCA9531_SOC)
454         @$(call define_add,CONFIG_FOR_COMFAST_CF_E530N,1)
455         @$(call define_add,CONFIG_USB,1)
456         @$(call define_add,CFG_ATHRS27_PHY,1)
457         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
458         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
459
460 creatcomm-technology_d3321: ar933x_common
461         @$(call config_init,CreatComm Technology D3321,d3321,8,12,1,QCA_AR9331_SOC)
462         @$(call define_add,CONFIG_FOR_CREATCOMM_D3321,1)
463         @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
464
465 d-link_dir-505_a1: ar933x_common
466         @$(call config_init,D-Link DIR-505 A1,dir-505-a1,8,11,1,QCA_AR1311_SOC)
467         @$(call define_add,CONFIG_FOR_DLINK_DIR505_A1,1)
468         @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
469
470 dragino_ms14: ar933x_common
471         @$(call config_init,Dragino MS14/N,ms14,16,11,1,QCA_AR9331_SOC)
472         @$(call define_add,CONFIG_FOR_DRAGINO_MS14,1)
473         @$(call define_add,WEBFAILSAFE_DISABLE_ART_UPGRADE,1)
474         @$(call define_add,WEBFAILSAFE_DISABLE_UBOOT_UPGRADE,1)
475         @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
476
477 engenius_ens202ext: ar934x_common
478         @$(call config_init,EnGenius ENS202EXT,ens202ext,16,1,1,QCA_AR9341_SOC)
479         @$(call define_add,CONFIG_FOR_ENGENIUS_ENS202EXT,1)
480         @$(call define_add,CFG_ATHRS27_PHY,1)
481         @$(call define_add,CFG_AG7240_NMACS,2)
482         @$(MKCONFIG) -a db12x mips mips db12x ar7240 ar7240
483
484 gainstrong_oolite_v1_dev: ar933x_common
485         @$(call config_init,GainStrong Oolite v1-Dev,oolite-v1-dev,16,11,,QCA_AR9331_SOC)
486         @$(call define_add,CONFIG_FOR_GAINSTRONG_OOLITE_V1_DEV,1)
487         @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
488
489 gainstrong_oolite_v5.2: qca953x_common
490         @$(call config_init,GainStrong Oolite v5.2,oolite-v5.2,16,,,QCA_QCA9531_SOC)
491         @$(call define_add,CONFIG_FOR_GAINSTRONG_OOLITE_V5_2,1)
492         @$(call define_add,CFG_ATHRS27_PHY,1)
493         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
494         @$(call define_add,CONFIG_PCI,1)
495         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
496
497 gainstrong_oolite_v5.2_dev: qca953x_common
498         @$(call config_init,GainStrong Oolite v5.2-Dev,oolite-v5.2-dev,16,17,1,QCA_QCA9531_SOC)
499         @$(call define_add,CONFIG_FOR_GAINSTRONG_OOLITE_V5_2_DEV,1)
500         @$(call define_add,CFG_ATHRS27_PHY,1)
501         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
502         @$(call define_add,CONFIG_PCI,1)
503         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
504
505 gl-inet_6416: ar933x_common
506         @$(call config_init,GL.iNet 6416,glinet-6416,8,11,,QCA_AR9331_SOC)
507         @$(call define_add,CONFIG_FOR_GLINET_6416,1)
508         @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
509
510 gl-inet_gl-ar150: ar933x_common
511         @$(call config_init,GL.iNet GL-AR150,gl-ar150,16,11,,QCA_AR9331_SOC)
512         @$(call define_add,CONFIG_FOR_GLINET_GL_AR150,1)
513         @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
514
515 gl-inet_gl-ar300: ar934x_common
516         @$(call config_init,GL.iNet GL-AR300,gl-ar300,16,16,1,QCA_AR9344_SOC)
517         @$(call define_add,CONFIG_FOR_GLINET_GL_AR300,1)
518         @$(call define_add,CFG_ATHRS27_PHY,1)
519         @$(call define_add,CFG_AG7240_NMACS,2)
520         @$(MKCONFIG) -a db12x mips mips db12x ar7240 ar7240
521
522 gl-inet_gl-ar300m-lite: qca953x_common
523         @$(call config_init,GL.iNet GL-AR300M Lite,gl-ar300m-lite,16,3,1,QCA_QCA9531_SOC)
524         @$(call define_add,CONFIG_FOR_GLINET_GL_AR300M_LITE,1)
525         @$(call define_add,CFG_ATHRS27_PHY,1)
526         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
527         @$(call define_add,CONFIG_PCI,1)
528         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
529
530 gl-inet_gl-ar750: qca953x_common
531         @$(call config_init,GL.iNet GL-AR750,gl-ar750,16,3,1,QCA_QCA9531_SOC)
532         @$(call define_add,CONFIG_FOR_GLINET_GL_AR750,1)
533         @$(call define_add,CFG_ATHRS27_PHY,1)
534         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
535         @$(call define_add,CONFIG_PCI,1)
536         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
537
538 gl-inet_gl-usb150: ar933x_common
539         @$(call config_init,GL.iNet GL-USB150,gl-usb150,16,11,,QCA_AR9331_SOC)
540         @$(call define_add,CONFIG_FOR_GLINET_GL_USB150,1)
541         @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
542
543 hak5_lan-turtle: ar933x_common
544         @$(call config_init,Hak5 LAN Turtle,lan-turtle,16,11,1,QCA_AR9331_SOC)
545         @$(call define_add,CONFIG_FOR_HAK5_LAN_TURTLE,1)
546         @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
547
548 hak5_packet-squirrel: ar933x_common
549         @$(call config_init,Hak5 Packet Squirrel,packet-squirrel,16,11,1,QCA_AR9331_SOC)
550         @$(call define_add,CONFIG_FOR_HAK5_PACKET_SQUIRREL,1)
551         @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
552
553 hak5_wifi-pineapple-nano: ar933x_common
554         @$(call config_init,Hak5 WiFi Pineapple NANO,wifi-pineapple-nano,16,12,1,QCA_AR9331_SOC)
555         @$(call define_add,CONFIG_FOR_HAK5_WIFI_PINEAPPLE_NANO,1)
556         @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
557
558 p2w_cpe505n: qca953x_common
559         @$(call config_init,P&W CPE505N,cpe505n,16,17,1,QCA_QCA9531_SOC)
560         @$(call define_add,CONFIG_FOR_P2W_CPE505N,1)
561         @$(call define_add,CFG_ATHRS27_PHY,1)
562         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
563         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
564
565 p2w_r602n: qca953x_common
566         @$(call config_init,P&W R602N,r602n,16,17,1,QCA_QCA9531_SOC)
567         @$(call define_add,CONFIG_FOR_P2W_R602N,1)
568         @$(call define_add,CONFIG_USB,1)
569         @$(call define_add,CFG_ATHRS27_PHY,1)
570         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
571         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
572
573 tp-link_tl-mr10u_v1: ar933x_common lsdk_kernel
574         @$(call config_init,TP-Link TL-MR10U v1,tl-mr10u-v1,4,11,,QCA_AR9331_SOC)
575         @$(call define_add,CONFIG_FOR_TPLINK_MR10U_V1,1)
576         @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
577
578 tp-link_tl-mr13u_v1: ar933x_common lsdk_kernel
579         @$(call config_init,TP-Link TL-MR13U v1,tl-mr13u-v1,4,11,,QCA_AR9331_SOC)
580         @$(call define_add,CONFIG_FOR_TPLINK_MR13U_V1,1)
581         @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
582
583 tp-link_tl-mr22u_v1: qca953x_common lsdk_kernel
584         @$(call config_init,TP-Link TL-MR22U v1,tl-mr22u-v1,8,12,,QCA_QCA9531_SOC)
585         @$(call define_add,CONFIG_FOR_TPLINK_MR22U_V1,1)
586         @$(call define_add,CONFIG_USB,1)
587         @$(call define_add,CFG_ATHRS27_PHY,1)
588         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
589         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
590
591 tp-link_tl-mr3020_v1: ar933x_common lsdk_kernel
592         @$(call config_init,TP-Link TL-MR3020 v1,tl-mr3020-v1,4,11,,QCA_AR9331_SOC)
593         @$(call define_add,CONFIG_FOR_TPLINK_MR3020_V1,1)
594         @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
595
596 tp-link_tl-mr3040_v1v2: ar933x_common lsdk_kernel
597         @$(call config_init,TP-Link TL-MR3040 v1/v2,tl-mr3040-v1v2,4,11,,QCA_AR9331_SOC)
598         @$(call define_add,CONFIG_FOR_TPLINK_MR3040_V1V2,1)
599         @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
600
601 tp-link_tl-mr3220_v2: ar933x_common lsdk_kernel
602         @$(call config_init,TP-Link TL-MR3220 v2,tl-mr3220-v2,4,11,,QCA_AR9331_SOC)
603         @$(call define_add,CONFIG_FOR_TPLINK_MR3220_V2,1)
604         @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
605
606 tp-link_tl-mr3420_v2: ar934x_common lsdk_kernel
607         @$(call config_init,TP-Link TL-MR3420 v2,tl-mr3420-v2,4,17,1,QCA_AR9341_SOC)
608         @$(call define_add,CONFIG_FOR_TPLINK_MR3420_V2,1)
609         @$(call define_add,CFG_ATHRS27_PHY,1)
610         @$(call define_add,CFG_AG7240_NMACS,2)
611         @$(MKCONFIG) -a db12x mips mips db12x ar7240 ar7240
612
613 tp-link_tl-mr3420_v3: qca953x_common lsdk_kernel
614         @$(call config_init,TP-Link TL-MR3420 v3,tl-mr3420-v3,4,12,1,QCA_QCA9531_SOC)
615         @$(call define_add,CONFIG_FOR_TPLINK_MR3420_V3,1)
616         @$(call define_add,CONFIG_USB,1)
617         @$(call define_add,CFG_ATHRS27_PHY,1)
618         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
619         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
620
621 tp-link_tl-mr6400_v1v2: qca953x_common lsdk_kernel
622         @$(call config_init,TP-Link TL-MR6400 v1/v2,tl-mr6400-v1v2,8,12,1,QCA_QCA9531_SOC)
623         @$(call define_add,CONFIG_FOR_TPLINK_MR6400_V1V2,1)
624         @$(call define_add,CONFIG_USB,1)
625         @$(call define_add,CONFIG_QCA_ETH_PHY_SWAP,1)
626         @$(call define_add,CFG_ATHRS27_PHY,1)
627         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
628         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
629
630 tp-link_tl-wa801nd_v2: ar934x_common lsdk_kernel
631         @$(call config_init,TP-Link TL-WA801ND v2,tl-wa801nd-v2,4,17,1,QCA_AR9341_SOC)
632         @$(call define_add,CONFIG_FOR_TPLINK_WA801ND_V2,1)
633         @$(call define_add,CFG_ATHRS27_PHY,1)
634         @$(call define_add,CFG_AG7240_NMACS,2)
635         @$(MKCONFIG) -a db12x mips mips db12x ar7240 ar7240
636
637 tp-link_tl-wa830re_v2: ar934x_common lsdk_kernel
638         @$(call config_init,TP-Link TL-WA830RE v2,tl-wa830re-v2,4,17,1,QCA_AR9341_SOC)
639         @$(call define_add,CONFIG_FOR_TPLINK_WA830RE_V2,1)
640         @$(call define_add,CFG_ATHRS27_PHY,1)
641         @$(call define_add,CFG_AG7240_NMACS,2)
642         @$(MKCONFIG) -a db12x mips mips db12x ar7240 ar7240
643
644 tp-link_tl-wa850re_v2: qca953x_common lsdk_kernel
645         @$(call config_init,TP-Link TL-WA850RE v2,tl-wa850re-v2,4,17,1,QCA_QCA9533_SOC)
646         @$(call define_add,CONFIG_FOR_TPLINK_WA850RE_V2,1)
647         @$(call define_add,CFG_ATHRS27_PHY,1)
648         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
649         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
650
651 tp-link_tl-wdr3500_v1: ar934x_common lsdk_kernel
652         @$(call config_init,TP-Link TL-WDR3500 v1,tl-wdr3500-v1,8,16,1,QCA_AR9344_SOC)
653         @$(call define_add,CONFIG_FOR_TPLINK_WDR3500_V1,1)
654         @$(call define_add,CFG_ATHRS27_PHY,1)
655         @$(call define_add,CFG_AG7240_NMACS,2)
656         @$(call define_add,CONFIG_PCI,1)
657         @$(MKCONFIG) -a db12x mips mips db12x ar7240 ar7240
658
659 tp-link_tl-wdr3600_v1: ar934x_common lsdk_kernel
660         @$(call config_init,TP-Link TL-WDR3600 v1,tl-wdr3600-v1,8,16,1,QCA_AR9344_SOC)
661         @$(call define_add,CONFIG_FOR_TPLINK_WDR3600_V1,1)
662         @$(call define_add,CFG_ATHRS17_PHY,1)
663         @$(call define_add,CFG_AG7240_NMACS,1)
664         @$(call define_add,CONFIG_PCI,1)
665         @$(call define_add,CFG_DUAL_PHY_SUPPORT,1)
666         @$(MKCONFIG) -a db12x mips mips db12x ar7240 ar7240
667
668 tp-link_tl-wdr43x0_v1: ar934x_common lsdk_kernel
669         @$(call config_init,TP-Link TL-WDR43x0 v1,tl-wdr43x0-v1,8,16,1,QCA_AR9344_SOC)
670         @$(call define_add,CONFIG_FOR_TPLINK_WDR43X0_V1,1)
671         @$(call define_add,CFG_ATHRS17_PHY,1)
672         @$(call define_add,CFG_AG7240_NMACS,1)
673         @$(call define_add,CONFIG_PCI,1)
674         @$(call define_add,CFG_DUAL_PHY_SUPPORT,1)
675         @$(MKCONFIG) -a db12x mips mips db12x ar7240 ar7240
676
677 tp-link_tl-wr1041n_v2: ar934x_common lsdk_kernel
678         @$(call config_init,TP-Link TL-WR1041N v2,tl-wr1041n-v2,4,14,1,QCA_AR9342_SOC)
679         @$(call define_add,CONFIG_FOR_TPLINK_WR1041N_V2,1)
680         @$(call define_add,CFG_ATHRS17_PHY,1)
681         @$(call define_add,CFG_AG7240_NMACS,1)
682         @$(call define_add,CFG_DUAL_PHY_SUPPORT,1)
683         @$(MKCONFIG) -a db12x mips mips db12x ar7240 ar7240
684
685 tp-link_tl-wr703n_v1: ar933x_common lsdk_kernel
686         @$(call config_init,TP-Link TL-WR703N v1,tl-wr703n-v1,4,11,,QCA_AR9331_SOC)
687         @$(call define_add,CONFIG_FOR_TPLINK_WR703N_V1,1)
688         @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
689
690 tp-link_tl-wr710n_v1: ar933x_common lsdk_kernel
691         @$(call config_init,TP-Link TL-WR710N v1,tl-wr710n-v1,8,11,,QCA_AR9331_SOC)
692         @$(call define_add,CONFIG_FOR_TPLINK_WR710N_V1,1)
693         @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
694
695 tp-link_tl-wr720n_v3_CN: ar933x_common lsdk_kernel
696         @$(call config_init,TP-Link TL-WR720N v3 CN,tl-wr720n-v3,4,11,,QCA_AR9331_SOC)
697         @$(call define_add,CONFIG_FOR_TPLINK_WR720N_V3,1)
698         @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
699
700 tp-link_tl-wr740n_v4: ar933x_common lsdk_kernel
701         @$(call config_init,TP-Link TL-WR74xN/D v4,tl-wr74xnd-v4,4,11,,QCA_AR9331_SOC)
702         @$(call define_add,CONFIG_FOR_TPLINK_WR740N_V4,1)
703         @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
704
705 tp-link_tl-wr802n_v1: qca953x_common lsdk_kernel
706         @$(call config_init,TP-Link TL-WR802N v1,tl-wr802n-v1,4,12,1,QCA_QCA9533_SOC)
707         @$(call define_add,CONFIG_FOR_TPLINK_WR802N_V1,1)
708         @$(call define_add,CFG_ATHRS27_PHY,1)
709         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
710         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
711
712 tp-link_tl-wr810n_v1: qca953x_common lsdk_kernel
713         @$(call config_init,TP-Link TL-WR810N v1,tl-wr810n-v1,8,12,1,QCA_QCA9531_SOC)
714         @$(call define_add,CONFIG_FOR_TPLINK_WR810N_V1,1)
715         @$(call define_add,CONFIG_USB,1)
716         @$(call define_add,CFG_ATHRS27_PHY,1)
717         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
718         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
719
720 tp-link_tl-wr810n_v2: qca953x_common lsdk_kernel
721         @$(call config_init,TP-Link TL-WR810N v2,tl-wr810n-v2,8,12,1,QCA_QCA9533_SOC)
722         @$(call define_add,CONFIG_FOR_TPLINK_WR810N_V2,1)
723         @$(call define_add,CFG_ATHRS27_PHY,1)
724         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
725         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
726
727 tp-link_tl-wr820n_v1_CN: qca953x_common lsdk_kernel
728         @$(call config_init,TP-Link TL-WR820N v1 CN,tl-wr820n-v1,4,12,1,QCA_QCA9531_SOC)
729         @$(call define_add,CONFIG_FOR_TPLINK_WR820N_V1_CN,1)
730         @$(call define_add,CONFIG_USB,1)
731         @$(call define_add,CFG_ATHRS27_PHY,1)
732         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
733         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
734
735 tp-link_tl-wr841n_v10: qca953x_common lsdk_kernel
736         @$(call config_init,TP-Link TL-WR841N/D v10,tl-wr841nd-v10,4,12,1,QCA_QCA9533_SOC)
737         @$(call define_add,CONFIG_FOR_TPLINK_WR841N_V10,1)
738         @$(call define_add,CFG_ATHRS27_PHY,1)
739         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
740         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
741
742 tp-link_tl-wr841n_v11: qca953x_common lsdk_kernel
743         @$(call config_init,TP-Link TL-WR841N/D v11,tl-wr841nd-v11,4,12,1,QCA_QCA9533_SOC)
744         @$(call define_add,CONFIG_FOR_TPLINK_WR841N_V11,1)
745         @$(call define_add,CFG_ATHRS27_PHY,1)
746         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
747         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
748
749 tp-link_tl-wr841n_v8: ar934x_common lsdk_kernel
750         @$(call config_init,TP-Link TL-WR841N/D v8,tl-wr841nd-v8,4,17,1,QCA_AR9341_SOC)
751         @$(call define_add,CONFIG_FOR_TPLINK_WR841N_V8,1)
752         @$(call define_add,CFG_ATHRS27_PHY,1)
753         @$(call define_add,CFG_AG7240_NMACS,2)
754         @$(MKCONFIG) -a db12x mips mips db12x ar7240 ar7240
755
756 tp-link_tl-wr841n_v9: qca953x_common lsdk_kernel
757         @$(call config_init,TP-Link TL-WR841N/D v9,tl-wr841nd-v9,4,12,1,QCA_QCA9533_SOC)
758         @$(call define_add,CONFIG_FOR_TPLINK_WR841N_V9,1)
759         @$(call define_add,CFG_ATHRS27_PHY,1)
760         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
761         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
762
763 tp-link_tl-wr842n_v3: qca953x_common lsdk_kernel
764         @$(call config_init,TP-Link TL-WR842N/D v3,tl-wr842nd-v3,16,1,1,QCA_QCA9531_SOC)
765         @$(call define_add,CONFIG_FOR_TPLINK_WR842N_V3,1)
766         @$(call define_add,CONFIG_USB,1)
767         @$(call define_add,CFG_ATHRS27_PHY,1)
768         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
769         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
770
771 tp-link_tl-wr902ac_v1: qca953x_common lsdk_kernel
772         @$(call config_init,TP-Link TL-WR902AC,tl-wr902ac,8,3,1,QCA_QCA9531_SOC)
773         @$(call define_add,CONFIG_FOR_TPLINK_WR902AC_V1,1)
774         @$(call define_add,CONFIG_USB,1)
775         @$(call define_add,CFG_ATHRS27_PHY,1)
776         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
777         @$(call define_add,CONFIG_PCI,1)
778         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
779
780 unwireddevices_unwired-one: ar933x_common
781         @$(call config_init,Unwired Devices Unwired One,unwired-one,16,11,1,QCA_AR9331_SOC)
782         @$(call define_add,CONFIG_FOR_UNWIRED_DEVICES_UNWIRED_ONE,1)
783         @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
784
785 village-telco_mesh-potato_v2: ar933x_common
786         @$(call config_init,Village Telco Mesh Potato 2,mesh-potato-v2,16,11,1,QCA_AR9331_SOC)
787         @$(call define_add,CONFIG_FOR_VILLAGE_TELCO_MP2,1)
788         @$(call define_add,WEBFAILSAFE_DISABLE_ART_UPGRADE,1)
789         @$(call define_add,WEBFAILSAFE_DISABLE_UBOOT_UPGRADE,1)
790         @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240
791
792 wallys_dr531: qca953x_common
793         @$(call config_init,Wallys DR531,dr531,8,17,1,QCA_QCA9531_SOC)
794         @$(call define_add,CONFIG_FOR_WALLYS_DR531,1)
795         @$(call define_add,CONFIG_USB,1)
796         @$(call define_add,CFG_ATHRS27_PHY,1)
797         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
798         @$(call define_add,CONFIG_PCI,1)
799         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
800
801 whqx_e600g_v2: qca953x_common
802         @$(call config_init,WHQX E600G v2,e600g-v2,16,17,1,QCA_QCA9531_SOC)
803         @$(call define_add,CONFIG_FOR_WHQX_E600G_V2,1)
804         @$(call define_add,CONFIG_USB,1)
805         @$(call define_add,CFG_ATHRS27_PHY,1)
806         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
807         @$(call define_add,CONFIG_PCI,1)
808         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
809
810 whqx_e600gac_v2: qca953x_common
811         @$(call config_init,WHQX E600GAC v2,e600gac-v2,16,17,1,QCA_QCA9531_SOC)
812         @$(call define_add,CONFIG_FOR_WHQX_E600GAC_V2,1)
813         @$(call define_add,CONFIG_USB,1)
814         @$(call define_add,CFG_ATHRS27_PHY,1)
815         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
816         @$(call define_add,CONFIG_PCI,1)
817         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
818
819 yuncore_ap90q: qca953x_common
820         @$(call config_init,YunCore AP90Q,ap90q,16,17,1,QCA_QCA9531_SOC)
821         @$(call define_add,CONFIG_FOR_YUNCORE_AP90Q,1)
822         @$(call define_add,CFG_ATHRS27_PHY,1)
823         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
824         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
825
826 yuncore_cpe830: qca953x_common
827         @$(call config_init,YunCore CPE830,cpe830,16,17,1,QCA_QCA9531_SOC)
828         @$(call define_add,CONFIG_FOR_YUNCORE_CPE830,1)
829         @$(call define_add,CFG_ATHRS27_PHY,1)
830         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
831         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
832
833 yuncore_cpe870: ar934x_common
834         @$(call config_init,YunCore CPE870,cpe870,8,16,1,QCA_AR9341_SOC)
835         @$(call define_add,CONFIG_FOR_YUNCORE_CPE870,1)
836         @$(call define_add,CFG_ATHRS27_PHY,1)
837         @$(call define_add,CFG_AG7240_NMACS,2)
838         @$(MKCONFIG) -a db12x mips mips db12x ar7240 ar7240
839
840 yuncore_t830: qca953x_common
841         @$(call config_init,YunCore T830,t830,16,17,1,QCA_QCA9531_SOC)
842         @$(call define_add,CONFIG_FOR_YUNCORE_T830,1)
843         @$(call define_add,CFG_ATHRS27_PHY,1)
844         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
845         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
846
847 zbtlink_zbt-we1526: qca953x_common
848         @$(call config_init,Zbtlink ZBT-WE1526,zbt-we1526,16,17,1,QCA_QCA9531_SOC)
849         @$(call define_add,CONFIG_FOR_ZBTLINK_ZBT_WE1526,1)
850         @$(call define_add,CONFIG_USB,1)
851         @$(call define_add,CFG_ATHRS27_PHY,1)
852         @$(call define_add,CFG_ATH_GMAC_NMACS,2)
853         @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240
854
855 # =============
856 # CLEAN TARGETS
857 # =============
858
859 clean:
860         @$(call echo_green,Making $@...)
861         @find . -type f \
862                 \( -name 'core' -o -name '*.bak' -o -name '*~' \
863                 -o -name '*.o'  -o -name '*.a' -o -name .depend \) -print \
864                 | xargs rm -f
865         @rm -f tools/mkimage tools/envcrc
866         @rm -f lib_bootstrap/*.o
867         @rm -f lib_bootstrap/*.a
868         @rm -f bootstrap bootstrap.bin tuboot.bin u-boot.lzimg u-boot.bin.lzma bootstrap.map
869
870 lzma_host_clean:
871         @$(call echo_green,Removing lzma host utility...)
872         @$(MAKE) -C $(BUILD_TOPDIR)/host_util/lzma -f makefile.gcc clean
873
874 clobber: clean
875         @$(call echo_green,Making $@...)
876         @find . -type f \( -name .depend \
877                 -o -name '*.srec' -o -name '*.bin' -o -name u-boot.img \) \
878                 -print0 \
879                 | xargs -0 rm -f
880         @rm -f $(OBJS) *.bak include/version_autogenerated.h
881         @rm -fr *.*~
882         @rm -f u-boot u-boot.map u-boot.hex $(ALL)
883         @rm -f tools/crc32.c tools/environment.c
884         @rm -f include/asm/proc include/asm/arch include/asm
885
886 distclean: clobber unconfig