3 # Toplevel Makefile for the BCM947xx Linux Router release
5 # Copyright 2005, Broadcom Corporation
8 # THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
9 # KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
10 # SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
11 # FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
13 # $Id: Makefile,v 1.53 2005/04/25 03:54:37 tallest Exp $
16 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
18 # To rebuild everything and all configurations:
20 # make V1=whatever V2=sub-whatever VPN=vpn3.6 a b c d m n
21 # The 1st "whatever" would be the build number, the sub-whatever would
22 # be the update to the version.
25 # make V1=8516 V2="-jffs.1" a b c d m s
27 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
30 export ac_cv_func_malloc_0_nonnull
=yes
31 export SRCBASE
:= $(shell pwd
)
32 RELEASEDIR
:= $(shell (cd
$(SRCBASE
)/..
&& pwd
-P
))
33 PATH
:= $(RELEASEDIR
)/tools
:$(PATH
)
38 # Normally you'd do something like "make V1=8516 V2=-sub-ver a b c d"
39 # But if you don't give anything for "V1", it'll get a default from tomato_version.
40 current_TOMATO_V1 ?
= "--def"
44 ifeq ($(CONFIG_LINUX26
),y
)
45 ifeq ($(CONFIG_BCMWL6
),y
)
77 WNRTOOL
=$(SRCBASE
)/wnrtool
78 BOARD_FILE
=$(WNRTOOL
)/compatible_WNR3500Lv2.txt
79 fw_cfg_file
:= $(WNRTOOL
)/ambitCfg.h
83 EXTRA_64KDESC
= ' -64K'
84 EXTRA_64KCFLAG
= '-DTCONFIG_NVRAM_64K'
90 -include tomato_profile.mak
92 # This could be simpler by just using $(TOMATO_PROFILE_NAME) like it used to be,
93 # but that's fragile. If you make one certain innocuous change elsewhere in the
94 # makefile(s), the build will silently be wrong. This way it works properly every time.
95 current_BUILD_NAME
= $(strip $(shell grep
"^TOMATO_BUILD_NAME" tomato_profile.mak | cut
-d
"=" -f2
))
96 current_BUILD_DESC
= $(strip $(shell grep
"^TOMATO_BUILD_DESC" tomato_profile.mak | cut
-d
"=" -f2 | sed
-e
"s/ //g"))
97 current_BUILD_USB
= $(strip $(shell grep
"^TOMATO_BUILD_USB" tomato_profile.mak | cut
-d
"=" -f2 | sed
-e
"s/ //g"))
98 current_TOMATO_VER
= $(strip $(shell grep
"TOMATO_MAJOR" router
/shared
/tomato_version.h | cut
-d
"\"" -f2
)).
$(strip $(shell grep
"TOMATO_MINOR" router
/shared
/tomato_version.h | cut
-d
"\"" -f2
))
99 current_TOMATO_MIPS32
= $(strip $(shell grep
"^TOMATO_BUILD_MIPS32" tomato_profile.mak | cut
-d
"=" -f2 | sed
-e
"s/ //g" | sed
-e
"s/\"//g" ))
100 current_TOMATO_V1
= $(strip $(shell grep
"^TOMATO_BUILD_V1" tomato_profile.mak | cut
-d
"=" -f2 | sed
-e
"s/ //g" | sed
-e
"s/\"//g" ))
101 current_TOMATO_V2
= $(strip $(shell grep
"^TOMATO_BUILD_V2" tomato_profile.mak | cut
-d
"=" -f2 | sed
-e
"s/ //g" | sed
-e
"s/\"//g" ))
102 current_TOMATO_B
= $(strip $(shell grep
"^TOMATO_BUILD_NAME" tomato_profile.mak | cut
-d
"=" -f2 | sed
-e
"s/ //g" | sed
-e
"s/\"//g" ))
103 current_TOMATO_N
= $(strip $(shell grep
"^TOMATO_PROFILE_NAME" tomato_profile.mak | cut
-d
"=" -f2 | sed
-e
"s/ //g" | sed
-e
"s/\"//g" ))
104 N
=$(current_TOMATO_N
)
105 B
=$(current_TOMATO_B
)
107 uppercase_N
= $(shell echo
$(N
) | tr a-z A-Z
)
108 lowercase_N
= $(shell echo
$(N
) | tr A-Z a-z
)
109 uppercase_B
= $(shell echo
$(B
) | tr a-z A-Z
)
110 lowercase_B
= $(shell echo
$(B
) | tr A-Z a-z
)
112 ifeq ($(CONFIG_LINUX26
),y
)
113 mips_rev
= $(if
$(filter $(current_TOMATO_MIPS32
),r2
),MIPSR2
,MIPSR1
)
121 beta
= $(if
$(filter $(TOMATO_EXPERIMENTAL
),1),-beta
,)
125 @btools
/uversion.pl
--gen
$(current_TOMATO_V1
) $(mips_rev
)$(beta
)$(current_TOMATO_V2
) $(ND
) $(current_BUILD_USB
) $(current_BUILD_DESC
)
127 ifeq ($(TOMATO_BUILD
),)
136 @echo
"Building Tomato $(ND) $(current_BUILD_USB) $(current_TOMATO_VER).$(current_TOMATO_V1)$(mips_rev)$(beta)$(current_TOMATO_V2) $(current_BUILD_DESC) $(current_BUILD_NAME) with $(TOMATO_PROFILE_NAME) Profile"
142 @
$(MAKE
) -C router
all
143 @
$(MAKE
) -C router
install
146 @
rm -f image
/tomato-
$(ND
)$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).trx
147 @
rm -f image
/tomato-
$(ND
)$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin
151 # Create generic TRX image
152 ctools
/objcopy
-O binary
-R .reginfo
-R .note
-R .comment
-R .mdebug
-S
$(LINUXDIR
)/vmlinux ctools
/piggy
153 ctools
/lzma_4k e ctools
/piggy ctools
/vmlinuz-lzma
154 ctools
/mksquashfs router
/mipsel-uclibc
/target ctools
/target.squashfs
-noappend
-all-root
155 ctools
/trx
-o image
/linux-lzma.trx ctools
/vmlinuz-lzma ctools
/target.squashfs
156 ctools
/trx_asus
-i image
/linux-lzma.trx
-r
$(BUILD_NAME
),$(KERNEL_VER
).
$(FS_VER
),image
/tomato-RT-AC66U_
$(V1
)$(V2
)-$(current_BUILD_DESC
).trx
157 @
rm -f image
/linux-lzma.trx
163 ctools
/objcopy
-O binary
-R .reginfo
-R .note
-R .comment
-R .mdebug
-S
$(LINUXDIR
)/vmlinux ctools
/piggy
164 ctools
/lzma_4k e ctools
/piggy ctools
/vmlinuz-lzma
165 ctools
/mksquashfs router
/mipsel-uclibc
/target ctools
/target.squashfs
-noappend
-all-root
166 ctools
/trx
-o image
/linux-lzma.trx ctools
/vmlinuz-lzma ctools
/target.squashfs
167 ctools
/trx_asus
-i image
/linux-lzma.trx
-r
$(BUILD_NAME
),$(KERNEL_VER
).
$(FS_VER
),image
/tomato-W1800R_
$(V1
)$(V2
)-$(current_BUILD_DESC
).trx
168 @
rm -f image
/linux-lzma.trx
172 ifeq ($(WNR3500LV2
),y
)
173 @echo
"Creating Firmware for Netgear WNR3500L v2 .... "
174 mipsel-uclibc-objcopy
-O binary
-g
$(LINUXDIR
)/vmlinux image
/vmlinux.bin
175 $(WNRTOOL
)/lzma e image
/vmlinux.bin image
/vmlinux.lzma
176 $(WNRTOOL
)/trx
-o image
/tomato-wnr3500lv2.trx image
/vmlinux.lzma
$(SRCBASE
)/router
/mipsel-uclibc
/target.image
177 rm -f image
/vmlinux.bin image
/vmlinux.lzma
178 cd image
&& touch rootfs
179 cd image
&& $(WNRTOOL
)/packet
-k tomato-wnr3500lv2.trx
-f rootfs
-b
$(BOARD_FILE
) -ok kernel_image
-oall kernel_rootfs_image
-or rootfs_image
-i
$(fw_cfg_file
) && rm -f rootfs
&& \
180 cp kernel_rootfs_image.chk tomato-Netgear-3500Lv2-
$(ND
)$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).chk
182 rm -f image
/*image.chk image
/*.trx
186 ifneq ($(current_TOMATO_MIPS32
),r2
)
187 @
rm -f image
/tomato-WRT54
*$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin
188 @
rm -f image
/tomato-WRTSL54
*$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin
189 @
rm -f image
/tomato-WR850G
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin
192 ifeq ($(LINKSYS_E
),y
)
193 @
rm -f image
/tomato-E??????
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin
195 ifeq ($(LINKSYS_E_64k
),y
)
196 @
rm -f image
/tomato-E??????
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin
198 ifeq ($(LINKSYS_E1200v1
),y
)
199 @
rm -f image
/tomato-E1200v1
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin
201 ifeq ($(LINKSYS_E1000v2
),y
)
202 @
rm -f image
/tomato-E1000v2-v21
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin
203 @
rm -f image
/tomato-Cisco-M10v2
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin
206 ifneq ($(NVRAM_SIZE
),60)
207 @
rm -f image
/tomato-F7D????
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin
208 @
rm -f image
/tomato-F5D8235v3
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin
212 ifneq ($(NVRAM_SIZE
),60)
213 @
rm -f image
/tomato-F7D????
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin
214 @
rm -f image
/tomato-F5D8235v3
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin
218 @echo
"***********************" `date` "************************" >>fpkg.log
219 @cat router
/shared
/tomato_version
>>fpkg.log
221 @cat router
/target.
info >>fpkg.log
223 ifneq ($(current_TOMATO_MIPS32
),r2
)
224 @btools
/fpkg
-i lzma-loader
/loader.gz
-i
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/vmlinuz
-a
1024 -i router
/mipsel-uclibc
/target.image \
225 -l W54G
,image
/tomato-WRT54G_WRT54GL
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
226 -l W54S
,image
/tomato-WRT54GS
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
227 -l W54s
,image
/tomato-WRT54GSv4
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
228 -l W54U
,image
/tomato-WRTSL54GS
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
229 -m
0x10577050,image
/tomato-WR850G
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
233 ifeq ($(LINKSYS_E
),y
)
234 # Linksys E-series(60k Nvram) images
235 @btools
/fpkg
-i lzma-loader
/loader.gz
-i
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/vmlinuz
-a
1024 -i router
/mipsel-uclibc
/target.image \
236 -l
1550,image
/tomato-E1550
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
237 -l
4200,image
/tomato-E4200
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
238 -l
61XN
,image
/tomato-E3000
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
239 -l
32XN
,image
/tomato-E2000
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
242 ifeq ($(LINKSYS_E2500
),y
)
243 # Linksys E2500(60k Nvram) image
244 @btools
/fpkg
-i lzma-loader
/loader.gz
-i
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/vmlinuz
-a
1024 -i router
/mipsel-uclibc
/target.image \
245 -l E25X
,image
/tomato-E2500
$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
248 ifeq ($(LINKSYS_E3200
),y
)
249 # Linksys E3200(60k Nvram) image
250 @btools
/fpkg
-i lzma-loader
/loader.gz
-i
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/vmlinuz
-a
1024 -i router
/mipsel-uclibc
/target.image \
251 -l
3200,image
/tomato-E3200
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
254 ifeq ($(LINKSYS_E_64k
),y
)
255 # Linksys E-series(64k Nvram) images
256 @btools
/fpkg
-i lzma-loader
/loader.gz
-i
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/vmlinuz
-a
1024 -i router
/mipsel-uclibc
/target.image \
257 -l E800
,image
/tomato-E800
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
258 -l E900
,image
/tomato-E900
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
259 -l E122
,image
/tomato-E1200v2
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
260 -l E150
,image
/tomato-E1500
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
263 ifeq ($(LINKSYS_E1000v2
),y
)
264 # Linksys E1000v2/v2.1 images
265 @btools
/fpkg
-i lzma-loader
/loader.gz
-i
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/vmlinuz
-a
1024 -i router
/mipsel-uclibc
/target.image \
266 -l E100
,image
/tomato-E1000v2-v21
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
267 -l M010
,image
/tomato-Cisco-M10v2
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
270 ifeq ($(LINKSYS_E1200v1
),y
)
271 # Linksys E1200v1 images
272 @btools
/fpkg
-i lzma-loader
/loader.gz
-i
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/vmlinuz
-a
1024 -i router
/mipsel-uclibc
/target.image \
273 -l E120
,image
/tomato-E1200v1
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
277 ifneq ($(NVRAM_SIZE
),60)
278 # Create Belkin images
279 @btools
/fpkg
-i lzma-loader
/loader.gz
-i
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/vmlinuz
-a
1024 -i router
/mipsel-uclibc
/target.image \
280 -b
0x20100322,image
/tomato-F7D3301
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
281 -b
0x20090928,image
/tomato-F7D3302
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
282 -b
0x20091006,image
/tomato-F7D4302
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
283 -b
0x00017116,image
/tomato-F5D8235v3
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
287 # Create generic TRX image
288 @btools
/fpkg
-i lzma-loader
/loader.gz
-i
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/vmlinuz
-a
1024 -i router
/mipsel-uclibc
/target.image \
289 -t image
/tomato-
$(ND
)$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).trx \
292 @cp fpkg.log image
/fpkg-
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
).log
294 @echo
"-----------------"
295 @echo
`cat router/shared/tomato_version` " ready"
296 @echo
"-----------------"
297 ifneq ($(NOVERSION
),1)
298 @cp router
/shared
/tomato_version router
/shared
/tomato_version_last
299 @btools
/uversion.pl
--bump
306 @touch router
/.config
307 @
rm -f router
/config_
[a-z
]
308 @
rm -f router
/busybox
/config_
[a-z
]
309 @
$(MAKE
) -C router
$@
310 @
-rmdir router
/mipsel-uclibc
315 @
rm -f router
/.config
316 @touch router
/.config
320 @
$(MAKE
) -C
$(LINUXDIR
)/scripts
/squashfs
clean
321 @
$(MAKE
) -C btools
clean
325 mv .config save-config
&& \
326 $(MAKE
) distclean || true
; \
327 cp
-p save-config .config || true
330 @
$(MAKE
) -C router kernel
331 @ls
-l
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/zImage
333 distclean: clean cleanimage cleankernel cleantools
334 ifneq ($(INSIDE_MAK
),1)
335 @
$(MAKE
) -C router
$@ INSIDE_MAK
=1
337 mv router
/busybox
/.config busybox-saved-config || true
338 @
$(MAKE
) -C router
/busybox
distclean
339 @
rm -f router
/busybox
/config_current
340 @cp
-p busybox-saved-config router
/busybox
/.config || true
341 @cp
-p router
/busybox
/.config router
/busybox
/config_current || true
342 @
rm -f router
/config_current
343 @
rm -f router
/.config.cmd router
/.config.old router
/.config
344 @
rm -f router
/libfoo_xref.txt
345 @
rm -f tomato_profile.mak router
/shared
/tomato_profile.h
346 @touch tomato_profile.mak
347 @touch router
/shared
/tomato_profile.h
352 rm -f config_current
; \
353 ln
-s config_base config_current
; \
354 cp
-f config_current .config
355 $(MAKE
) -C
$(LINUXDIR
) oldconfig
356 ifneq ($(CONFIG_LINUX26
),y
)
357 $(MAKE
) -C
$(LINUXDIR
) dep
362 @echo
"$(current_BUILD_DESC)-$(current_BUILD_NAME)-$(TOMATO_PROFILE_NAME) Profile"
366 # The methodology for making the different builds is to
367 # copy the "base" config file to the "target" config file in
368 # the appropriate directory, and then edit it by removing and
369 # inserting the desired configuration lines.
370 # You can't just delete the "whatever=y" line, you must have
371 # a "...is not set" line, or the make oldconfig will stop and ask
374 # Options for "make bin" :
375 # BUILD_DESC (Std|Lite|Ext|...)
381 # NO_CIFS, NO_SSH, NO_ZEBRA, NO_SAMBA, NO_HTTPS, NO_XXTP, NO_LIBOPT, NO_FTP
382 # SAMBA3, OPENVPN, IPV6SUPP, EBTABLES, NTFS, MEDIASRV, BBEXTRAS, USBEXTRAS, BCM57, SLIM
383 # NOCAT, SNMP, USERPPTP, VLAN, USBAP, NO_USBAPP, NGINX, DNSCRYPT
387 if
[ "$(CONFIG_LINUX26)" = "y" ] ||
[ "$(SAMBA3)" = "y" ]; then \
388 sed
-i
"/TCONFIG_SAMBA3/d" $(1); \
389 echo
"TCONFIG_SAMBA3=y" >>$(1); \
391 sed
-i
"/TCONFIG_EMF/d" $(1); \
392 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
393 if
[ "$(SLIM)" = "y" ]; then \
394 echo
"# TCONFIG_EMF is not set" >>$(1); \
396 echo
"TCONFIG_EMF=y" >>$(1); \
399 echo
"# TCONFIG_EMF is not set" >>$(1); \
401 sed
-i
"/TCONFIG_JFFSV1/d" $(1); \
402 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
403 if
[ "$(JFFSv1)" = "y" ]; then \
404 echo
"TCONFIG_JFFSV1=y" >>$(1); \
406 echo
"# TCONFIG_JFFSV1 is not set" >>$(1); \
409 echo
"TCONFIG_JFFSV1=y" >>$(1); \
411 if
[ "$(USB)" = "USB" ]; then \
412 sed
-i
"/TCONFIG_USB is not set/d" $(1); \
413 echo
"TCONFIG_USB=y" >>$(1); \
414 if
[ "$(USBEXTRAS)" = "y" ]; then \
415 sed
-i
"/TCONFIG_USB_EXTRAS/d" $(1); \
416 echo
"TCONFIG_USB_EXTRAS=y" >>$(1); \
418 if
[ "$(NTFS)" = "y" ]; then \
419 sed
-i
"/TCONFIG_NTFS/d" $(1); \
420 echo
"TCONFIG_NTFS=y" >>$(1); \
422 if
[ "$(MEDIASRV)" = "y" ]; then \
423 sed
-i
"/TCONFIG_MEDIA_SERVER/d" $(1); \
424 echo
"TCONFIG_MEDIA_SERVER=y" >>$(1); \
427 sed
-i
"/TCONFIG_USB=y/d" $(1); \
428 echo
"# TCONFIG_USB is not set" >>$(1); \
430 if
[ "$(NO_SAMBA)" = "y" ]; then \
431 sed
-i
"/TCONFIG_SAMBASRV/d" $(1); \
432 echo
"# TCONFIG_SAMBASRV is not set" >>$(1); \
434 if
[ "$(NO_ZEBRA)" = "y" ]; then \
435 sed
-i
"/TCONFIG_ZEBRA/d" $(1); \
436 echo
"# TCONFIG_ZEBRA is not set" >>$(1); \
438 if
[ "$(NO_JFFS)" = "y" ]; then \
439 sed
-i
"/TCONFIG_JFFS2/d" $(1); \
440 echo
"# TCONFIG_JFFS2 is not set" >>$(1); \
441 sed
-i
"/TCONFIG_JFFSV1/d" $(1); \
442 echo
"# TCONFIG_JFFSV1 is not set" >>$(1); \
444 if
[ "$(NO_CIFS)" = "y" ]; then \
445 sed
-i
"/TCONFIG_CIFS/d" $(1); \
446 echo
"# TCONFIG_CIFS is not set" >>$(1); \
448 if
[ "$(NO_FTP)" = "y" ]; then \
449 sed
-i
"/TCONFIG_FTP/d" $(1); \
450 echo
"# TCONFIG_FTP is not set" >>$(1); \
452 if
[ "$(NO_SSH)" = "y" ]; then \
453 sed
-i
"/TCONFIG_SSH/d" $(1); \
454 echo
"# TCONFIG_SSH is not set" >>$(1); \
456 if
[ "$(NO_HTTPS)" = "y" ]; then \
457 sed
-i
"/TCONFIG_HTTPS/d" $(1); \
458 echo
"# TCONFIG_HTTPS is not set" >>$(1); \
460 if
[ "$(NO_XXTP)" = "y" ]; then \
461 sed
-i
"/TCONFIG_L2TP/d" $(1); \
462 echo
"# TCONFIG_L2TP is not set" >>$(1); \
463 sed
-i
"/TCONFIG_PPTP/d" $(1); \
464 echo
"# TCONFIG_PPTP is not set" >>$(1); \
466 if
[ "$(NO_LIBOPT)" = "y" ]; then \
467 sed
-i
"/TCONFIG_OPTIMIZE_SHARED_LIBS/d" $(1); \
468 echo
"# TCONFIG_OPTIMIZE_SHARED_LIBS is not set" >>$(1); \
470 if
[ "$(EBTABLES)" = "y" ]; then \
471 sed
-i
"/TCONFIG_EBTABLES/d" $(1); \
472 echo
"TCONFIG_EBTABLES=y" >>$(1); \
474 if
[ "$(IPV6SUPP)" = "y" ]; then \
475 sed
-i
"/TCONFIG_IPV6/d" $(1); \
476 echo
"TCONFIG_IPV6=y" >>$(1); \
478 if
[ "$(NOCAT)" = "y" ]; then \
479 sed
-i
"/TCONFIG_NOCAT/d" $(1); \
480 echo
"TCONFIG_NOCAT=y" >>$(1); \
482 if
[ "$(NGINX)" = "y" ]; then \
483 sed
-i
"/TCONFIG_NGINX/d" $(1); \
484 sed
-i
"/TCONFIG_ZLIB/d" $(1); \
485 echo
"TCONFIG_NGINX=y" >>$(1); \
486 echo
"TCONFIG_ZLIB=y" >>$(1); \
488 if
[ "$(OPENVPN)" = "y" ]; then \
489 sed
-i
"/TCONFIG_LZO/d" $(1); \
490 echo
"TCONFIG_LZO=y" >>$(1); \
491 sed
-i
"/TCONFIG_OPENVPN/d" $(1); \
492 echo
"TCONFIG_OPENVPN=y" >>$(1); \
493 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
494 sed
-i
"/TCONFIG_FTP_SSL/d" $(1); \
495 echo
"TCONFIG_FTP_SSL=y" >>$(1); \
498 if
[ "$(SNMP)" = "y" ]; then \
499 sed
-i
"/TCONFIG_SNMP/d" $(1); \
500 echo
"TCONFIG_SNMP=y" >>$(1); \
502 if
[ "$(USERPPTP)" = "y" ]; then \
503 sed
-i
"/TCONFIG_USERPPTP/d" $(1); \
504 echo
"TCONFIG_USERPPTP=y" >>$(1); \
506 if
[ "$(VLAN)" = "y" ]; then \
507 sed
-i
"/TCONFIG_VLAN/d" $(1); \
508 echo
"TCONFIG_VLAN=y" >>$(1); \
510 if
[ "$(PPTPD)" = "y" ]; then \
511 sed
-i
"/TCONFIG_PPTPD/d" $(1); \
512 echo
"TCONFIG_PPTPD=y" >>$(1); \
514 if
[ "$(DNSCRYPT)" = "y" ]; then \
515 sed
-i
"/TCONFIG_DNSCRYPT/d" $(1); \
516 echo
"TCONFIG_DNSCRYPT=y" >>$(1); \
518 if
[ "$(NVRAM_64K)" = "y" ]; then \
519 sed
-i
"/TCONFIG_NVRAM_64K/d" $(1); \
520 echo
"TCONFIG_NVRAM_64K=y" >>$(1); \
522 if
[ "$(TCPDUMP)" = "y" ]; then \
523 sed
-i
"/TCONFIG_TCPDUMP/d" $(1); \
524 echo
"TCONFIG_TCPDUMP=y" >>$(1); \
526 if
[ "$(USBAP)" = "y" ]; then \
527 sed
-i
"/TCONFIG_USBAP/d" $(1); \
528 echo
"TCONFIG_USBAP=y" >>$(1); \
529 if
[ "$(NO_USBAPP)" = "y" ]; then \
530 sed
-i
"/TCONFIG_REMOVE_USBAPP/d" $(1); \
531 echo
"TCONFIG_REMOVE_USBAPP=y" >>$(1); \
532 sed
-i
"/TCONFIG_FTP/d" $(1); \
533 echo
"# TCONFIG_FTP is not set" >>$(1); \
534 echo
"# TCONFIG_FTP_SSL is not set" >>$(1); \
535 sed
-i
"/TCONFIG_SAMBA/d" $(1); \
536 echo
"# TCONFIG_SAMBASRV is not set" >>$(1); \
537 echo
"# TCONFIG_SAMBA3 is not set" >>$(1); \
543 define BusyboxOptions
545 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
546 sed
-i
"/CONFIG_FEATURE_2_4_MODULES/d" $(1); \
547 echo
"# CONFIG_FEATURE_2_4_MODULES is not set" >>$(1); \
548 sed
-i
"/CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT/d" $(1); \
549 echo
"CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y" >>$(1); \
550 sed
-i
"/CONFIG_FEATURE_DEVFS/d" $(1); \
551 echo
"# CONFIG_FEATURE_DEVFS is not set" >>$(1); \
552 sed
-i
"/CONFIG_MKNOD/d" $(1); \
553 echo
"CONFIG_MKNOD=y" >>$(1); \
554 sed
-i
"/CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE/d" $(1); \
555 echo
"CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=512" >>$(1); \
557 sed
-i
"/CONFIG_UDHCPC=y/d" $(1); \
558 sed
-i
"/CONFIG_UDHCPC_OLD/d" $(1); \
559 echo
"CONFIG_UDHCPC_OLD=y" >>$(1); \
560 echo
"# CONFIG_UDHCPC is not set" >>$(1); \
562 if
[ "$(NO_CIFS)" = "y" ]; then \
563 sed
-i
"/CONFIG_FEATURE_MOUNT_CIFS/d" $(1); \
564 echo
"# CONFIG_FEATURE_MOUNT_CIFS is not set" >>$(1); \
566 if
[ "$(BBEXTRAS)" = "y" ]; then \
567 sed
-i
"/CONFIG_SENDMAIL/d" $(1); \
568 echo
"CONFIG_SENDMAIL=y" >>$(1); \
569 sed
-i
"/CONFIG_FEATURE_SORT_BIG/d" $(1); \
570 echo
"CONFIG_FEATURE_SORT_BIG=y" >>$(1); \
571 sed
-i
"/CONFIG_FTPPUT/d" $(1); \
572 echo
"CONFIG_FTPPUT=y" >>$(1); \
573 sed
-i
"/CONFIG_FTPGET/d" $(1); \
574 echo
"CONFIG_FTPGET=y" >>$(1); \
575 sed
-i
"/CONFIG_CLEAR/d" $(1); \
576 echo
"CONFIG_CLEAR=y" >>$(1); \
577 sed
-i
"/CONFIG_NICE/d" $(1); \
578 echo
"CONFIG_NICE=y" >>$(1); \
579 sed
-i
"/CONFIG_SETCONSOLE/d" $(1); \
580 echo
"CONFIG_SETCONSOLE=y" >>$(1); \
581 sed
-i
"/CONFIG_MKFIFO/d" $(1); \
582 echo
"CONFIG_MKFIFO=y" >>$(1); \
584 if
[ "$(USB)" = "USB" ]; then \
585 if
[ "$(USBEXTRAS)" = "y" ]; then \
586 sed
-i
"/CONFIG_E2FSCK/d" $(1); \
587 echo
"CONFIG_E2FSCK=y" >>$(1); \
588 sed
-i
"/CONFIG_MKE2FS/d" $(1); \
589 echo
"CONFIG_MKE2FS=y" >>$(1); \
590 sed
-i
"/CONFIG_FDISK/d" $(1); \
591 echo
"CONFIG_FDISK=y" >>$(1); \
592 sed
-i
"/CONFIG_FEATURE_FDISK_WRITABLE/d" $(1); \
593 echo
"CONFIG_FEATURE_FDISK_WRITABLE=y" >>$(1); \
594 sed
-i
"/CONFIG_MKFS_VFAT/d" $(1); \
595 echo
"CONFIG_MKFS_VFAT=y" >>$(1); \
596 sed
-i
"/CONFIG_MKSWAP/d" $(1); \
597 echo
"CONFIG_MKSWAP=y" >>$(1); \
598 sed
-i
"/CONFIG_FLOCK/d" $(1); \
599 echo
"CONFIG_FLOCK=y" >>$(1); \
600 sed
-i
"/CONFIG_FSYNC/d" $(1); \
601 echo
"CONFIG_FSYNC=y" >>$(1); \
602 sed
-i
"/CONFIG_TUNE2FS/d" $(1); \
603 echo
"CONFIG_TUNE2FS=y" >>$(1); \
604 sed
-i
"/CONFIG_E2LABEL/d" $(1); \
605 echo
"CONFIG_E2LABEL=y" >>$(1); \
606 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
607 sed
-i
"/CONFIG_LSUSB/d" $(1); \
608 echo
"CONFIG_LSUSB=y" >>$(1); \
609 sed
-i
"/CONFIG_FEATURE_WGET_STATUSBAR/d" $(1); \
610 echo
"CONFIG_FEATURE_WGET_STATUSBAR=y" >>$(1); \
611 sed
-i
"/CONFIG_FEATURE_VERBOSE_USAGE/d" $(1); \
612 echo
"CONFIG_FEATURE_VERBOSE_USAGE=y" >>$(1); \
616 sed
-i
"/CONFIG_FEATURE_MOUNT_LOOP/d" $(1); \
617 echo
"# CONFIG_FEATURE_MOUNT_LOOP is not set" >>$(1); \
618 sed
-i
"/CONFIG_FEATURE_DEVFS/d" $(1); \
619 echo
"# CONFIG_FEATURE_DEVFS is not set" >>$(1); \
620 sed
-i
"/CONFIG_FEATURE_MOUNT_LABEL/d" $(1); \
621 echo
"# CONFIG_FEATURE_MOUNT_LABEL is not set" >>$(1); \
622 sed
-i
"/CONFIG_FEATURE_MOUNT_FSTAB/d" $(1); \
623 echo
"# CONFIG_FEATURE_MOUNT_FSTAB is not set" >>$(1); \
624 sed
-i
"/CONFIG_VOLUMEID/d" $(1); \
625 echo
"# CONFIG_VOLUMEID is not set" >>$(1); \
626 sed
-i
"/CONFIG_BLKID/d" $(1); \
627 echo
"# CONFIG_BLKID is not set" >>$(1); \
628 sed
-i
"/CONFIG_SWAPONOFF/d" $(1); \
629 echo
"# CONFIG_SWAPONOFF is not set" >>$(1); \
630 sed
-i
"/CONFIG_CHROOT/d" $(1); \
631 echo
"# CONFIG_CHROOT is not set" >>$(1); \
632 sed
-i
"/CONFIG_PIVOT_ROOT/d" $(1); \
633 echo
"# CONFIG_PIVOT_ROOT is not set" >>$(1); \
634 sed
-i
"/CONFIG_TRUE/d" $(1); \
635 echo
"# CONFIG_TRUE is not set" >>$(1); \
637 if
[ "$(IPV6SUPP)" = "y" ]; then \
638 sed
-i
"/CONFIG_FEATURE_IPV6/d" $(1); \
639 echo
"CONFIG_FEATURE_IPV6=y" >>$(1); \
640 sed
-i
"/CONFIG_PING6/d" $(1); \
641 echo
"CONFIG_PING6=y" >>$(1); \
642 sed
-i
"/CONFIG_TRACEROUTE6/d" $(1); \
643 echo
"CONFIG_TRACEROUTE6=y" >>$(1); \
644 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
645 sed
-i
"/CONFIG_FEATURE_UDHCP_RFC5969/d" $(1); \
646 echo
"CONFIG_FEATURE_UDHCP_RFC5969=y" >>$(1); \
649 if
[ "$(SLIM)" = "y" ]; then \
650 sed
-i
"/CONFIG_AWK/d" $(1); \
651 echo
"# CONFIG_AWK is not set" >>$(1); \
652 sed
-i
"/CONFIG_BASENAME/d" $(1); \
653 echo
"# CONFIG_BASENAME is not set" >>$(1); \
654 sed
-i
"/CONFIG_FEATURE_DEVFS/d" $(1); \
655 echo
"# CONFIG_FEATURE_DEVFS is not set" >>$(1); \
656 sed
-i
"/CONFIG_BLKID/d" $(1); \
657 echo
"# CONFIG_BLKID is not set" >>$(1); \
658 sed
-i
"/CONFIG_TELNET=y/d" $(1); \
659 echo
"# CONFIG_TELNET is not set" >>$(1); \
660 sed
-i
"/CONFIG_ARPING/d" $(1); \
661 echo
"# CONFIG_ARPING is not set" >>$(1); \
662 sed
-i
"/CONFIG_FEATURE_LS_COLOR/d" $(1); \
663 echo
"# CONFIG_FEATURE_LS_COLOR is not set" >>$(1); \
664 sed
-i
"/CONFIG_CHOWN/d" $(1); \
665 echo
"# CONFIG_CHOWN is not set" >>$(1); \
667 sed
-i
"/CONFIG_FEATURE_LS_COLOR/d" $(1); \
668 echo
"CONFIG_FEATURE_LS_COLOR=y" >>$(1); \
669 sed
-i
"/CONFIG_FEATURE_LS_COLOR_IS_DEFAULT/d" $(1); \
670 echo
"CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y" >>$(1); \
677 sed
-i
"/CONFIG_NVRAM_SIZE/d" $(1); \
678 echo
"CONFIG_NVRAM_SIZE="$(NVRAM_SIZE
) >>$(1); \
679 sed
-i
"/CONFIG_CC_OPTIMIZE_FOR_SIZE/d" $(1); \
680 if
[ "$(KERN_SIZE_OPT)" = "y" ]; then \
681 echo
"CONFIG_CC_OPTIMIZE_FOR_SIZE=y" >>$(1); \
683 echo
"# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set" >>$(1); \
685 if
[ "$(CONFIG_LINUX26)" = "y" ] && [ "$(MIPS32)" = "r2" ]; then \
686 sed
-i
"/CONFIG_CPU_MIPS32_R1/d" $(1); \
687 echo
"# CONFIG_CPU_MIPS32_R1 is not set" >>$(1); \
688 sed
-i
"/CONFIG_CPU_MIPS32_R2/d" $(1); \
689 echo
"CONFIG_CPU_MIPS32_R2=y" >>$(1); \
690 sed
-i
"/CONFIG_CPU_MIPSR1/d" $(1); \
691 echo
"CONFIG_CPU_MIPSR2=y" >>$(1); \
692 if
[ "$(NAND)" = "y" ]; then \
693 sed
-i
"/CONFIG_MTD_NFLASH/d" $(1); \
694 echo
"CONFIG_MTD_NFLASH=y" >>$(1); \
695 sed
-i
"/CONFIG_MTD_NAND/d" $(1); \
696 echo
"CONFIG_MTD_NAND=y" >>$(1); \
697 echo
"CONFIG_MTD_NAND_IDS=y" >>$(1); \
698 echo
"# CONFIG_MTD_NAND_VERIFY_WRITE is not set" >>$(1); \
699 echo
"# CONFIG_MTD_NAND_ECC_SMC is not set" >>$(1); \
700 echo
"# CONFIG_MTD_NAND_MUSEUM_IDS is not set" >>$(1); \
701 echo
"# CONFIG_MTD_NAND_DISKONCHIP is not set" >>$(1); \
702 echo
"# CONFIG_MTD_NAND_CAFE is not set" >>$(1); \
703 echo
"# CONFIG_MTD_NAND_NANDSIM is not set" >>$(1); \
704 echo
"# CONFIG_MTD_NAND_PLATFORM is not set" >>$(1); \
705 echo
"# CONFIG_MTD_NAND_ONENAND is not set" >>$(1); \
706 sed
-i
"/CONFIG_MTD_BRCMNAND/d" $(1); \
707 echo
"CONFIG_MTD_BRCMNAND=y" >>$(1); \
709 if
[ "$(WNR3500LV2)" = "y" ]; then \
710 sed
-i
"/CONFIG_MTD_NFLASH/d" $(1); \
711 echo
"CONFIG_MTD_NFLASH=y" >>$(1); \
714 if
[ "$(USB)" = "" ]; then \
715 sed
-i
"/CONFIG_EFI_PARTITION/d" $(1); \
716 echo
"# CONFIG_EFI_PARTITION is not set" >>$(1); \
718 if
[ "$(IPV6SUPP)" = "y" ]; then \
719 sed
-i
"/CONFIG_IPV6 is not set/d" $(1); \
720 echo
"CONFIG_IPV6=y" >>$(1); \
721 sed
-i
"/CONFIG_IP6_NF_IPTABLES/d" $(1); \
722 echo
"CONFIG_IP6_NF_IPTABLES=y" >>$(1); \
723 sed
-i
"/CONFIG_IP6_NF_MATCH_RT/d" $(1); \
724 echo
"CONFIG_IP6_NF_MATCH_RT=y" >>$(1); \
725 sed
-i
"/CONFIG_IP6_NF_FILTER/d" $(1); \
726 echo
"CONFIG_IP6_NF_FILTER=m" >>$(1); \
727 sed
-i
"/CONFIG_IP6_NF_TARGET_LOG/d" $(1); \
728 echo
"CONFIG_IP6_NF_TARGET_LOG=m" >>$(1); \
729 sed
-i
"/CONFIG_IP6_NF_TARGET_REJECT/d" $(1); \
730 echo
"CONFIG_IP6_NF_TARGET_REJECT=m" >>$(1); \
731 sed
-i
"/CONFIG_IP6_NF_MANGLE/d" $(1); \
732 echo
"CONFIG_IP6_NF_MANGLE=m" >>$(1); \
733 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
734 sed
-i
"/CONFIG_NF_CONNTRACK_IPV6/d" $(1); \
735 echo
"CONFIG_NF_CONNTRACK_IPV6=m" >>$(1); \
736 sed
-i
"/CONFIG_NETFILTER_XT_MATCH_HL/d" $(1); \
737 echo
"CONFIG_NETFILTER_XT_MATCH_HL=m" >>$(1); \
738 sed
-i
"/CONFIG_IPV6_ROUTER_PREF/d" $(1); \
739 echo
"CONFIG_IPV6_ROUTER_PREF=y" >>$(1); \
740 sed
-i
"/CONFIG_IPV6_SIT/d" $(1); \
741 echo
"CONFIG_IPV6_SIT=m" >>$(1); \
742 sed
-i
"/CONFIG_IPV6_SIT_6RD/d" $(1); \
743 echo
"CONFIG_IPV6_SIT_6RD=y" >>$(1); \
744 sed
-i
"/CONFIG_IPV6_MULTIPLE_TABLES/d" $(1); \
745 echo
"CONFIG_IPV6_MULTIPLE_TABLES=y" >>$(1); \
746 sed
-i
"/CONFIG_IP6_NF_RAW/d" $(1); \
747 echo
"CONFIG_IP6_NF_RAW=m" >>$(1); \
748 sed
-i
"/CONFIG_IPV6_OPTIMISTIC_DAD/d" $(1); \
749 echo
"CONFIG_IPV6_OPTIMISTIC_DAD=y" >>$(1); \
750 sed
-i
"/CONFIG_IPV6_MROUTE/d" $(1); \
751 echo
"CONFIG_IPV6_MROUTE=y" >>$(1); \
752 sed
-i
"/CONFIG_IP6_NF_TARGET_ROUTE/d" $(1); \
753 echo
"CONFIG_IP6_NF_TARGET_ROUTE=m" >>$(1); \
755 sed
-i
"/CONFIG_IP6_NF_CONNTRACK/d" $(1); \
756 echo
"CONFIG_IP6_NF_CONNTRACK=m" >>$(1); \
757 sed
-i
"/CONFIG_IP6_NF_MATCH_HL/d" $(1); \
758 echo
"CONFIG_IP6_NF_MATCH_HL=m" >>$(1); \
759 sed
-i
"/CONFIG_IP6_NF_FTP/d" $(1); \
760 echo
"CONFIG_IP6_NF_FTP=m" >>$(1); \
761 sed
-i
"/CONFIG_IP6_NF_MATCH_LIMIT/d" $(1); \
762 echo
"CONFIG_IP6_NF_MATCH_LIMIT=m" >>$(1); \
763 sed
-i
"/CONFIG_IP6_NF_MATCH_CONDITION/d" $(1); \
764 echo
"CONFIG_IP6_NF_MATCH_CONDITION=m" >>$(1); \
765 sed
-i
"/CONFIG_IP6_NF_MATCH_MAC/d" $(1); \
766 echo
"CONFIG_IP6_NF_MATCH_MAC=m" >>$(1); \
767 sed
-i
"/CONFIG_IP6_NF_MATCH_MULTIPORT/d" $(1); \
768 echo
"CONFIG_IP6_NF_MATCH_MULTIPORT=m" >>$(1); \
769 sed
-i
"/CONFIG_IP6_NF_MATCH_MARK/d" $(1); \
770 echo
"CONFIG_IP6_NF_MATCH_MARK=m" >>$(1); \
771 sed
-i
"/CONFIG_IP6_NF_MATCH_LENGTH/d" $(1); \
772 echo
"CONFIG_IP6_NF_MATCH_LENGTH=m" >>$(1); \
773 sed
-i
"/CONFIG_IP6_NF_MATCH_STATE/d" $(1); \
774 echo
"CONFIG_IP6_NF_MATCH_STATE=m" >>$(1); \
775 sed
-i
"/CONFIG_IP6_NF_TARGET_MARK/d" $(1); \
776 echo
"CONFIG_IP6_NF_TARGET_MARK=m" >>$(1); \
777 sed
-i
"/CONFIG_IP6_NF_TARGET_TCPMSS/d" $(1); \
778 echo
"CONFIG_IP6_NF_TARGET_TCPMSS=m" >>$(1); \
779 sed
-i
"/CONFIG_IP6_NF_TARGET_ROUTE/d" $(1); \
780 echo
"CONFIG_IP6_NF_TARGET_ROUTE=m" >>$(1); \
783 sed
-i
"/CONFIG_BCM57XX/d" $(1); \
784 if
[ "$(BCM57)" = "y" ]; then \
785 echo
"CONFIG_BCM57XX=m" >>$(1); \
787 echo
"# CONFIG_BCM57XX is not set" >>$(1); \
789 if
[ "$(USBAP)" = "y" ]; then \
790 echo
"CONFIG_WL_USBAP=y" >>$(1); \
791 echo
'CONFIG_WL_APSTA="wlconfig_lx_router_high"' >>$(1); \
793 echo
"# CONFIG_WL_USBAP is not set" >>$(1); \
794 echo
'CONFIG_WL_APSTA="wlconfig_lx_router_apsta"' >>$(1); \
796 if
[ "$(CONFIG_LINUX26)" = "y" ] && [ "$(EBTABLES)" = "y" ]; then \
797 sed
-i
"/CONFIG_BRIDGE_NF_EBTABLES/d" $(1); \
798 echo
"CONFIG_BRIDGE_NF_EBTABLES=m" >>$(1); \
799 if
[ "$(IPV6SUPP)" = "y" ]; then \
800 sed
-i
"/CONFIG_BRIDGE_EBT_IP6/d" $(1); \
801 echo
"CONFIG_BRIDGE_EBT_IP6=m" >>$(1); \
804 sed
-i
"/CONFIG_NVRAM_64K/d" $(1); \
805 if
[ "$(NVRAM_64K)" = "y" ]; then \
806 echo
"CONFIG_NVRAM_64K=y" >>$(1); \
808 echo
"# CONFIG_NVRAM_64K is not set" >>$(1); \
816 @echo
$@
" is not a valid target!"
819 @cp router
/config_base router
/config_
$(lowercase_B
)
820 @cp router
/busybox
/config_base router
/busybox
/config_
$(lowercase_B
)
821 @cp
$(LINUXDIR
)/config_base
$(LINUXDIR
)/config_
$(lowercase_B
)
823 $(call RouterOptions
, router
/config_
$(lowercase_B
))
824 $(call KernelConfig
, $(LINUXDIR
)/config_
$(lowercase_B
))
825 $(call BusyboxOptions
, router
/busybox
/config_
$(lowercase_B
))
827 @
$(MAKE
) setprofile N
=$(TPROFILE
) B
=$(B
) DESC
="$(BUILD_DESC)" USB
="$(USB)" MIPS32
="${MIPS32}" V1
="${V1}" V2
="${V2}"
830 ## Make the "normal" build
832 @
$(MAKE
) bin B
=A BUILD_DESC
="Std" USB
="USB" VLAN
="$(VLAN)" SNMP
=y
834 ## Make the "normal but without SSH" build
836 @
$(MAKE
) bin NO_SSH
=y B
=B BUILD_DESC
="No SSH" USB
="USB" VLAN
="$(VLAN)" SNMP
=y
838 ## Make the "normal but without CIFS" build
840 @
$(MAKE
) bin NO_CIFS
=y B
=C BUILD_DESC
="No CIFS" USB
="USB" VLAN
="$(VLAN)" SNMP
=y
842 ## Make the "normal but without SAMBA" (Lite) build
844 ifeq ($(CONFIG_LINUX26
),y
)
845 @
$(MAKE
) bin NO_SAMBA
=y SLIM
=y NO_CIFS
=y NO_JFFS
=y NO_ZEBRA
=y B
=D BUILD_DESC
="Lite" USB
="USB" VLAN
="$(VLAN)" SNMP
="$(SNMP)"
847 @
$(MAKE
) bin NO_SAMBA
=y SLIM
=y B
=D BUILD_DESC
="Lite" USB
="USB" VLAN
="$(VLAN)" SNMP
="$(SNMP)"
850 ## Make the "normal (with NTFS support) + VPN" build
852 ifeq ($(CONFIG_LINUX26
),y
)
853 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y PPTPD
=y NTFS
=y BBEXTRAS
=y USBEXTRAS
=y EBTABLES
=y NO_LIBOPT
=y MEDIASRV
=y IPV6SUPP
=y B
=E BUILD_DESC
="$(VPN)" USB
="USB" VLAN
="$(VLAN)" SNMP
=y DNSCRYPT
=y TCPDUMP
="$(TCPDUMP)"
855 # @$(MAKE) bin OPENVPN=y USERPPTP=y PPTPD=y NTFS=y B=E BUILD_DESC="$(VPN)" USB="USB" VLAN="$(VLAN)"
856 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y PPTPD
=y BBEXTRAS
=y USBEXTRAS
=y NTFS
=y B
=E BUILD_DESC
="$(VPN)" USB
="USB" SNMP
=y DNSCRYPT
=y VLAN
="$(VLAN)" TCPDUMP
="$(TCPDUMP)"
859 ## Make the "Mini: no USB, no CIFS, no Zebra" build - targeted for Netgear routers
861 @
$(MAKE
) bin JFFSv1
=y NO_CIFS
=y NO_SSH
=y NO_ZEBRA
=y SLIM
=y B
=F BUILD_DESC
="Mini" USB
="" VLAN
="$(VLAN)"
863 ## Make the "Tiny: no JFFS, no USB, no CIFS, no Zebra" build - targeted for cheapskate routers
865 @
$(MAKE
) bin NO_CIFS
=y NO_SSH
=y NO_JFFS
=y NO_ZEBRA
=y SLIM
=y B
=FS BUILD_DESC
="Tiny" USB
="" VLAN
="$(VLAN)"
867 ## Make the "No USB with IPv6, no Zebra" build - for 4MB routers
869 @
$(MAKE
) bin JFFSv1
=y NO_CIFS
=y NO_SSH
=y NO_ZEBRA
=y IPV6SUPP
=y B
=I BUILD_DESC
="MiniIPv6" USB
="" VLAN
="$(VLAN)"
871 ## Make the "No USB with IPv6, no Zebra, with VPN" build - for 4MB routers
872 ifeq ($(CONFIG_LINUX26
),y
)
874 @
$(MAKE
) bin JFFSv1
=y NO_CIFS
=y NO_SSH
=y NO_XXTP
=y SLIM
=y NO_SAMBA
=y NO_ZEBRA
=y IPV6SUPP
=y OPENVPN
=y USERPPTP
=y NO_LIBOPT
=y B
=J BUILD_DESC
="MiniIPv6-VPN" USB
="" VLAN
="$(VLAN)" SNMP
="$(SNMP)"
877 ## Make the "normal with Extras and NTFS" build
879 ifeq ($(CONFIG_LINUX26
),y
)
880 @
$(MAKE
) bin NTFS
=y BBEXTRAS
=y USBEXTRAS
=y EBTABLES
=y NO_LIBOPT
=y MEDIASRV
=y IPV6SUPP
=y B
=M BUILD_DESC
="Ext" USB
="USB" VLAN
="$(VLAN)" SNMP
=y USERPPTP
=y PPTPD
=y DNSCRYPT
=y TCPDUMP
="$(TCPDUMP)"
882 @
$(MAKE
) bin NTFS
=y BBEXTRAS
=y USBEXTRAS
=y B
=M BUILD_DESC
="Ext" USB
="USB" VLAN
="$(VLAN)" SNMP
=y USERPPTP
=y PPTPD
=y DNSCRYPT
=y TCPDUMP
="$(TCPDUMP)"
886 ## Make the "VLAN + VPN + NOCAT + USB (Change switch) + NGINX (add option)" build
888 ifeq ($(CONFIG_LINUX26
),y
)
889 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y PPTPD
=y NTFS
=y BBEXTRAS
=y USBEXTRAS
=y EBTABLES
=y NO_LIBOPT
=y MEDIASRV
=y IPV6SUPP
=y DNSCRYPT
=y B
=NC USB
="USB" SNMP
=y VLAN
=y NOCAT
=y TCPDUMP
="$(TCPDUMP)"
891 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y PPTPD
=y NTFS
=y DNSCRYPT
=y B
=NC BUILD_DESC
="$(VPN)" USB
="USB" VLAN
="$(VLAN)" NOCAT
=y TCPDUMP
="$(TCPDUMP)" BUILD_DESC
+=" $(NC)"
895 ## Make the "Mini: no USB, + NOCAT" build - for 4MB routers
897 @
$(MAKE
) bin JFFSv1
=y NOCAT
=y B
=NCM BUILD_DESC
="Mini-NOCAT" USB
="" VLAN
="$(VLAN)"
900 ## Make the "normal" build + NOCAT
902 @
$(MAKE
) bin NOCAT
=y B
=NCS BUILD_DESC
="Std-NOCAT" USB
="USB" SNMP
=y VLAN
="$(VLAN)" TCPDUMP
="$(TCPDUMP)"
905 ## Make the "No USB" build
907 ifeq ($(CONFIG_LINUX26
),y
)
908 @
$(MAKE
) bin JFFSv1
=y
$(if
$(filter r2
, $(MIPS32
)),,BCM57
=y
) B
=S BUILD_DESC
="Std" USB
="" VLAN
="$(VLAN)" TCPDUMP
="$(TCPDUMP)"
910 @
$(MAKE
) bin BBEXTRAS
=y BCM57
=y B
=S BUILD_DESC
="Std" USB
="" VLAN
="$(VLAN)" TCPDUMP
="$(TCPDUMP)"
914 ## Make the "No USB with Extras" build (K26 only, for 8MB flash)
915 ifeq ($(CONFIG_LINUX26
),y
)
917 @
$(MAKE
) bin B
=T USB
="" BBEXTRAS
=y EBTABLES
=y NO_LIBOPT
=y
$(if
$(filter r2
, $(MIPS32
)),,BCM57
=y
) IPV6SUPP
=y BUILD_DESC
="Std" SNMP
=y VLAN
="$(VLAN)"
918 ## Make the "No USB with OpenVPN and Extras" build (K26 only, for 8MB flash)
920 @
$(MAKE
) bin B
=U USB
="" BBEXTRAS
=y EBTABLES
=y NO_LIBOPT
=y
$(if
$(filter r2
, $(MIPS32
)),,BCM57
=y
) IPV6SUPP
=y OPENVPN
=y USERPPTP
=y BUILD_DESC
="$(VPN)" SNMP
=y VLAN
="$(VLAN)"
923 ## Make the "VPN with no USB support" build
925 ifeq ($(CONFIG_LINUX26
),y
)
926 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y PPTPD
=y NO_JFFS
=y BCM57
=y B
=V BUILD_DESC
="$(VPN)" USB
="" VLAN
="$(VLAN)" TCPDUMP
="$(TCPDUMP)" TCPDUMP
="$(TCPDUMP)"
928 @
$(MAKE
) bin OPENVPN
=y PPTPD
=y BBEXTRAS
=y B
=V BUILD_DESC
="$(VPN)" USB
="" SNMP
=y VLAN
="$(VLAN)" TCPDUMP
="$(TCPDUMP)" TCPDUMP
="$(TCPDUMP)"
931 ## Make the "Small VPN with no USB support" build
933 ifeq ($(CONFIG_LINUX26
),y
)
934 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y PPTPD
=y NO_JFFS
=y NO_CIFS
=y B
=VS BUILD_DESC
="SmallVPN" USB
=""
936 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y PPTPD
=y NO_JFFS
=y NO_CIFS
=y BCM57
=y B
=VS BUILD_DESC
="SmallVPN" USB
=""
940 ## Make Mips32r2 builds
961 @
$(MAKE
) f MIPS32
=r2 BELKIN
=y
964 @
$(MAKE
) fs MIPS32
=r2
979 @
$(MAKE
) nc MIPS32
=r2
997 @
$(MAKE
) vs MIPS32
=r2
999 #Linksys E-Series with 60K Nvram Builds
1002 @
$(MAKE
) r2a NVRAM_SIZE
=60 LINKSYS_E
=y
1005 @
$(MAKE
) r2b NVRAM_SIZE
=60 LINKSYS_E
=y
1008 @
$(MAKE
) r2c NVRAM_SIZE
=60 LINKSYS_E
=y
1011 @
$(MAKE
) r2e NVRAM_SIZE
=60 LINKSYS_E
=y
1014 @
$(MAKE
) r2m NVRAM_SIZE
=60 LINKSYS_E
=y
1017 @
$(MAKE
) r2n NVRAM_SIZE
=60 LINKSYS_E
=y
1020 @
$(MAKE
) r2nc NVRAM_SIZE
=60 LINKSYS_E
=y
1023 @
$(MAKE
) r2o NVRAM_SIZE
=60 LINKSYS_E
=y
1026 @
$(MAKE
) r2r NVRAM_SIZE
=60 LINKSYS_E
=y
1029 @
$(MAKE
) bin MIPS32
=r2 B
=S USB
="" NVRAM_SIZE
=60 LINKSYS_E
=y BBEXTRAS
=y EBTABLES
=y NO_LIBOPT
=y IPV6SUPP
=y BUILD_DESC
="Std"
1032 @
$(MAKE
) r2v NVRAM_SIZE
=60 LINKSYS_E
=y
1035 #Linksys E-Series with 64K Nvram Builds
1038 @
$(MAKE
) r2a NVRAM_SIZE
=64 LINKSYS_E_64
=y
1041 @
$(MAKE
) r2b NVRAM_SIZE
=64 LINKSYS_E_64
=y
1044 @
$(MAKE
) r2c NVRAM_SIZE
=64 LINKSYS_E_64
=y
1047 @
$(MAKE
) r2e NVRAM_SIZE
=64 LINKSYS_E_64
=y
1050 @
$(MAKE
) r2m NVRAM_SIZE
=64 LINKSYS_E_64
=y
1053 @
$(MAKE
) r2n NVRAM_SIZE
=64 LINKSYS_E_64
=y
1056 @
$(MAKE
) r2nc NVRAM_SIZE
=64 LINKSYS_E_64
=y
1059 @
$(MAKE
) r2o NVRAM_SIZE
=64 LINKSYS_E_64
=y
1062 @
$(MAKE
) r2r NVRAM_SIZE
=64 LINKSYS_E_64
=y
1065 @
$(MAKE
) bin MIPS32
=r2 B
=S USB
="" NVRAM_SIZE
=64 LINKSYS_E_64
=y BBEXTRAS
=y EBTABLES
=y NO_LIBOPT
=y IPV6SUPP
=y BUILD_DESC
="Std"
1068 @
$(MAKE
) r2v NVRAM_SIZE
=64 LINKSYS_E_64
=y
1071 #Linksys E-Series with 4MB Flash
1074 @
$(MAKE
) r2i NVRAM_SIZE
=32 LINKSYS_E1000v2
=y
1077 @
$(MAKE
) r2f NVRAM_SIZE
=32 LINKSYS_E1000v2
=y
1080 @
$(MAKE
) r2i NVRAM_SIZE
=64 LINKSYS_E1200v1
=y
1083 @
$(MAKE
) r2f NVRAM_SIZE
=64 LINKSYS_E1200v1
=y
1086 #Builds for WNR3500L v2
1089 @
$(MAKE
) e MIPS32
=r2 WNR3500LV2
=y NO_JFFS
=y
1092 @
$(MAKE
) bin MIPS32
=r2 OPENVPN
=y BBEXTRAS
=y EBTABLES
=y NO_LIBOPT
=y IPV6SUPP
=y B
=E BUILD_DESC
="RT-N53" SNMP
=y NOCAT
=y VLAN
=y PPTPD
=y NOCAT
=y USBAP
=y NO_USBAPP
=y
1095 @
$(MAKE
) bin MIPS32
=r2 OPENVPN
=y USERPPTP
=y PPTPD
=y NTFS
=y BBEXTRAS
=y NO_LIBOPT
=y VLAN
=y EBTABLES
=y IPV6SUPP
=y SNMP
=y NOCAT
=y NGINX
=n USBAP
=y NO_USBAPP
=y NVRAM_SIZE
=60 BUILD_DESC
+="-$(VLAN)" BUILD_DESC
="$(VPN)" BUILD_DESC
+="-$(NC)" LINKSYS_E2500
=y
1098 @
$(MAKE
) bin MIPS32
=r2 OPENVPN
=y NTFS
=y BBEXTRAS
=y USBEXTRAS
=y EBTABLES
=y NO_LIBOPT
=y MEDIASRV
=y IPV6SUPP
=y USB
="USB" NOCAT
=y BBEXTRAS
=y SNMP
=y DNSCRYPT
=y USERPPTP
=y PPTPD
=y NGINX
=y VLAN
=y USBAP
=y NO_USBAPP
=y NVRAM_SIZE
=60 LINKSYS_E3200
=y
1101 @
$(MAKE
) e MIPS32
=r2 NVRAM_64K
=y NAND
=y AC66U
=1 NO_JFFS
=y
1104 @
$(MAKE
) z MIPS32
=r2 NVRAM_64K
=y W1800R
=1
1107 @
$(MAKE
) bin MIPS32
=r2 OPENVPN
=y USERPPTP
=y PPTPD
=y NTFS
=y BBEXTRAS
=y USBEXTRAS
=y EBTABLES
=y NO_LIBOPT
=y MEDIASRV
=y IPV6SUPP
=y B
=NC BUILD_DESC
="$(VPN)" USB
="USB" VLAN
="$(VLAN)" SNMP
=y NOCAT
=y USBAP
=y B
=NC BUILD_DESC
+="-$(NC)" BUILD_DESC
+="$(L600N)"
1110 echo
'#ifndef TOMATO_PROFILE' > router
/shared
/tomato_profile.h
1111 echo
'#define TOMATO_$(N) 1' >> router
/shared
/tomato_profile.h
1112 echo
'#define PROFILE_G 1' >> router
/shared
/tomato_profile.h
1113 echo
'#define PROFILE_N 2' >> router
/shared
/tomato_profile.h
1114 echo
'#define TOMATO_PROFILE PROFILE_$(N)' >> router
/shared
/tomato_profile.h
1115 echo
'#define TOMATO_PROFILE_NAME "$(N)"' >> router
/shared
/tomato_profile.h
1116 echo
'#define TOMATO_BUILD_NAME "$(B)"' >> router
/shared
/tomato_profile.h
1117 echo
'#define TOMATO_BUILD_DESC "$(EXTRA_PREDESC)$(DESC)$(EXTRA_POSTDESC)"' >> router
/shared
/tomato_profile.h
1118 echo
'#ifndef CONFIG_NVRAM_SIZE' >> router
/shared
/tomato_profile.h
1119 echo
'#define CONFIG_NVRAM_SIZE $(NVRAM_SIZE)' >> router
/shared
/tomato_profile.h
1120 echo
'#endif' >> router
/shared
/tomato_profile.h
1121 echo
'#endif' >> router
/shared
/tomato_profile.h
1123 echo
'TOMATO_$(N) = 1' > tomato_profile.mak
1124 echo
'PROFILE_G = 1' >> tomato_profile.mak
1125 echo
'PROFILE_N = 2' >> tomato_profile.mak
1126 echo
'TOMATO_PROFILE = $$(PROFILE_$(N))' >> tomato_profile.mak
1127 echo
'TOMATO_PROFILE_NAME = "$(N)"' >> tomato_profile.mak
1128 echo
'TOMATO_BUILD = "$(B)"' >> tomato_profile.mak
1129 echo
'TOMATO_BUILD_NAME = "$(B)"' >> tomato_profile.mak
1130 echo
'TOMATO_BUILD_DESC = "$(EXTRA_PREDESC)$(DESC)$(EXTRA_POSTDESC)"' >> tomato_profile.mak
1131 echo
'TOMATO_PROFILE_L = $(lowercase_N)' >> tomato_profile.mak
1132 echo
'TOMATO_PROFILE_U = $(uppercase_N)' >> tomato_profile.mak
1133 echo
'TOMATO_BUILD_USB = "$(USB)"' >> tomato_profile.mak
1134 echo
'TOMATO_BUILD_MIPS32 = "${MIPS32}"' >> tomato_profile.mak
1135 echo
'TOMATO_BUILD_V1 = "${V1}"' >> tomato_profile.mak
1136 echo
'TOMATO_BUILD_V2 = "${V2}"' >> tomato_profile.mak
1138 echo
'export EXTRACFLAGS := $(EXTRA_CFLAGS) -DBCMWPA2 -funit-at-a-time -Wno-pointer-sign -mtune=mips32 -mips32 $(if $(filter $(NVRAM_SIZE),0),,-DCONFIG_NVRAM_SIZE=$(NVRAM_SIZE)) $(EXTRA_64KCFLAG)' >> tomato_profile.mak
1140 # Note that changes to variables in tomato_profile.mak don't
1141 # get propogated to this invocation of make!
1143 @echo
"Using $(N) profile, $(B) build config."
1147 rm -f config_current
; \
1148 ln
-s config_
$(lowercase_B
) config_current
; \
1149 cp
-f config_current .config
1151 @cd router
/busybox
&& \
1152 rm -f config_current
; \
1153 ln
-s config_
$(lowercase_B
) config_current
; \
1154 cp config_current .config
1157 rm -f config_current
; \
1158 ln
-s config_
$(lowercase_B
) config_current
; \
1159 cp config_current .config
1161 @
$(MAKE
) -C router oldconfig
1164 @echo
"a A build (standard)"
1165 @echo
"b B build (standard minus SSH)"
1166 @echo
"c C build (standard minus CIFS)"
1167 @echo
"d D build (standard minus Samba server)"
1168 @echo
"m M build (standard plus extra utilities and NTFS support)"
1169 @echo
"nc NC build (standard plus VPN, extra utilities, NTFS support and NOCAT)"
1170 @echo
"ncm NCS build (no USB support, NOCAT)"
1171 @echo
"ncs NCS build (std + NOCAT)"
1172 @echo
"m Ext - (standard plus extra utilities and NTFS support)"
1174 ifeq ($(CONFIG_LINUX26
),y
)
1175 @echo
"e E build (standard plus VPN, extra utilities and NTFS support)"
1176 @echo
"i I build (IPv6 with no USB support minus CIFS and RIPv1/2)"
1178 @echo
"e E build (standard plus VPN and NTFS support)"
1180 @echo
"s S build (no USB support)"
1181 @echo
"f F build (no USB support minus CIFS and RIPv1/2)"
1182 @echo
"fs FS build (no USB support minus CIFS, JFFS, Zebra and RIPv1/2)"
1183 @echo
"v V build (VPN with no USB support)"
1184 @echo
"vs VS build (Small VPN with no USB support)"
1186 ifeq ($(CONFIG_LINUX26
),y
)
1187 @echo
"r2a MIPS Release 2 A build (standard)"
1188 @echo
"r2b MIPS Release 2 B build (standard minus SSH)"
1189 @echo
"r2c MIPS Release 2 C build (standard minus CIFS)"
1190 @echo
"r2d MIPS Release 2 D build (standard minus Samba server)"
1191 @echo
"r2e MIPS Release 2 E build (standard plus VPN and extras)"
1192 @echo
"r2f MIPS Release 2 F build (no USB support minus CIFS, RIPv1/2)"
1193 @echo
"r2fs MIPS Release 2 FS build (no USB support minus JFFS, CIFS, RIPv1/2, Zebra)"
1194 @echo
"r2i MIPS Release 2 I build (IPv6 with no USB support minus CIFS and RIPv1/2)"
1195 @echo
"r2m MIPS Release 2 M build (standard plus extras)"
1196 @echo
"r2nc MIPS Release 2 NC build (standard plus VPN, extras and NOCAT)"
1197 @echo
"r2ncm MIPS Release 2 NCM build (no USB support, plus NOCAT)"
1198 @echo
"r2ncs MIPS Release 2 NCS build (standard plus NOCAT)"
1199 @echo
"r2s MIPS Release 2 S build (no USB support)"
1200 @echo
"r2t MIPS Release 2 T build (no USB support with extras)"
1201 @echo
"r2u MIPS Release 2 U build (no USB support plus VPN with extras)"
1202 @echo
"r2v MIPS Release 2 V build (VPN with no USB support)"
1203 @echo
"r2vs MIPS Release 2 VS build (Small VPN with no USB support)"
1205 @echo
" Linksys E-Series with 60k Nvram"
1206 @echo
"n60m Linksys E-series build (60KB NVRAM, standard plus extras)"
1207 @echo
"n60e Linksys E-series build (60KB NVRAM, standard plus VPN and extras)"
1208 @echo
"n60nc Linksys E-series build (60KB NVRAM, standard plus extras, plus VPN, plus NOCAT)"
1209 @echo
"n60s Linksys E-series build (60KB NVRAM, no USB support)"
1210 @echo
"n60v Linksys E-series build (60KB NVRAM, VPN with no USB support)"
1212 @echo
" Linksys E-Series with 64k Nvram/8MB Flash(E800/E900/E1200v2/E1500)"
1213 @echo
"n64m Linksys E-series build (64KB NVRAM, standard plus extras)"
1214 @echo
"n64e Linksys E-series build (64KB NVRAM, standard plus VPN and extras)"
1215 @echo
"n64nc Linksys E-series build (64KB NVRAM, standard plus extras, plus VPN, plus NOCAT)"
1216 @echo
"n64s Linksys E-series build (64KB NVRAM, no USB support)"
1217 @echo
"n64v Linksys E-series build (64KB NVRAM, VPN with no USB support)"
1219 @echo
" Linksys E-Series with 4MB Flash(E1000v2/v2.1/E1200v1)"
1220 @echo
"e1000v2i Linksys E1000v2-v2.1/Cisco M10v2 MiniIPv6"
1221 @echo
"e1000v2f Linksys E1000v2-v2.1/Cisco M10v2 Mini"
1222 @echo
"e1200v1i Linksys E1200v1 MiniIPv6"
1223 @echo
"e1200v1f Linksys E1200v1 Mini"
1224 @echo
" Netgear WNR3500L v2 builds (128MB Flash)"
1225 @echo
"v2e Netgear WNR3500Lv2 build"
1226 @echo
" Routers with wl_high module"
1227 @echo
"rtn53 Asus RT-N53 with wl_high module (dualband support)"
1228 @echo
"e2500 Linksys E2500 with wl_high module (dualband support)"
1229 @echo
"e3200 Linksys E3200 with wl_high module (dualband support)"
1230 @echo
"l600n Rosewill L600N Build with wl_high module (dualband support)"
1231 @echo
" Routers with AC WIRELESS"
1232 @echo
"ac66e ASUS RT-AC66"
1233 @ECHO
"ac56 ASUS RT-AC56"
1234 @echo
"w1800rz Tenda 1800"
1237 @echo
"..etc.. other build configs"
1238 @echo
"clean -C router clean"
1239 @echo
"cleanimage rm -rf image"
1240 @echo
"cleantools clean btools, mksquashfs"
1241 @echo
"cleankernel -C Linux distclean (but preserves .config)"
1242 @echo
"distclean distclean of Linux & busybox (but preserve .configs)"
1243 @echo
"prepk -C Linux oldconfig dep"
1245 .PHONY
: all clean distclean cleanimage cleantools cleankernel prepk what setprofile help
1246 .PHONY
: a b c d m Makefile allversions tomato_profile.mak