| 1 |
# $FreeWRT$ |
| 2 |
#- |
| 3 |
# This file is part of the FreeWRT project. FreeWRT is copyrighted |
| 4 |
# material, please see the LICENCE file in the top-level directory |
| 5 |
# or at http://www.freewrt.org/license for details. |
| 6 |
|
| 7 |
define target_template |
| 8 |
ifeq ($(FWRT_LINUX_$(4)),y) |
| 9 |
KERNEL:=$(1) |
| 10 |
BOARD:=$(2) |
| 11 |
MODEL:=$(3) |
| 12 |
FWRT_LAN:=$(5) |
| 13 |
FWRT_WAN:=$(6) |
| 14 |
FWRT_WLAN:=$(7) |
| 15 |
FWRT_SWITCH:=$(8) |
| 16 |
endif |
| 17 |
endef |
| 18 |
|
| 19 |
# asus models |
| 20 |
$(eval $(call target_template,2.4,brcm,asus-wl500g,2_4_BRCM_ASUS_WL500G,eth0,eth1,eth2,n)) |
| 21 |
$(eval $(call target_template,2.4,brcm,asus-wl500g-deluxe,2_4_BRCM_ASUS_WL500G_DELUXE,eth0.0,eth0.1,eth1,y)) |
| 22 |
$(eval $(call target_template,2.4,brcm,asus-wl500g-premium,2_4_BRCM_ASUS_WL500G_PREMIUM,eth0.0,eth0.1,eth2,y)) |
| 23 |
# linksys models |
| 24 |
$(eval $(call target_template,2.4,brcm,linksys-wrt54gs-10,2_4_BRCM_LINKSYS_WRT54GS_10,eth0.0,eth0.1,eth1,y)) |
| 25 |
$(eval $(call target_template,2.4,brcm,linksys-wrt54gs-11,2_4_BRCM_LINKSYS_WRT54GS_11,eth0.0,eth0.1,eth1,y)) |
| 26 |
$(eval $(call target_template,2.4,brcm,linksys-wrt54gs-4,2_4_BRCM_LINKSYS_WRT54GS_4,eth0.0,eth0.1,eth1,r)) |
| 27 |
$(eval $(call target_template,2.4,brcm,linksys-wrt54g-20,2_4_BRCM_LINKSYS_WRT54G_20,eth0.0,eth0.1,eth1,y)) |
| 28 |
$(eval $(call target_template,2.4,brcm,linksys-wrt54g-22,2_4_BRCM_LINKSYS_WRT54G_22,eth0.0,eth0.1,eth1,y)) |
| 29 |
$(eval $(call target_template,2.4,brcm,linksys-wrt54g-30,2_4_BRCM_LINKSYS_WRT54G_30,eth0.0,eth0.1,eth1,y)) |
| 30 |
$(eval $(call target_template,2.4,brcm,linksys-wrt54g-31,2_4_BRCM_LINKSYS_WRT54G_31,eth0.0,eth0.1,eth1,y)) |
| 31 |
$(eval $(call target_template,2.4,brcm,linksys-wrt54g-4,2_4_BRCM_LINKSYS_WRT54G_4,eth0.0,eth0.1,eth1,y)) |
| 32 |
$(eval $(call target_template,2.4,brcm,linksys-wrt54gl,2_4_BRCM_LINKSYS_WRT54GL,eth0.0,eth0.1,eth1,r)) |
| 33 |
$(eval $(call target_template,2.4,brcm,linksys-wrt54g3g,2_4_BRCM_LINKSYS_WRT54G3G,eth0.0,eth0.1,eth1,y)) |
| 34 |
# netgear models |
| 35 |
$(eval $(call target_template,2.4,brcm,netgear-wgt634u,2_4_BRCM_NETGEAR_WGT634U,eth0.0,eth0.1,ath0,r)) |
| 36 |
|
| 37 |
# set kernel version |
| 38 |
ifeq ($(KERNEL),2.4) |
| 39 |
KERNEL_VERSION=2.4.36.8 |
| 40 |
KERNEL_RELEASE=1 |
| 41 |
KERNEL_MOD_SUFFIX=o |
| 42 |
endif |
| 43 |
|
| 44 |
# set architecture |
| 45 |
ifeq ($(BOARD),brcm) |
| 46 |
CPU_ARCH=mipsel |
| 47 |
KERNEL_ARCH=mips |
| 48 |
endif |
| 49 |
|
| 50 |
|
| 51 |
export BOARD |
| 52 |
export CPU_ARCH |
| 53 |
export KERNEL_ARCH |
| 54 |
export KERNEL |
| 55 |
export KERNEL_VERSION |
| 56 |
export MODEL |
| 57 |
export FWRT_LAN |
| 58 |
export FWRT_WAN |
| 59 |
export FWRT_WLAN |
| 60 |
export FWRT_SWITCH |
| 61 |
|
| 62 |
define rootfs_template |
| 63 |
ifeq ($(FWRT_TARGET_ROOTFS_$(2)),y) |
| 64 |
FS:=$(1) |
| 65 |
endif |
| 66 |
endef |
| 67 |
|
| 68 |
$(eval $(call rootfs_template,jffs2,JFFS2)) |
| 69 |
$(eval $(call rootfs_template,squashfs-overlay,SQUASHFS_OVERLAY)) |
| 70 |
|
| 71 |
export FS |
| 72 |
|
| 73 |
FWRT_VERSION=1.0 |
| 74 |
export FWRT_VERSION |