root/trunk/freewrt/mk/targets.mk

Revision 3710, 5.0 kB (checked in by n0-1, 9 months ago)

hook in fon2100 support into the ADK

Line 
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/licence for details.
6
7 define target_template
8 ifeq ($(FWRT_LINUX_$(4)),y)
9 KERNEL:=$(1)
10 BOARD:=$(2)
11 DEVICE:=$(3)
12 endif
13
14 ifeq ($(FWRT_BUILD_TARGET),y)
15 $(1)/$(2)/$(3)-clean:
16         @$(TRACE) target/linux/$(2)-$(1)-clean
17         $(MAKE) -C $(2)-$(1) BOARD="$(2)" DEVICE="$(3)" clean
18
19 $(1)/$(2)/$(3)-prepare:
20         @$(TRACE) target/linux/$(2)-$(1)-prepare
21         $(MAKE) -C $(2)-$(1) BOARD="$(2)" DEVICE="$(3)" prepare
22
23 $(1)/$(2)/$(3)-compile:
24         @$(TRACE) target/linux/$(2)-$(1)-compile
25         $(MAKE) -C $(2)-$(1) BOARD="$(2)" DEVICE="$(3)" compile
26
27 $(1)/$(2)/$(3)-install:
28         @$(TRACE) target/linux/$(2)-$(1)-install
29         $(MAKE) -C $(2)-$(1) BOARD="$(2)" DEVICE="$(3)" install
30
31 $(1)/$(2)/$(3)-noinstall:
32         @$(TRACE) target/linux/$(2)-$(1)-noinstall
33         $(MAKE) -C $(2)-$(1) BOARD="$(2)" DEVICE="$(3)" noinstall
34
35 ifeq ($(FWRT_LINUX_$(4)),y)
36 clean: $(1)/$(2)/$(3)-clean
37 prepare: $(1)/$(2)/$(3)-prepare
38 compile: $(1)/$(2)/$(3)-compile
39 install: $(1)/$(2)/$(3)-install
40 noinstall: $(1)/$(2)/$(3)-noinstall
41 endif
42
43 .PHONY: $(1)/$(2)/$(3)-clean $(1)/$(2)/$(3)-prepare \
44         $(1)/$(2)/$(3)-compile $(1)/$(2)/$(3)-install
45
46 endif
47 endef
48
49 # asus models
50 $(eval $(call target_template,2.4,brcm,asus-wl-hdd,2_4_BRCM_ASUS_WLHDD))
51 $(eval $(call target_template,2.4,brcm,asus-wl500g,2_4_BRCM_ASUS_WL500G))
52 $(eval $(call target_template,2.4,brcm,asus-wl500g-deluxe,2_4_BRCM_ASUS_WL500G_DELUXE))
53 $(eval $(call target_template,2.4,brcm,asus-wl500g-premium,2_4_BRCM_ASUS_WL500G_PREMIUM))
54 $(eval $(call target_template,2.6,brcm,asus-wl500g-premium,2_6_BRCM_ASUS_WL500G_PREMIUM))
55 # atheros models
56 $(eval $(call target_template,2.6,atheros,atheros-fon2100,2_6_ATHEROS))
57 # linksys models
58 $(eval $(call target_template,2.4,brcm,linksys-wrt54g-old,2_4_BRCM_LINKSYS_WRT54G_OLD))
59 $(eval $(call target_template,2.4,brcm,linksys-wrt54g,2_4_BRCM_LINKSYS_WRT54G))
60 $(eval $(call target_template,2.4,brcm,linksys-wrt54gs,2_4_BRCM_LINKSYS_WRT54GS))
61 $(eval $(call target_template,2.4,brcm,linksys-wrt54gs4,2_4_BRCM_LINKSYS_WRT54GS_4))
62 $(eval $(call target_template,2.4,brcm,linksys-wrt54g3g,2_4_BRCM_LINKSYS_WRT54G3G))
63 # netgear models
64 $(eval $(call target_template,2.4,brcm,netgear-wgt634u,2_4_BRCM_NETGEAR_WGT634U))
65 $(eval $(call target_template,2.6,brcm,netgear-wgt634u,2_6_BRCM_NETGEAR_WGT634U))
66 # routerboard models made by mikrotik
67 $(eval $(call target_template,2.4,rb,rb532,2_4_RB_RB532))
68 $(eval $(call target_template,2.6,rb,rb532,2_6_RB_RB532))
69 # PC engine WRAP
70 $(eval $(call target_template,2.6,x86,wrap,2_6_X86_WRAP))
71 $(eval $(call target_template,2.6,x86,cryptotoken,2_6_X86_CRYPTOTOKEN))
72 # nokernel targets
73 $(eval $(call target_template,2.4,pkgmips,mips,NOKERNEL_MIPS_24))
74 $(eval $(call target_template,2.4,pkgarmeb,armeb,NOKERNEL_ARMEB_24))
75 $(eval $(call target_template,2.4,pkgarm,arm,NOKERNEL_ARM_24))
76 $(eval $(call target_template,2.4,pkgcris,cris,NOKERNEL_CRIS_24))
77 $(eval $(call target_template,2.4,pkgavr32,avr32,NOKERNEL_AVR32_24))
78 $(eval $(call target_template,2.4,pkgpowerpc,powerpc,NOKERNEL_POWERPC_24))
79 $(eval $(call target_template,2.4,pkgi386,i386,NOKERNEL_I386_24))
80 $(eval $(call target_template,2.6,pkgmips,mips,NOKERNEL_MIPS_26))
81 $(eval $(call target_template,2.6,pkgarmeb,armeb,NOKERNEL_ARMEB_26))
82 $(eval $(call target_template,2.6,pkgarm,arm,NOKERNEL_ARM_26))
83 $(eval $(call target_template,2.6,pkgcris,cris,NOKERNEL_CRIS_26))
84 $(eval $(call target_template,2.6,pkgavr32,avr32,NOKERNEL_AVR32_26))
85 $(eval $(call target_template,2.6,pkgpowerpc,powerpc,NOKERNEL_POWERPC_26))
86 $(eval $(call target_template,2.6,pkgi386,i386,NOKERNEL_I386_26))
87
88
89 define rootfs_template
90 ifeq ($(FWRT_TARGET_ROOTFS_$(2)),y)
91 FS:=$(1)
92 FS_CMDLINE:=$(3)
93 endif
94 endef
95
96 $(eval $(call rootfs_template,jffs2,JFFS2,rootfstype=jffs2 root=/dev/mtdblock2))
97 $(eval $(call rootfs_template,squashfs,SQUASHFS,rootfstype=squashfs root=/dev/mtdblock2))
98 $(eval $(call rootfs_template,ramovl,RAMOVL,rootfstype=squashfs root=/dev/mtdblock2))
99 $(eval $(call rootfs_template,nfs,NFS,root=/dev/nfs ip=dhcp))
100 $(eval $(call rootfs_template,ext2-cf,EXT2_CF,root=/dev/cfa2))
101 $(eval $(call rootfs_template,yaffs2,YAFFS2,root=/dev/mtdblock1))
102 $(eval $(call rootfs_template,initramfs,INITRAMFS))
103 $(eval $(call rootfs_template,none,NONE))
104
105
106 # set kernel version
107 KERNEL_VERSION=${UNAME_R}
108 ifeq ($(KERNEL),2.4)
109 KERNEL_RELEASE=1
110 KERNEL_MOD_SUFFIX=o
111 endif
112 ifeq ($(KERNEL),2.6)
113 KERNEL_RELEASE=1
114 KERNEL_MOD_SUFFIX=ko
115 endif
116
117
118 # set architecture
119 ifeq ($(BOARD),atheros)
120 CPU_ARCH=mips
121 KERNEL_ARCH=mips
122 endif
123
124 ifeq ($(BOARD),brcm)
125 CPU_ARCH=mipsel
126 KERNEL_ARCH=mips
127 endif
128
129 ifeq ($(BOARD),rb)
130 CPU_ARCH=mipsel
131 KERNEL_ARCH=mips
132 endif
133
134 ifeq ($(BOARD),x86)
135 CPU_ARCH=i386
136 KERNEL_ARCH=i386
137 endif
138
139 ifeq (${BOARD},pkgarmeb)
140 CPU_ARCH=       armeb
141 KERNEL_ARCH=    arm
142 endif
143
144 ifeq (${BOARD},pkgmips)
145 CPU_ARCH=       mipsel
146 KERNEL_ARCH=    mips
147 endif
148
149 ifeq (${BOARD},pkgi386)
150 CPU_ARCH=       i386
151 KERNEL_ARCH=    i386
152 endif
153
154
155 FWRT_VERSION=devel
156
157 export FWRT_VERSION
158 export BOARD
159 export CPU_ARCH
160 export KERNEL_ARCH
161 export KERNEL
162 export KERNEL_VERSION
163 export DEVICE
164 export FS
Note: See TracBrowser for help on using the browser.