# # Copyright (C) 2016 Piotr Dymacz # # (C) Copyright 2000-2006 Wolfgang Denk, # DENX Software Engineering, wd@denx.de. # # SPDX-License-Identifier: GPL-2.0 # VERSION = 1 PATCHLEVEL = 1 SUBLEVEL = 4 EXTRAVERSION = -$(shell git rev-parse --short=8 HEAD) ISREPODIRTY = $(shell if git diff-files | read dummy; then echo 1; else echo 0; fi) VERSION_FILE = include/version_autogenerated.h MKCONFIG = $(BUILD_TOPDIR)/u-boot/mkconfig MKIMAGE = $(BUILD_TOPDIR)/u-boot/tools/mkimage LZMA = $(BUILD_TOPDIR)/host_util/lzma/lzma # Show in version string if we are not building from clean repository ifeq ($(ISREPODIRTY),1) U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)"-dirty" else U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)"-clean" endif # =============================================================== TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi) export TOPDIR # Some variables passed as arguments in cmd ifneq ($(IMG_SIZE),) CONFIG_MAX_UBOOT_SIZE = $(IMG_SIZE) export CONFIG_MAX_UBOOT_SIZE endif ifeq ($(IMG_LZMA),1) COMPRESSED_UBOOT = 1 export COMPRESSED_UBOOT endif ifeq ($(IMG_RAM),1) CONFIG_SKIP_LOWLEVEL_INIT = 1 export CONFIG_SKIP_LOWLEVEL_INIT endif ifneq ($(DEVICE_VENDOR),) DEVICE_VENDOR = $(DEVICE_VENDOR) export DEVICE_VENDOR endif # Never use LZMA compression # for a RAM version of image ifdef CONFIG_SKIP_LOWLEVEL_INIT unexport COMPRESSED_UBOOT COMPRESSED_UBOOT = endif ifndef CROSS_COMPILE $(error "CROSS_COMPILE is not defined!") endif export CROSS_COMPILE ifndef STAGING_DIR $(error "STAGING_DIR is not defined!") endif export STAGING_DIR # Endianness ifndef ENDIANNESS ENDIANNESS=-EB endif export ENDIANNESS # ======================= # CUSTOM HELPER FUNCTIONS # ======================= define echo_green echo -e "\e[92m$(1)\e[0m" endef define echo_red echo -e "\e[91m$(1)\e[0m" endef define echo_yellow echo -e "\e[93m$(1)\e[0m" endef define ih_name U-Boot $(strip $(subst ",,$(U_BOOT_VERSION))) endef # $(1): name # $(2): path define echo_size @echo "$(1): `wc -c < $(strip $(2))` Bytes" endef # $(1): define name # $(2): define value define define_add len=$$((5 - ($$(expr length $(1))/8))); \ tab=`printf '%*s' "$$len" | tr ' ' "\t"`; \ echo -ne "#define $(strip $(1))$${tab}" >> include/config.h; \ echo -e '$(strip $(2))' >> include/config.h endef # $(1): define name define undef_add echo -e '#undef $(strip $(1))' >> include/config.h endef # $(1): path define include_add echo -e '#include <$(strip $(1))>' >> include/config.h endef # $(1): name define board_name $(if $(1),$(strip $(1)),OEM/Unknown) endef # $(1): size define flash_size $(if $(1),$(strip $(1)),4) endef # $(1): vendor, board name/model # $(2): hostname # $(3): default FLASH size in MB # $(4): reset button GPIO number # $(5): 1 if reset button is active low # $(6): SOC_TYPE define config_init $(call echo_green,Preparing configuration for target: $@) echo $(call echo_yellow, Device vendor/model:\t$(call board_name,$(1))) $(if $(DEVICE_VENDOR), \ $(call echo_yellow, Custom recovery web:\tyes ($(DEVICE_VENDOR))), \ $(call echo_yellow, Custom recovery web:\tno) \ ) $(if $(CONFIG_MAX_UBOOT_SIZE), \ $(call echo_yellow, Image size limit:\t$$(($(CONFIG_MAX_UBOOT_SIZE) / 1024)) KB), $(call echo_yellow, Image size limit:\tnot specified) ) $(call echo_yellow, Default FLASH size:\t$(call flash_size,$(3)) MB) $(if $(4), $(call echo_yellow, GPIO reset button:\t$(strip $(4))), \ $(call echo_yellow, GPIO reset button:\tnot specified) \ ) $(if $(filter $(5),1), $(call echo_yellow, Button active low:\tyes), \ $(call echo_yellow, Button active low:\tno) \ ) $(if $(filter $(COMPRESSED_UBOOT),1), \ $(call echo_yellow, LZMA compression:\tyes), \ $(call echo_yellow, LZMA compression:\tno) \ ) $(if $(filter $(CONFIG_SKIP_LOWLEVEL_INIT),1), \ $(call echo_yellow, RAM-loadable only:\tyes), \ $(call echo_yellow, RAM-loadable only:\tno) \ ) $(if $(2),$(call define_add,CONFIG_HOSTNAME,u-boot_$(strip $(2)))) $(if $(4),$(call define_add,CONFIG_GPIO_RESET_BTN,$(strip $(4)))) $(if $(filter $(5),1),$(call define_add,CONFIG_GPIO_RESET_BTN_ACTIVE_LOW,1)) $(if $(CONFIG_MAX_UBOOT_SIZE), \ $(call define_add,CONFIG_MAX_UBOOT_SIZE,$(CONFIG_MAX_UBOOT_SIZE)) $(call define_add,CONFIG_MAX_UBOOT_SIZE_HEX,$(shell printf '0x%X' $(CONFIG_MAX_UBOOT_SIZE))) ) $(if $(filter $(CONFIG_SKIP_LOWLEVEL_INIT),1), \ $(call define_add,CONFIG_SKIP_LOWLEVEL_INIT,1) \ ) $(if $(filter $(CONFIG_SKIP_LOWLEVEL_INIT),1), \ $(call undef_add,COMPRESSED_UBOOT) \ ) $(if $(6), \ $(call define_add,SOC_TYPE,$(6)) \ ) $(call define_add,CONFIG_BOARD_CUSTOM_STRING,$(call board_name,$(1))) $(call define_add,CONFIG_DEFAULT_FLASH_SIZE_IN_MB,$(call flash_size,$(3))) echo endef # =============================================================== # First, check if configuration was done ifneq (include/config.mk, $(wildcard include/config.mk)) all install u-boot u-boot.srec depend dep: $(error "System was not configured!") else # Load ARCH, BOARD, and CPU configuration include include/config.mk export ARCH CPU BOARD VENDOR SOC # Load other configuration include $(TOPDIR)/config.mk # =============================================================== # U-Boot objects....order is important (i.e. start must be first) OBJS = cpu/$(CPU)/start.o LIBS = lib_generic/libgeneric.a LIBS += common/libcommon.a LIBS += lib_$(ARCH)/lib$(ARCH).a LIBS += drivers/libdrivers.a LIBS += net/libnet.a LIBS += rtc/librtc.a LIBS += $(BOARDLIBS) LIBS_SHARED = board/$(BOARDDIR)/lib$(BOARD).a LIBS_SHARED += httpd/libhttpd.a ifdef SOC LIBS_SHARED += cpu/$(CPU)/$(SOC)/lib$(SOC).a endif LIBS_SHARED += cpu/$(CPU)/lib$(CPU).a ifdef COMPRESSED_UBOOT OBJS_BOOTSTRAP = cpu/$(CPU)/start_bootstrap.o LIBS_BOOTSTRAP = lib_bootstrap/libbootstrap.a PHONY_LIBS = $(LIBS_BOOTSTRAP) $(LIBS_SHARED) else PHONY_LIBS = $(LIBS) $(LIBS_SHARED) endif .PHONY: $(PHONY_LIBS) # 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 .PHONY: $(SUBDIRS) # =============================================================== ALL = u-boot.srec u-boot.bin System.map ifdef COMPRESSED_UBOOT all: $(ALL) tuboot.bin else all: $(ALL) u-boot.img endif u-boot.hex: u-boot $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ u-boot.srec: u-boot $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@ u-boot.bin: u-boot $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ u-boot.img: u-boot.bin @echo $(call echo_green,Preparing regular U-Boot image $@...) $(MKIMAGE) -A $(ARCH) -T firmware -C none -a $(TEXT_BASE) \ -e 0 -n '$(call ih_name)' -d $< $@ u-boot.dis: u-boot $(OBJDUMP) -d $< > $@ u-boot: fsdata depend version $(SUBDIRS) $(OBJS) $(LIBS) $(LIBS_SHARED) $(LDSCRIPT) UNDEF_SYM=`$(OBJDUMP) -x $(LIBS) $(LIBS_SHARED) | \ sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p' | \ sort | uniq`; \ $(LD) $(LDFLAGS) $$UNDEF_SYM $(OBJS) \ --start-group $(LIBS) $(LIBS_SHARED) \ --end-group $(PLATFORM_LIBS) \ -Map u-boot.map -o u-boot $(LIBS_SHARED): $(MAKE) -C `dirname $@` $(LIBS): $(MAKE) -C `dirname $@` $(SUBDIRS): $(MAKE) -C $@ all # For LZMA compressed image ifdef COMPRESSED_UBOOT tuboot.bin: System.map bootstrap.bin u-boot.lzimg @echo $(call echo_green,Merging bootstrap.bin with u-boot.lzimg...) $(call echo_size, Bootstrap size,bootstrap.bin) $(call echo_size, LZMA image size,u-boot.lzimg) @cat bootstrap.bin > $@ @cat u-boot.lzimg >> $@ $(call echo_size, Total image size,$@) u-boot.lzimg: lzma_host $(obj)u-boot.bin System.map @echo @rm -rf u-boot.bin.lzma @$(call echo_green,Compressing U-Boot image $<...) @$(LZMA) --best --keep $(obj)u-boot.bin $(call echo_green,Preparing LZMA compressed U-Boot image $@...) $(MKIMAGE) -A $(ARCH) -T firmware -C lzma \ -a 0x$(shell grep "T _start" $(TOPDIR)/System.map | \ awk '{ printf "%s", $$1 }') \ -e 0x$(shell grep "T _start" $(TOPDIR)/System.map | \ awk '{ printf "%s", $$1 }') \ -n '$(call ih_name)' -d $(obj)u-boot.bin.lzma $@ bootstrap.bin: bootstrap $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ bootstrap: depend version $(SUBDIRS) $(OBJS_BOOTSTRAP) $(LIBS_BOOTSTRAP) $(LIBS_SHARED) $(LDSCRIPT_BOOTSTRAP) UNDEF_SYM=`$(OBJDUMP) -x $(LIBS_BOOTSTRAP) | \ sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p' | \ sort | uniq`; \ $(LD) $(LDFLAGS_BOOTSTRAP) $$UNDEF_SYM $(OBJS_BOOTSTRAP) \ --start-group $(LIBS_BOOTSTRAP) $(LIBS_SHARED) \ --end-group $(PLATFORM_LIBS) \ -Map bootstrap.map -o bootstrap $(LIBS_BOOTSTRAP): $(MAKE) -C `dirname $@` lzma_host: @echo $(call echo_green,Building lzma host utility...) $(MAKE) -C $(BUILD_TOPDIR)/host_util/lzma -f makefile.gcc all endif # ifdef COMPRESSED_UBOOT version: @echo -n "#define U_BOOT_VERSION \"U-Boot $(U_BOOT_VERSION)\"" > $(VERSION_FILE) fsdata: $(call echo_green,Preparing web server files...) @echo cd httpd && ./vendors/makefsdatac $(DEVICE_VENDOR) depend dep: @for dir in $(SUBDIRS); do $(MAKE) -C $$dir .depend; done System.map: u-boot @$(NM) $< | \ grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ sort > System.map endif # include/config.mk # ===================== # COMMON/SHARED TARGETS # ===================== unconfig: @$(call echo_green,Removing configuration...) @rm -f include/config.h include/config.mk board/*/config.tmp config_common: @ >include/config.h @$(call include_add,soc/soc_list.h) @$(call define_add,CONFIG_BUILD_DATE_UTC,$(shell date -u +"%Y-%m-%d")) ar933x_common: unconfig config_common @$(call define_add,CFG_AG7240_NMACS,2) @$(call define_add,CFG_ATHRS26_PHY,1) @$(call define_add,CONFIG_MACH_HORNET,1) ar934x_common: unconfig config_common @$(call define_add,CONFIG_WASP,1) @$(call define_add,CONFIG_WASP_SUPPORT,1) qca953x_common: unconfig config_common @$(call define_add,CONFIG_ATHEROS,1) @$(call define_add,CONFIG_MACH_QCA953x,1) lsdk_kernel: @$(call define_add,CONFIG_LSDK_KERNEL,1) # ============================= # TARGETS IN ALPHABETICAL ORDER # ============================= 8devices_carambola2: ar933x_common @$(call config_init,8devices Carambola 2,carambola-v2,16,11,1,QCA_AR933X_SOC) @$(call define_add,CONFIG_FOR_8DEVICES_CARAMBOLA2,1) @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240 alfa-network_hornet-ub: ar933x_common @$(call config_init,ALFA NETWORK Hornet-UB,hornet-ub,8,12,1,QCA_AR933X_SOC) @$(call define_add,CONFIG_FOR_ALFA_NETWORK_HORNET_UB,1) @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240 comfast_cf-e314n: qca953x_common @$(call config_init,Comfast CF-E314N,cf-e314n,16,17,1,QCA_QCA953X_SOC) @$(call define_add,CONFIG_FOR_COMFAST_CF_E314N,1) @$(call define_add,CFG_ATHRS27_PHY,1) @$(call define_add,CFG_ATH_GMAC_NMACS,2) @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240 comfast_cf-e320n_v2: qca953x_common @$(call config_init,Comfast CF-E320N v2,cf-e320n-v2,16,17,1,QCA_QCA953X_SOC) @$(call define_add,CONFIG_FOR_COMFAST_CF_E320N_V2,1) @$(call define_add,CFG_ATHRS27_PHY,1) @$(call define_add,CFG_ATH_GMAC_NMACS,2) @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240 comfast_cf-e520n: qca953x_common @$(call config_init,Comfast CF-E520N,cf-e520n,8,17,1,QCA_QCA953X_SOC) @$(call define_add,CONFIG_FOR_COMFAST_CF_E520N,1) @$(call define_add,CFG_ATHRS27_PHY,1) @$(call define_add,CFG_ATH_GMAC_NMACS,2) @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240 comfast_cf-e530n: qca953x_common @$(call config_init,Comfast CF-E530N,cf-e530n,8,17,1,QCA_QCA953X_SOC) @$(call define_add,CONFIG_FOR_COMFAST_CF_E530N,1) @$(call define_add,CFG_ATHRS27_PHY,1) @$(call define_add,CFG_ATH_GMAC_NMACS,2) @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240 creatcomm-technology_d3321: ar933x_common @$(call config_init,CreatComm Technology D3321,d3321,8,12,1,QCA_AR933X_SOC) @$(call define_add,CONFIG_FOR_CREATCOMM_D3321,1) @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240 d-link_dir-505: ar933x_common @$(call config_init,D-Link DIR-505,dir-505,8,11,1,QCA_AR933X_SOC) @$(call define_add,CONFIG_FOR_DLINK_DIR505_A1,1) @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240 dragino_v2_ms14: ar933x_common @$(call config_init,Dragino v2 (MS14),dragino-v2,16,11,1,QCA_AR933X_SOC) @$(call define_add,CONFIG_FOR_DRAGINO_V2,1) @$(call define_add,WEBFAILSAFE_DISABLE_ART_UPGRADE,1) @$(call define_add,WEBFAILSAFE_DISABLE_UBOOT_UPGRADE,1) @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240 engenius_ens202ext: ar934x_common @$(call config_init,EnGenius ENS202EXT,ens202ext,16,1,1,QCA_AR9341_SOC) @$(call define_add,CONFIG_FOR_ENGENIUS_ENS202EXT,1) @$(call define_add,CFG_ATHRS27_PHY,1) @$(call define_add,CFG_AG7240_NMACS,2) @$(MKCONFIG) -a db12x mips mips db12x ar7240 ar7240 gainstrong_oolite_v1_dev: ar933x_common @$(call config_init,Gainstrong Oolite v1 (dev board),oolite-v1,16,11,,QCA_AR933X_SOC) @$(call define_add,CONFIG_FOR_GS_OOLITE_V1_DEV,1) @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240 gl-innovations_gl-ar150: ar933x_common @$(call config_init,GL Innovations GL-AR150,gl-ar150,16,11,,QCA_AR933X_SOC) @$(call define_add,CONFIG_FOR_GL_AR150,1) @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240 gl-innovations_gl-inet-6416: ar933x_common @$(call config_init,GL Innovations GL.iNet 6416,glinet-6416,8,11,,QCA_AR933X_SOC) @$(call define_add,CONFIG_FOR_GL_INET,1) @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240 p2w_cpe505n: qca953x_common @$(call config_init,P&W CPE505N,cpe505n,16,17,1,QCA_QCA953X_SOC) @$(call define_add,CONFIG_FOR_P2W_CPE505N,1) @$(call define_add,CFG_ATHRS27_PHY,1) @$(call define_add,CFG_ATH_GMAC_NMACS,2) @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240 p2w_r602n: qca953x_common @$(call config_init,P&W R602N,r602n,16,17,1,QCA_QCA953X_SOC) @$(call define_add,CONFIG_FOR_P2W_R602N,1) @$(call define_add,CFG_ATHRS27_PHY,1) @$(call define_add,CFG_ATH_GMAC_NMACS,2) @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240 tp-link_tl-mr10u: ar933x_common lsdk_kernel @$(call config_init,TP-Link TL-MR10U,tl-mr10u,4,11,,QCA_AR933X_SOC) @$(call define_add,CONFIG_FOR_TPLINK_MR10U_V1,1) @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240 tp-link_tl-mr13u: ar933x_common lsdk_kernel @$(call config_init,TP-Link TL-MR13U,tl-mr13u,4,11,,QCA_AR933X_SOC) @$(call define_add,CONFIG_FOR_TPLINK_MR13U_V1,1) @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240 tp-link_tl-mr3020: ar933x_common lsdk_kernel @$(call config_init,TP-Link TL-MR3020,tl-mr3020,4,11,,QCA_AR933X_SOC) @$(call define_add,CONFIG_FOR_TPLINK_MR3020_V1,1) @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240 tp-link_tl-mr3040: ar933x_common lsdk_kernel @$(call config_init,TP-Link TL-MR3040,tl-mr3040,4,11,,QCA_AR933X_SOC) @$(call define_add,CONFIG_FOR_TPLINK_MR3040_V1V2,1) @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240 tp-link_tl-mr3220_v2: ar933x_common lsdk_kernel @$(call config_init,TP-Link TL-MR3220 v2,tl-mr3220-v2,4,11,,QCA_AR933X_SOC) @$(call define_add,CONFIG_FOR_TPLINK_MR3220_V2,1) @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240 tp-link_tl-mr3420_v2: ar934x_common lsdk_kernel @$(call config_init,TP-Link TL-MR3420 v2,tl-mr3420-v2,4,17,1,QCA_AR9341_SOC) @$(call define_add,CONFIG_FOR_TPLINK_MR3420_V2,1) @$(call define_add,CFG_ATHRS27_PHY,1) @$(call define_add,CFG_AG7240_NMACS,2) @$(MKCONFIG) -a db12x mips mips db12x ar7240 ar7240 tp-link_tl-wa801nd_v2: ar934x_common lsdk_kernel @$(call config_init,TP-Link TL-WA801ND v2,tl-wa801nd-v2,4,17,1,QCA_AR9341_SOC) @$(call define_add,CONFIG_FOR_TPLINK_WA801ND_V2,1) @$(call define_add,CFG_ATHRS27_PHY,1) @$(call define_add,CFG_AG7240_NMACS,2) @$(MKCONFIG) -a db12x mips mips db12x ar7240 ar7240 tp-link_tl-wa830re_v2: ar934x_common lsdk_kernel @$(call config_init,TP-Link TL-WA830RE v2,tl-wa830re-v2,4,17,1,QCA_AR9341_SOC) @$(call define_add,CONFIG_FOR_TPLINK_WA830RE_V2,1) @$(call define_add,CFG_ATHRS27_PHY,1) @$(call define_add,CFG_AG7240_NMACS,2) @$(MKCONFIG) -a db12x mips mips db12x ar7240 ar7240 tp-link_tl-wa850re_v2: qca953x_common lsdk_kernel @$(call config_init,TP-Link TL-WA850RE v2,tl-wa850re-v2,4,17,1,QCA_QCA953X_SOC) @$(call define_add,CONFIG_FOR_TPLINK_WA850RE_V2,1) @$(call define_add,CFG_ATHRS27_PHY,1) @$(call define_add,CFG_ATH_GMAC_NMACS,2) @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240 tp-link_tl-wdr3500: ar934x_common lsdk_kernel @$(call config_init,TP-Link TL-WDR3500,tl-wdr3500,8,16,1,QCA_AR9344_SOC) @$(call define_add,CONFIG_FOR_TPLINK_WDR3500_V1,1) @$(call define_add,CFG_ATHRS27_PHY,1) @$(call define_add,CFG_AG7240_NMACS,2) @$(call define_add,CONFIG_PCI,1) @$(MKCONFIG) -a db12x mips mips db12x ar7240 ar7240 tp-link_tl-wdr3600: ar934x_common lsdk_kernel @$(call config_init,TP-Link TL-WDR3600,tl-wdr3600,8,16,1,QCA_AR9344_SOC) @$(call define_add,CONFIG_FOR_TPLINK_WDR3600_V1,1) @$(call define_add,CFG_ATHRS17_PHY,1) @$(call define_add,CFG_AG7240_NMACS,1) @$(call define_add,CONFIG_PCI,1) @$(call define_add,CFG_DUAL_PHY_SUPPORT,1) @$(MKCONFIG) -a db12x mips mips db12x ar7240 ar7240 tp-link_tl-wdr43x0: ar934x_common lsdk_kernel @$(call config_init,TP-Link TL-WDR43x0,tl-wdr43x0,8,16,1,QCA_AR9344_SOC) @$(call define_add,CONFIG_FOR_TPLINK_WDR43X0_V1,1) @$(call define_add,CFG_ATHRS17_PHY,1) @$(call define_add,CFG_AG7240_NMACS,1) @$(call define_add,CONFIG_PCI,1) @$(call define_add,CFG_DUAL_PHY_SUPPORT,1) @$(MKCONFIG) -a db12x mips mips db12x ar7240 ar7240 tp-link_tl-wr703n: ar933x_common lsdk_kernel @$(call config_init,TP-Link TL-WR703N,tl-wr703n,4,11,,QCA_AR933X_SOC) @$(call define_add,CONFIG_FOR_TPLINK_WR703N_V1,1) @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240 tp-link_tl-wr710n: ar933x_common lsdk_kernel @$(call config_init,TP-Link TL-WR710N,tl-wr710n,8,11,,QCA_AR933X_SOC) @$(call define_add,CONFIG_FOR_TPLINK_WR710N_V1,1) @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240 tp-link_tl-wr720n_v3_CN: ar933x_common lsdk_kernel @$(call config_init,TP-Link TL-WR720N v3 CN,tl-wr720n-v3,4,11,,QCA_AR933X_SOC) @$(call define_add,CONFIG_FOR_TPLINK_WR720N_V3,1) @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240 tp-link_tl-wr740n_v4: ar933x_common lsdk_kernel @$(call config_init,TP-Link TL-WR74xN/D v4,tl-wr74xnd-v4,4,11,,QCA_AR933X_SOC) @$(call define_add,CONFIG_FOR_TPLINK_WR740N_V4,1) @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240 tp-link_tl-wr802n: qca953x_common lsdk_kernel @$(call config_init,TP-Link TL-WR802N,tl-wr802n,4,12,1,QCA_QCA953X_SOC) @$(call define_add,CONFIG_FOR_TPLINK_WR802N,1) @$(call define_add,CFG_ATHRS27_PHY,1) @$(call define_add,CFG_ATH_GMAC_NMACS,2) @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240 tp-link_tl-wr810n: qca953x_common lsdk_kernel @$(call config_init,TP-Link TL-WR810N,tl-wr810n,8,12,1,QCA_QCA953X_SOC) @$(call define_add,CONFIG_FOR_TPLINK_WR810N,1) @$(call define_add,CFG_ATHRS27_PHY,1) @$(call define_add,CFG_ATH_GMAC_NMACS,2) @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240 tp-link_tl-wr820n_CN: qca953x_common lsdk_kernel @$(call config_init,TP-Link TL-WR820N CN,tl-wr820n,4,12,1,QCA_QCA953X_SOC) @$(call define_add,CONFIG_FOR_TPLINK_WR820N_CN,1) @$(call define_add,CFG_ATHRS27_PHY,1) @$(call define_add,CFG_ATH_GMAC_NMACS,2) @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240 tp-link_tl-wr841n_v10: qca953x_common lsdk_kernel @$(call config_init,TP-Link TL-WR841N/D v10,tl-wr841nd-v10,4,12,1,QCA_QCA953X_SOC) @$(call define_add,CONFIG_FOR_TPLINK_WR841N_V10,1) @$(call define_add,CFG_ATHRS27_PHY,1) @$(call define_add,CFG_ATH_GMAC_NMACS,2) @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240 tp-link_tl-wr841n_v11: qca953x_common lsdk_kernel @$(call config_init,TP-Link TL-WR841N/D v11,tl-wr841nd-v11,4,12,1,QCA_QCA953X_SOC) @$(call define_add,CONFIG_FOR_TPLINK_WR841N_V11,1) @$(call define_add,CFG_ATHRS27_PHY,1) @$(call define_add,CFG_ATH_GMAC_NMACS,2) @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240 tp-link_tl-wr841n_v8: ar934x_common lsdk_kernel @$(call config_init,TP-Link TL-WR841N/D v8,tl-wr841nd-v8,4,17,1,QCA_AR9341_SOC) @$(call define_add,CONFIG_FOR_TPLINK_WR841N_V8,1) @$(call define_add,CFG_ATHRS27_PHY,1) @$(call define_add,CFG_AG7240_NMACS,2) @$(MKCONFIG) -a db12x mips mips db12x ar7240 ar7240 tp-link_tl-wr841n_v9: qca953x_common lsdk_kernel @$(call config_init,TP-Link TL-WR841N/D v9,tl-wr841nd-v9,4,12,1,QCA_QCA953X_SOC) @$(call define_add,CONFIG_FOR_TPLINK_WR841N_V9,1) @$(call define_add,CFG_ATHRS27_PHY,1) @$(call define_add,CFG_ATH_GMAC_NMACS,2) @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240 tp-link_tl-wr842n_v3: qca953x_common lsdk_kernel @$(call config_init,TP-Link TL-WR842N/D v3,tl-wr842nd-v3,16,1,1,QCA_QCA953X_SOC) @$(call define_add,CONFIG_FOR_TPLINK_WR842N_V3,1) @$(call define_add,CFG_ATHRS27_PHY,1) @$(call define_add,CFG_ATH_GMAC_NMACS,2) @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240 tp-link_tl-wr902ac_v1: qca953x_common lsdk_kernel @$(call config_init,TP-Link TL-WR902AC,tl-wr902ac,8,3,1,QCA_QCA953X_SOC) @$(call define_add,CONFIG_FOR_TPLINK_WR902AC_V1,1) @$(call define_add,CFG_ATHRS27_PHY,1) @$(call define_add,CFG_ATH_GMAC_NMACS,2) @$(call define_add,CONFIG_PCI,1) @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240 unwireddevices_unwired-one: ar933x_common @$(call config_init,Black Swift aka Unwired One,black-swift,16,11,1,QCA_AR933X_SOC) @$(call define_add,CONFIG_FOR_BLACK_SWIFT_BOARD,1) @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240 village-telco_mesh-potato_v2: ar933x_common @$(call config_init,Village Telco Mesh Potato 2,mesh-potato-v2,16,11,1,QCA_AR933X_SOC) @$(call define_add,CONFIG_FOR_MESH_POTATO_V2,1) @$(call define_add,WEBFAILSAFE_DISABLE_ART_UPGRADE,1) @$(call define_add,WEBFAILSAFE_DISABLE_UBOOT_UPGRADE,1) @$(MKCONFIG) -a ap121 mips mips ap121 ar7240 ar7240 wallys_dr531: qca953x_common @$(call config_init,Wallys DR531,dr531,8,17,1,QCA_QCA953X_SOC) @$(call define_add,CONFIG_FOR_WALLYS_DR531,1) @$(call define_add,CFG_ATHRS27_PHY,1) @$(call define_add,CFG_ATH_GMAC_NMACS,2) @$(call define_add,CONFIG_PCI,1) @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240 yuncore_ap90q: qca953x_common @$(call config_init,YunCore AP90Q,ap90q,16,17,1,QCA_QCA953X_SOC) @$(call define_add,CONFIG_FOR_YUNCORE_AP90Q,1) @$(call define_add,CFG_ATHRS27_PHY,1) @$(call define_add,CFG_ATH_GMAC_NMACS,2) @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240 yuncore_cpe830: qca953x_common @$(call config_init,YunCore CPE830,cpe830,16,17,1,QCA_QCA953X_SOC) @$(call define_add,CONFIG_FOR_YUNCORE_CPE830,1) @$(call define_add,CFG_ATHRS27_PHY,1) @$(call define_add,CFG_ATH_GMAC_NMACS,2) @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240 yuncore_cpe870: ar934x_common @$(call config_init,YunCore CPE870,cpe870,8,16,1,QCA_AR9341_SOC) @$(call define_add,CONFIG_FOR_YUNCORE_CPE870,1) @$(call define_add,CFG_ATHRS27_PHY,1) @$(call define_add,CFG_AG7240_NMACS,2) @$(MKCONFIG) -a db12x mips mips db12x ar7240 ar7240 zbtlink_zbt-we1526: qca953x_common @$(call config_init,Zbtlink ZBT-WE1526,zbt-we1526,16,17,1,QCA_QCA953X_SOC) @$(call define_add,CONFIG_FOR_ZBTLINK_ZBT_WE1526,1) @$(call define_add,CFG_ATHRS27_PHY,1) @$(call define_add,CFG_ATH_GMAC_NMACS,2) @$(MKCONFIG) -a ap143 mips mips ap143 ar7240 ar7240 # ============= # CLEAN TARGETS # ============= clean: @$(call echo_green,Making $@...) @find . -type f \ \( -name 'core' -o -name '*.bak' -o -name '*~' \ -o -name '*.o' -o -name '*.a' -o -name .depend \) -print \ | xargs rm -f @rm -f tools/mkimage tools/envcrc @rm -f lib_bootstrap/*.o @rm -f lib_bootstrap/*.a @rm -f bootstrap bootstrap.bin tuboot.bin u-boot.lzimg u-boot.bin.lzma bootstrap.map lzma_host_clean: @$(call echo_green,Removing lzma host utility...) @$(MAKE) -C $(BUILD_TOPDIR)/host_util/lzma -f makefile.gcc clean clobber: clean @$(call echo_green,Making $@...) @find . -type f \( -name .depend \ -o -name '*.srec' -o -name '*.bin' -o -name u-boot.img \) \ -print0 \ | xargs -0 rm -f @rm -f $(OBJS) *.bak include/version_autogenerated.h @rm -fr *.*~ @rm -f u-boot u-boot.map u-boot.hex $(ALL) @rm -f tools/crc32.c tools/environment.c @rm -f include/asm/proc include/asm/arch include/asm distclean: clobber unconfig