| 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 | endif
|
|---|
| 13 | endef
|
|---|
| 14 |
|
|---|
| 15 | # asus models
|
|---|
| 16 | $(eval $(call target_template,2.4,brcm,asus-wl500g,2_4_BRCM_ASUS_WL500G))
|
|---|
| 17 | $(eval $(call target_template,2.4,brcm,asus-wl500g-deluxe,2_4_BRCM_ASUS_WL500G_DELUXE))
|
|---|
| 18 | $(eval $(call target_template,2.4,brcm,asus-wl500g-premium,2_4_BRCM_ASUS_WL500G_PREMIUM))
|
|---|
| 19 | # linksys models
|
|---|
| 20 | $(eval $(call target_template,2.4,brcm,linksys-wrt54gs-10,2_4_BRCM_LINKSYS_WRT54GS_1_0))
|
|---|
| 21 | $(eval $(call target_template,2.4,brcm,linksys-wrt54gs-11,2_4_BRCM_LINKSYS_WRT54GS_1_1))
|
|---|
| 22 | $(eval $(call target_template,2.4,brcm,linksys-wrt54gs-4,2_4_BRCM_LINKSYS_WRT54GS_4))
|
|---|
| 23 | $(eval $(call target_template,2.4,brcm,linksys-wrt54g-10,2_4_BRCM_LINKSYS_WRT54G_1_0))
|
|---|
| 24 | $(eval $(call target_template,2.4,brcm,linksys-wrt54g-11,2_4_BRCM_LINKSYS_WRT54G_1_1))
|
|---|
| 25 | $(eval $(call target_template,2.4,brcm,linksys-wrt54g-20,2_4_BRCM_LINKSYS_WRT54G_2_0))
|
|---|
| 26 | $(eval $(call target_template,2.4,brcm,linksys-wrt54g-22,2_4_BRCM_LINKSYS_WRT54G_2_2))
|
|---|
| 27 | $(eval $(call target_template,2.4,brcm,linksys-wrt54g-30,2_4_BRCM_LINKSYS_WRT54G_3_0))
|
|---|
| 28 | $(eval $(call target_template,2.4,brcm,linksys-wrt54g-31,2_4_BRCM_LINKSYS_WRT54G_3_1))
|
|---|
| 29 | $(eval $(call target_template,2.4,brcm,linksys-wrt54g-4,2_4_BRCM_LINKSYS_WRT54G_4))
|
|---|
| 30 | $(eval $(call target_template,2.4,brcm,linksys-wrt54gl,2_4_BRCM_LINKSYS_WRT54GL))
|
|---|
| 31 | $(eval $(call target_template,2.4,brcm,linksys-wrt54g3g,2_4_BRCM_LINKSYS_WRT54G3G))
|
|---|
| 32 | # netgear models
|
|---|
| 33 | $(eval $(call target_template,2.4,brcm,netgear-wgt634u,2_4_BRCM_NETGEAR_WGT634U))
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 | # set kernel version
|
|---|
| 37 | ifeq ($(KERNEL),2.4)
|
|---|
| 38 | KERNEL_VERSION=2.4.32
|
|---|
| 39 | KERNEL_RELEASE=1
|
|---|
| 40 | KERNEL_MOD_SUFFIX=o
|
|---|
| 41 | endif
|
|---|
| 42 | ifeq ($(KERNEL),2.6)
|
|---|
| 43 | KERNEL_VERSION=2.6.17
|
|---|
| 44 | KERNEL_RELEASE=1
|
|---|
| 45 | KERNEL_MOD_SUFFIX=ko
|
|---|
| 46 | endif
|
|---|
| 47 |
|
|---|
| 48 | # set architecture
|
|---|
| 49 | ifeq ($(BOARD),brcm)
|
|---|
| 50 | ARCH=mips
|
|---|
| 51 | KARCH=mipsel
|
|---|
| 52 | endif
|
|---|
| 53 |
|
|---|
| 54 | export BOARD
|
|---|
| 55 | export ARCH
|
|---|
| 56 | export KARCH
|
|---|
| 57 | export KERNEL
|
|---|
| 58 | export KERNEL_VERSION
|
|---|
| 59 | export MODEL
|
|---|
| 60 |
|
|---|
| 61 | define rootfs_template
|
|---|
| 62 | ifeq ($(FWRT_TARGET_ROOTFS_$(2)),y)
|
|---|
| 63 | FS:=$(1)
|
|---|
| 64 | endif
|
|---|
| 65 | endef
|
|---|
| 66 |
|
|---|
| 67 | $(eval $(call rootfs_template,jffs2,JFFS2))
|
|---|
| 68 | $(eval $(call rootfs_template,squashfs-overlay,SQUASHFS_OVERLAY))
|
|---|
| 69 | $(eval $(call rootfs_template,squashfs-symlinks,SQUASHFS_SYMLINKS))
|
|---|
| 70 |
|
|---|
| 71 | export FS
|
|---|