| [db5651c] | 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)
|
|---|
| [f9b6d4a0] | 12 | FWRT_LAN:=$(5)
|
|---|
| 13 | FWRT_WAN:=$(6)
|
|---|
| 14 | FWRT_WLAN:=$(7)
|
|---|
| [75af624] | 15 | FWRT_SWITCH:=$(8)
|
|---|
| [db5651c] | 16 | endif
|
|---|
| 17 | endef
|
|---|
| 18 |
|
|---|
| 19 | # asus models
|
|---|
| [75af624] | 20 | $(eval $(call target_template,2.4,brcm,asus-wl500g,2_4_BRCM_ASUS_WL500G,eth0,eth1,eth2,n))
|
|---|
| [0276883] | 21 | $(eval $(call target_template,2.4,brcm,asus-wl500g-deluxe,2_4_BRCM_ASUS_WL500G_DELUXE,eth0.0,eth0.1,eth1,y))
|
|---|
| [75af624] | 22 | $(eval $(call target_template,2.4,brcm,asus-wl500g-premium,2_4_BRCM_ASUS_WL500G_PREMIUM,eth0.0,eth0.1,eth2,y))
|
|---|
| [db5651c] | 23 | # linksys models
|
|---|
| [f665332] | 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))
|
|---|
| [75af624] | 26 | $(eval $(call target_template,2.4,brcm,linksys-wrt54gs-4,2_4_BRCM_LINKSYS_WRT54GS_4,eth0.0,eth0.1,eth1,y))
|
|---|
| [f665332] | 27 | $(eval $(call target_template,2.4,brcm,linksys-wrt54g-10,2_4_BRCM_LINKSYS_WRT54G_10,eth0,eth1,eth2,n))
|
|---|
| 28 | $(eval $(call target_template,2.4,brcm,linksys-wrt54g-11,2_4_BRCM_LINKSYS_WRT54G_11,eth0,eth1,eth2,n))
|
|---|
| 29 | $(eval $(call target_template,2.4,brcm,linksys-wrt54g-20,2_4_BRCM_LINKSYS_WRT54G_20,eth0.0,eth0.1,eth1,y))
|
|---|
| 30 | $(eval $(call target_template,2.4,brcm,linksys-wrt54g-22,2_4_BRCM_LINKSYS_WRT54G_22,eth0.0,eth0.1,eth1,y))
|
|---|
| 31 | $(eval $(call target_template,2.4,brcm,linksys-wrt54g-30,2_4_BRCM_LINKSYS_WRT54G_30,eth0.0,eth0.1,eth1,y))
|
|---|
| 32 | $(eval $(call target_template,2.4,brcm,linksys-wrt54g-31,2_4_BRCM_LINKSYS_WRT54G_31,eth0.0,eth0.1,eth1,y))
|
|---|
| [75af624] | 33 | $(eval $(call target_template,2.4,brcm,linksys-wrt54g-4,2_4_BRCM_LINKSYS_WRT54G_4,eth0.0,eth0.1,eth1,y))
|
|---|
| [3f4cfaf] | 34 | $(eval $(call target_template,2.4,brcm,linksys-wrt54gl,2_4_BRCM_LINKSYS_WRT54GL,eth0.0,eth0.1,eth1,r))
|
|---|
| [75af624] | 35 | $(eval $(call target_template,2.4,brcm,linksys-wrt54g3g,2_4_BRCM_LINKSYS_WRT54G3G,eth0.0,eth0.1,eth1,y))
|
|---|
| [db5651c] | 36 | # netgear models
|
|---|
| [75af624] | 37 | $(eval $(call target_template,2.4,brcm,netgear-wgt634u,2_4_BRCM_NETGEAR_WGT634U,eth0.0,eth0.1,ath0,r))
|
|---|
| [db5651c] | 38 |
|
|---|
| 39 | # set kernel version
|
|---|
| 40 | ifeq ($(KERNEL),2.4)
|
|---|
| [fd80cb9] | 41 | KERNEL_VERSION=2.4.33.3
|
|---|
| [db5651c] | 42 | KERNEL_RELEASE=1
|
|---|
| 43 | KERNEL_MOD_SUFFIX=o
|
|---|
| 44 | endif
|
|---|
| 45 |
|
|---|
| 46 | # set architecture
|
|---|
| 47 | ifeq ($(BOARD),brcm)
|
|---|
| [94a3833] | 48 | CPU_ARCH=mipsel
|
|---|
| 49 | KERNEL_ARCH=mips
|
|---|
| [db5651c] | 50 | endif
|
|---|
| 51 |
|
|---|
| [587c2aa] | 52 |
|
|---|
| [db5651c] | 53 | export BOARD
|
|---|
| [94a3833] | 54 | export CPU_ARCH
|
|---|
| 55 | export KERNEL_ARCH
|
|---|
| [db5651c] | 56 | export KERNEL
|
|---|
| 57 | export KERNEL_VERSION
|
|---|
| 58 | export MODEL
|
|---|
| [f9b6d4a0] | 59 | export FWRT_LAN
|
|---|
| 60 | export FWRT_WAN
|
|---|
| 61 | export FWRT_WLAN
|
|---|
| [75af624] | 62 | export FWRT_SWITCH
|
|---|
| [db5651c] | 63 |
|
|---|
| 64 | define rootfs_template
|
|---|
| 65 | ifeq ($(FWRT_TARGET_ROOTFS_$(2)),y)
|
|---|
| 66 | FS:=$(1)
|
|---|
| 67 | endif
|
|---|
| 68 | endef
|
|---|
| 69 |
|
|---|
| 70 | $(eval $(call rootfs_template,jffs2,JFFS2))
|
|---|
| [5ae545c] | 71 | $(eval $(call rootfs_template,squashfs-overlay,SQUASHFS_OVERLAY))
|
|---|
| 72 | $(eval $(call rootfs_template,squashfs-symlinks,SQUASHFS_SYMLINKS))
|
|---|
| [db5651c] | 73 |
|
|---|
| 74 | export FS
|
|---|
| [eb12bb9] | 75 |
|
|---|
| 76 | FWRT_VERSION=1.0
|
|---|
| 77 | export FWRT_VERSION
|
|---|