2 # Toplevel Makefile for the BCM947xx Linux Router release
4 # Copyright 2005, Broadcom Corporation
7 # THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
8 # KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
9 # SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
10 # FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
12 # $Id: Makefile,v 1.53 2005/04/25 03:54:37 tallest Exp $
15 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
17 # To rebuild everything and all configurations:
19 # make V1=whatever V2=sub-whatever VPN=vpn3.6 a b c d m
20 # The 1st "whatever" would be the build number, the sub-whatever would
21 # be the update to the version.
24 # make V1=8516 V2="-jffs.1" a b c d m s
26 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
30 export SRCBASE
:= $(shell pwd
)
31 RELEASEDIR
:= $(shell (cd
$(SRCBASE
)/..
&& pwd
-P
))
32 PATH
:= $(RELEASEDIR
)/tools
:$(PATH
)
37 # Normally you'd do something like "make V1=8516 V2=-sub-ver a b c d"
38 # But if you don't give anything for "V1", it'll get a default from tomato_version.
39 current_TOMATO_V1 ?
= "--def"
42 ifeq ($(CONFIG_LINUX26
),y
)
58 EXTRA_PREDESC
= 'VLAN-'
63 -include tomato_profile.mak
65 # This could be simpler by just using $(TOMATO_PROFILE_NAME) like it used to be,
66 # but that's fragile. If you make one certain innocuous change elsewhere in the
67 # makefile(s), the build will silently be wrong. This way it works properly every time.
68 current_BUILD_NAME
= $(strip $(shell grep
"^TOMATO_BUILD_NAME" tomato_profile.mak | cut
-d
"=" -f2
))
69 current_BUILD_DESC
= $(strip $(shell grep
"^TOMATO_BUILD_DESC" tomato_profile.mak | cut
-d
"=" -f2 | sed
-e
"s/ //g"))
70 current_BUILD_USB
= $(strip $(shell grep
"^TOMATO_BUILD_USB" tomato_profile.mak | cut
-d
"=" -f2 | sed
-e
"s/ //g"))
71 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
))
72 current_TOMATO_MIPS32
= $(strip $(shell grep
"^TOMATO_BUILD_MIPS32" tomato_profile.mak | cut
-d
"=" -f2 | sed
-e
"s/ //g" | sed
-e
"s/\"//g" ))
73 current_TOMATO_V1
= $(strip $(shell grep
"^TOMATO_BUILD_V1" tomato_profile.mak | cut
-d
"=" -f2 | sed
-e
"s/ //g" | sed
-e
"s/\"//g" ))
74 current_TOMATO_V2
= $(strip $(shell grep
"^TOMATO_BUILD_V2" tomato_profile.mak | cut
-d
"=" -f2 | sed
-e
"s/ //g" | sed
-e
"s/\"//g" ))
75 current_TOMATO_B
= $(strip $(shell grep
"^TOMATO_BUILD_NAME" tomato_profile.mak | cut
-d
"=" -f2 | sed
-e
"s/ //g" | sed
-e
"s/\"//g" ))
76 current_TOMATO_N
= $(strip $(shell grep
"^TOMATO_PROFILE_NAME" tomato_profile.mak | cut
-d
"=" -f2 | sed
-e
"s/ //g" | sed
-e
"s/\"//g" ))
80 uppercase_N
= $(shell echo
$(N
) | tr a-z A-Z
)
81 lowercase_N
= $(shell echo
$(N
) | tr A-Z a-z
)
82 uppercase_B
= $(shell echo
$(B
) | tr a-z A-Z
)
83 lowercase_B
= $(shell echo
$(B
) | tr A-Z a-z
)
85 ifeq ($(CONFIG_LINUX26
),y
)
86 mips_rev
= $(if
$(filter $(current_TOMATO_MIPS32
),r2
),MIPSR2
,MIPSR1
)
94 beta
= $(if
$(filter $(TOMATO_EXPERIMENTAL
),1),-beta
,)
98 @btools
/uversion.pl
--gen
$(current_TOMATO_V1
) $(mips_rev
)$(beta
)$(current_TOMATO_V2
) $(ND
) $(current_BUILD_USB
) $(current_BUILD_DESC
)
100 ifeq ($(TOMATO_BUILD
),)
109 @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"
115 @
$(MAKE
) -C router
all
116 @
$(MAKE
) -C router
install
119 @
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
120 @
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
123 @
rm -f image
/tomato-WRT54
*$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin
124 @
rm -f image
/tomato-WRTSL54
*$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin
125 @
rm -f image
/tomato-WR850G
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin
128 ifeq ($(LINKSYS_E
),y
)
129 @
rm -f image
/tomato-E??
00$(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
132 ifneq ($(NVRAM_SIZE
),60)
133 @
rm -f image
/tomato-F7D????
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin
134 @
rm -f image
/tomato-F5D8235v3
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin
138 @echo
"***********************" `date` "************************" >>fpkg.log
139 @cat router
/shared
/tomato_version
>>fpkg.log
141 @cat router
/target.
info >>fpkg.log
143 ifneq ($(current_TOMATO_MIPS32
),r2
)
144 @btools
/fpkg
-i lzma-loader
/loader.gz
-i
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/vmlinuz
-a
1024 -i router
/mipsel-uclibc
/target.image \
145 -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 \
146 -l W54S
,image
/tomato-WRT54GS
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
147 -l W54s
,image
/tomato-WRT54GSv4
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
148 -l W54U
,image
/tomato-WRTSL54GS
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
149 -m
0x10577050,image
/tomato-WR850G
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
153 ifeq ($(LINKSYS_E
),y
)
154 # Linksys E-series images
155 @btools
/fpkg
-i lzma-loader
/loader.gz
-i
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/vmlinuz
-a
1024 -i router
/mipsel-uclibc
/target.image \
156 -l
4200,image
/tomato-E4200
$(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 \
157 -l
61XN
,image
/tomato-E3000
$(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 \
158 -l
32XN
,image
/tomato-E2000
$(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 \
162 ifneq ($(NVRAM_SIZE
),60)
163 # Create Belkin images
164 @btools
/fpkg
-i lzma-loader
/loader.gz
-i
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/vmlinuz
-a
1024 -i router
/mipsel-uclibc
/target.image \
165 -b
0x20100322,image
/tomato-F7D3301
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
166 -b
0x20090928,image
/tomato-F7D3302
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
167 -b
0x20091006,image
/tomato-F7D4302
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
168 -b
0x00017116,image
/tomato-F5D8235v3
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
172 # Create generic TRX image
173 @btools
/fpkg
-i lzma-loader
/loader.gz
-i
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/vmlinuz
-a
1024 -i router
/mipsel-uclibc
/target.image \
174 -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 \
177 @cp fpkg.log image
/fpkg-
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
).log
179 @echo
"-----------------"
180 @echo
`cat router/shared/tomato_version` " ready"
181 @echo
"-----------------"
182 ifneq ($(NOVERSION
),1)
183 @cp router
/shared
/tomato_version router
/shared
/tomato_version_last
184 @btools
/uversion.pl
--bump
191 @touch router
/.config
192 @
rm -f router
/config_
[a-z
]
193 @
rm -f router
/busybox
/config_
[a-z
]
194 @
$(MAKE
) -C router
$@
195 @
-rmdir router
/mipsel-uclibc
200 @
rm -f router
/.config
201 @touch router
/.config
205 @
$(MAKE
) -C
$(LINUXDIR
)/scripts
/squashfs
clean
206 @
$(MAKE
) -C btools
clean
210 mv .config save-config
&& \
211 $(MAKE
) distclean || true
; \
212 cp
-p save-config .config || true
215 @
$(MAKE
) -C router kernel
216 @ls
-l
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/zImage
218 distclean: clean cleanimage cleankernel cleantools
219 ifneq ($(INSIDE_MAK
),1)
220 @
$(MAKE
) -C router
$@ INSIDE_MAK
=1
222 mv router
/busybox
/.config busybox-saved-config || true
223 @
$(MAKE
) -C router
/busybox
distclean
224 @
rm -f router
/busybox
/config_current
225 @cp
-p busybox-saved-config router
/busybox
/.config || true
226 @cp
-p router
/busybox
/.config router
/busybox
/config_current || true
227 @
rm -f router
/config_current
228 @
rm -f router
/.config.cmd router
/.config.old router
/.config
229 @
rm -f router
/libfoo_xref.txt
230 @
rm -f tomato_profile.mak router
/shared
/tomato_profile.h
231 @touch tomato_profile.mak
232 @touch router
/shared
/tomato_profile.h
237 rm -f config_current
; \
238 ln
-s config_base config_current
; \
239 cp
-f config_current .config
240 $(MAKE
) -C
$(LINUXDIR
) oldconfig
241 ifneq ($(CONFIG_LINUX26
),y
)
242 $(MAKE
) -C
$(LINUXDIR
) dep
247 @echo
"$(current_BUILD_DESC)-$(current_BUILD_NAME)-$(TOMATO_PROFILE_NAME) Profile"
251 # The methodology for making the different builds is to
252 # copy the "base" config file to the "target" config file in
253 # the appropriate directory, and then edit it by removing and
254 # inserting the desired configuration lines.
255 # You can't just delete the "whatever=y" line, you must have
256 # a "...is not set" line, or the make oldconfig will stop and ask
259 # Options for "make bin" :
260 # BUILD_DESC (Std|Lite|Ext|...)
265 # NO_CIFS, NO_SSH, NO_ZEBRA, NO_SAMBA, NO_HTTPS, NO_XXTP, NO_LIBOPT, NO_FTP
266 # SAMBA3, OPENVPN, IPV6SUPP, EBTABLES, NTFS, MEDIASRV, BBEXTRAS, USBEXTRAS, BCM57, SLIM
275 if
[ "$(CONFIG_LINUX26)" = "y" ] ||
[ "$(SAMBA3)" = "y" ]; then \
276 sed
-i
"/TCONFIG_SAMBA3/d" $(1); \
277 echo
"TCONFIG_SAMBA3=y" >>$(1); \
279 sed
-i
"/TCONFIG_EMF/d" $(1); \
280 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
281 if
[ "$(SLIM)" = "y" ]; then \
282 echo
"# TCONFIG_EMF is not set" >>$(1); \
284 echo
"TCONFIG_EMF=y" >>$(1); \
287 echo
"# TCONFIG_EMF is not set" >>$(1); \
289 sed
-i
"/TCONFIG_JFFSV1/d" $(1); \
290 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
291 if
[ "$(JFFSv1)" = "y" ]; then \
292 echo
"TCONFIG_JFFSV1=y" >>$(1); \
294 echo
"# TCONFIG_JFFSV1 is not set" >>$(1); \
297 echo
"TCONFIG_JFFSV1=y" >>$(1); \
299 if
[ "$(USB)" = "USB" ]; then \
300 sed
-i
"/TCONFIG_USB is not set/d" $(1); \
301 echo
"TCONFIG_USB=y" >>$(1); \
302 if
[ "$(USBEXTRAS)" = "y" ]; then \
303 sed
-i
"/TCONFIG_USB_EXTRAS/d" $(1); \
304 echo
"TCONFIG_USB_EXTRAS=y" >>$(1); \
306 if
[ "$(NTFS)" = "y" ]; then \
307 sed
-i
"/TCONFIG_NTFS/d" $(1); \
308 echo
"TCONFIG_NTFS=y" >>$(1); \
310 if
[ "$(MEDIASRV)" = "y" ]; then \
311 sed
-i
"/TCONFIG_MEDIA_SERVER/d" $(1); \
312 echo
"TCONFIG_MEDIA_SERVER=y" >>$(1); \
315 sed
-i
"/TCONFIG_USB=y/d" $(1); \
316 echo
"# TCONFIG_USB is not set" >>$(1); \
318 if
[ "$(NO_SAMBA)" = "y" ]; then \
319 sed
-i
"/TCONFIG_SAMBASRV/d" $(1); \
320 echo
"# TCONFIG_SAMBASRV is not set" >>$(1); \
322 if
[ "$(NO_ZEBRA)" = "y" ]; then \
323 sed
-i
"/TCONFIG_ZEBRA/d" $(1); \
324 echo
"# TCONFIG_ZEBRA is not set" >>$(1); \
326 if
[ "$(NO_JFFS)" = "y" ]; then \
327 sed
-i
"/TCONFIG_JFFS2/d" $(1); \
328 echo
"# TCONFIG_JFFS2 is not set" >>$(1); \
329 sed
-i
"/TCONFIG_JFFSV1/d" $(1); \
330 echo
"# TCONFIG_JFFSV1 is not set" >>$(1); \
332 if
[ "$(NO_CIFS)" = "y" ]; then \
333 sed
-i
"/TCONFIG_CIFS/d" $(1); \
334 echo
"# TCONFIG_CIFS is not set" >>$(1); \
336 if
[ "$(NO_FTP)" = "y" ]; then \
337 sed
-i
"/TCONFIG_FTP/d" $(1); \
338 echo
"# TCONFIG_FTP is not set" >>$(1); \
340 if
[ "$(NO_SSH)" = "y" ]; then \
341 sed
-i
"/TCONFIG_SSH/d" $(1); \
342 echo
"# TCONFIG_SSH is not set" >>$(1); \
344 if
[ "$(NO_HTTPS)" = "y" ]; then \
345 sed
-i
"/TCONFIG_HTTPS/d" $(1); \
346 echo
"# TCONFIG_HTTPS is not set" >>$(1); \
348 if
[ "$(NO_XXTP)" = "y" ]; then \
349 sed
-i
"/TCONFIG_L2TP/d" $(1); \
350 echo
"# TCONFIG_L2TP is not set" >>$(1); \
351 sed
-i
"/TCONFIG_PPTP/d" $(1); \
352 echo
"# TCONFIG_PPTP is not set" >>$(1); \
354 if
[ "$(NO_LIBOPT)" = "y" ]; then \
355 sed
-i
"/TCONFIG_OPTIMIZE_SHARED_LIBS/d" $(1); \
356 echo
"# TCONFIG_OPTIMIZE_SHARED_LIBS is not set" >>$(1); \
358 if
[ "$(EBTABLES)" = "y" ]; then \
359 sed
-i
"/TCONFIG_EBTABLES/d" $(1); \
360 echo
"TCONFIG_EBTABLES=y" >>$(1); \
362 if
[ "$(IPV6SUPP)" = "y" ]; then \
363 sed
-i
"/TCONFIG_IPV6/d" $(1); \
364 echo
"TCONFIG_IPV6=y" >>$(1); \
366 if
[ "$(NOCAT)" = "y" ]; then \
367 sed
-i
"/TCONFIG_NOCAT/d" $(1); \
368 echo
"TCONFIG_NOCAT=y" >>$(1); \
370 if
[ "$(OPENVPN)" = "y" ]; then \
371 sed
-i
"/TCONFIG_LZO/d" $(1); \
372 echo
"TCONFIG_LZO=y" >>$(1); \
373 sed
-i
"/TCONFIG_OPENVPN/d" $(1); \
374 echo
"TCONFIG_OPENVPN=y" >>$(1); \
375 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
376 sed
-i
"/TCONFIG_FTP_SSL/d" $(1); \
377 echo
"TCONFIG_FTP_SSL=y" >>$(1); \
380 if
[ "$(HFS)" = "y" ]; then \
381 sed
-i
"/TCONFIG_HFS/d" $(1); \
382 echo
"TCONFIG_HFS=y" >>$(1); \
384 if
[ "$(SNMP)" = "y" ]; then \
385 sed
-i
"/TCONFIG_SNMP/d" $(1); \
386 echo
"TCONFIG_SNMP=y" >>$(1); \
388 if
[ "$(USERPPTP)" = "y" ]; then \
389 sed
-i
"/TCONFIG_USERPPTP/d" $(1); \
390 echo
"TCONFIG_USERPPTP=y" >>$(1); \
392 if
[ "$(VLAN)" = "y" ]; then \
393 sed
-i
"/TCONFIG_VLAN/d" $(1); \
394 echo
"TCONFIG_VLAN=y" >>$(1); \
396 if
[ "$(PPTPD)" = "y" ]; then \
397 sed
-i
"/TCONFIG_PPTPD/d" $(1); \
398 echo
"TCONFIG_PPTPD=y" >>$(1); \
400 if
[ "$(TCPDUMP)" = "y" ]; then \
401 sed
-i
"/TCONFIG_TCPDUMP/d" $(1); \
402 echo
"TCONFIG_TCPDUMP=y" >>$(1); \
407 define BusyboxOptions
409 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
410 sed
-i
"/CONFIG_FEATURE_2_4_MODULES/d" $(1); \
411 echo
"# CONFIG_FEATURE_2_4_MODULES is not set" >>$(1); \
412 sed
-i
"/CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT/d" $(1); \
413 echo
"CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y" >>$(1); \
414 sed
-i
"/CONFIG_FEATURE_DEVFS/d" $(1); \
415 echo
"# CONFIG_FEATURE_DEVFS is not set" >>$(1); \
416 sed
-i
"/CONFIG_MKNOD/d" $(1); \
417 echo
"CONFIG_MKNOD=y" >>$(1); \
418 sed
-i
"/CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE/d" $(1); \
419 echo
"CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=512" >>$(1); \
421 if
[ "$(NO_CIFS)" = "y" ]; then \
422 sed
-i
"/CONFIG_FEATURE_MOUNT_CIFS/d" $(1); \
423 echo
"# CONFIG_FEATURE_MOUNT_CIFS is not set" >>$(1); \
425 if
[ "$(BBEXTRAS)" = "y" ]; then \
426 sed
-i
"/CONFIG_SENDMAIL/d" $(1); \
427 echo
"CONFIG_SENDMAIL=y" >>$(1); \
428 sed
-i
"/CONFIG_FEATURE_SORT_BIG/d" $(1); \
429 echo
"CONFIG_FEATURE_SORT_BIG=y" >>$(1); \
430 sed
-i
"/CONFIG_FTPPUT/d" $(1); \
431 echo
"CONFIG_FTPPUT=y" >>$(1); \
432 sed
-i
"/CONFIG_FTPGET/d" $(1); \
433 echo
"CONFIG_FTPGET=y" >>$(1); \
434 sed
-i
"/CONFIG_CLEAR/d" $(1); \
435 echo
"CONFIG_CLEAR=y" >>$(1); \
436 sed
-i
"/CONFIG_NICE/d" $(1); \
437 echo
"CONFIG_NICE=y" >>$(1); \
438 sed
-i
"/CONFIG_SETCONSOLE/d" $(1); \
439 echo
"CONFIG_SETCONSOLE=y" >>$(1); \
440 sed
-i
"/CONFIG_MKFIFO/d" $(1); \
441 echo
"CONFIG_MKFIFO=y" >>$(1); \
443 if
[ "$(USB)" = "USB" ]; then \
444 if
[ "$(USBEXTRAS)" = "y" ]; then \
445 sed
-i
"/CONFIG_E2FSCK/d" $(1); \
446 echo
"CONFIG_E2FSCK=y" >>$(1); \
447 sed
-i
"/CONFIG_MKE2FS/d" $(1); \
448 echo
"CONFIG_MKE2FS=y" >>$(1); \
449 sed
-i
"/CONFIG_FDISK/d" $(1); \
450 echo
"CONFIG_FDISK=y" >>$(1); \
451 sed
-i
"/CONFIG_FEATURE_FDISK_WRITABLE/d" $(1); \
452 echo
"CONFIG_FEATURE_FDISK_WRITABLE=y" >>$(1); \
453 sed
-i
"/CONFIG_MKFS_VFAT/d" $(1); \
454 echo
"CONFIG_MKFS_VFAT=y" >>$(1); \
455 sed
-i
"/CONFIG_MKSWAP/d" $(1); \
456 echo
"CONFIG_MKSWAP=y" >>$(1); \
457 sed
-i
"/CONFIG_FLOCK/d" $(1); \
458 echo
"CONFIG_FLOCK=y" >>$(1); \
459 sed
-i
"/CONFIG_FSYNC/d" $(1); \
460 echo
"CONFIG_FSYNC=y" >>$(1); \
461 sed
-i
"/CONFIG_TUNE2FS/d" $(1); \
462 echo
"CONFIG_TUNE2FS=y" >>$(1); \
463 sed
-i
"/CONFIG_E2LABEL/d" $(1); \
464 echo
"CONFIG_E2LABEL=y" >>$(1); \
465 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
466 sed
-i
"/CONFIG_LSUSB/d" $(1); \
467 echo
"CONFIG_LSUSB=y" >>$(1); \
468 sed
-i
"/CONFIG_FEATURE_WGET_STATUSBAR/d" $(1); \
469 echo
"CONFIG_FEATURE_WGET_STATUSBAR=y" >>$(1); \
470 sed
-i
"/CONFIG_FEATURE_VERBOSE_USAGE/d" $(1); \
471 echo
"CONFIG_FEATURE_VERBOSE_USAGE=y" >>$(1); \
475 sed
-i
"/CONFIG_FEATURE_MOUNT_LOOP/d" $(1); \
476 echo
"# CONFIG_FEATURE_MOUNT_LOOP is not set" >>$(1); \
477 sed
-i
"/CONFIG_FEATURE_DEVFS/d" $(1); \
478 echo
"# CONFIG_FEATURE_DEVFS is not set" >>$(1); \
479 sed
-i
"/CONFIG_FEATURE_MOUNT_LABEL/d" $(1); \
480 echo
"# CONFIG_FEATURE_MOUNT_LABEL is not set" >>$(1); \
481 sed
-i
"/CONFIG_FEATURE_MOUNT_FSTAB/d" $(1); \
482 echo
"# CONFIG_FEATURE_MOUNT_FSTAB is not set" >>$(1); \
483 sed
-i
"/CONFIG_VOLUMEID/d" $(1); \
484 echo
"# CONFIG_VOLUMEID is not set" >>$(1); \
485 sed
-i
"/CONFIG_BLKID/d" $(1); \
486 echo
"# CONFIG_BLKID is not set" >>$(1); \
487 sed
-i
"/CONFIG_SWAPONOFF/d" $(1); \
488 echo
"# CONFIG_SWAPONOFF is not set" >>$(1); \
489 sed
-i
"/CONFIG_CHROOT/d" $(1); \
490 echo
"# CONFIG_CHROOT is not set" >>$(1); \
491 sed
-i
"/CONFIG_PIVOT_ROOT/d" $(1); \
492 echo
"# CONFIG_PIVOT_ROOT is not set" >>$(1); \
493 sed
-i
"/CONFIG_TRUE/d" $(1); \
494 echo
"# CONFIG_TRUE is not set" >>$(1); \
496 if
[ "$(IPV6SUPP)" = "y" ]; then \
497 sed
-i
"/CONFIG_FEATURE_IPV6/d" $(1); \
498 echo
"CONFIG_FEATURE_IPV6=y" >>$(1); \
499 sed
-i
"/CONFIG_PING6/d" $(1); \
500 echo
"CONFIG_PING6=y" >>$(1); \
501 sed
-i
"/CONFIG_TRACEROUTE6/d" $(1); \
502 echo
"CONFIG_TRACEROUTE6=y" >>$(1); \
503 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
504 sed
-i
"/CONFIG_FEATURE_UDHCP_RFC5969/d" $(1); \
505 echo
"CONFIG_FEATURE_UDHCP_RFC5969=y" >>$(1); \
508 if
[ "$(SLIM)" = "y" ]; then \
509 sed
-i
"/CONFIG_AWK/d" $(1); \
510 echo
"# CONFIG_AWK is not set" >>$(1); \
511 sed
-i
"/CONFIG_BASENAME/d" $(1); \
512 echo
"# CONFIG_BASENAME is not set" >>$(1); \
513 sed
-i
"/CONFIG_FEATURE_DEVFS/d" $(1); \
514 echo
"# CONFIG_FEATURE_DEVFS is not set" >>$(1); \
515 sed
-i
"/CONFIG_BLKID/d" $(1); \
516 echo
"# CONFIG_BLKID is not set" >>$(1); \
517 sed
-i
"/CONFIG_TELNET=y/d" $(1); \
518 echo
"# CONFIG_TELNET is not set" >>$(1); \
519 sed
-i
"/CONFIG_ARPING/d" $(1); \
520 echo
"# CONFIG_ARPING is not set" >>$(1); \
521 sed
-i
"/CONFIG_FEATURE_LS_COLOR/d" $(1); \
522 echo
"# CONFIG_FEATURE_LS_COLOR is not set" >>$(1); \
523 sed
-i
"/CONFIG_CHOWN/d" $(1); \
524 echo
"# CONFIG_CHOWN is not set" >>$(1); \
526 sed
-i
"/CONFIG_FEATURE_LS_COLOR/d" $(1); \
527 echo
"CONFIG_FEATURE_LS_COLOR=y" >>$(1); \
528 sed
-i
"/CONFIG_FEATURE_LS_COLOR_IS_DEFAULT/d" $(1); \
529 echo
"CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y" >>$(1); \
536 sed
-i
"/CONFIG_NVRAM_SIZE/d" $(1); \
537 echo
"CONFIG_NVRAM_SIZE="$(NVRAM_SIZE
) >>$(1); \
538 sed
-i
"/CONFIG_CC_OPTIMIZE_FOR_SIZE/d" $(1); \
539 if
[ "$(KERN_SIZE_OPT)" = "y" ]; then \
540 echo
"CONFIG_CC_OPTIMIZE_FOR_SIZE=y" >>$(1); \
542 echo
"# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set" >>$(1); \
544 if
[ "$(CONFIG_LINUX26)" = "y" ] && [ "$(MIPS32)" = "r2" ]; then \
545 sed
-i
"/CONFIG_CPU_MIPS32_R1/d" $(1); \
546 echo
"# CONFIG_CPU_MIPS32_R1 is not set" >>$(1); \
547 sed
-i
"/CONFIG_CPU_MIPS32_R2/d" $(1); \
548 echo
"CONFIG_CPU_MIPS32_R2=y" >>$(1); \
549 sed
-i
"/CONFIG_CPU_MIPSR1/d" $(1); \
550 echo
"CONFIG_CPU_MIPSR2=y" >>$(1); \
552 if
[ "$(USB)" = "" ]; then \
553 sed
-i
"/CONFIG_EFI_PARTITION/d" $(1); \
554 echo
"# CONFIG_EFI_PARTITION is not set" >>$(1); \
556 if
[ "$(IPV6SUPP)" = "y" ]; then \
557 sed
-i
"/CONFIG_IPV6 is not set/d" $(1); \
558 echo
"CONFIG_IPV6=y" >>$(1); \
559 sed
-i
"/CONFIG_IP6_NF_IPTABLES/d" $(1); \
560 echo
"CONFIG_IP6_NF_IPTABLES=y" >>$(1); \
561 sed
-i
"/CONFIG_IP6_NF_MATCH_RT/d" $(1); \
562 echo
"CONFIG_IP6_NF_MATCH_RT=y" >>$(1); \
563 sed
-i
"/CONFIG_IP6_NF_FILTER/d" $(1); \
564 echo
"CONFIG_IP6_NF_FILTER=m" >>$(1); \
565 sed
-i
"/CONFIG_IP6_NF_TARGET_LOG/d" $(1); \
566 echo
"CONFIG_IP6_NF_TARGET_LOG=m" >>$(1); \
567 sed
-i
"/CONFIG_IP6_NF_TARGET_REJECT/d" $(1); \
568 echo
"CONFIG_IP6_NF_TARGET_REJECT=m" >>$(1); \
569 sed
-i
"/CONFIG_IP6_NF_MANGLE/d" $(1); \
570 echo
"CONFIG_IP6_NF_MANGLE=m" >>$(1); \
571 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
572 sed
-i
"/CONFIG_NF_CONNTRACK_IPV6/d" $(1); \
573 echo
"CONFIG_NF_CONNTRACK_IPV6=m" >>$(1); \
574 sed
-i
"/CONFIG_NETFILTER_XT_MATCH_HL/d" $(1); \
575 echo
"CONFIG_NETFILTER_XT_MATCH_HL=m" >>$(1); \
576 sed
-i
"/CONFIG_IPV6_ROUTER_PREF/d" $(1); \
577 echo
"CONFIG_IPV6_ROUTER_PREF=y" >>$(1); \
578 sed
-i
"/CONFIG_IPV6_SIT/d" $(1); \
579 echo
"CONFIG_IPV6_SIT=m" >>$(1); \
580 sed
-i
"/CONFIG_IPV6_SIT_6RD/d" $(1); \
581 echo
"CONFIG_IPV6_SIT_6RD=y" >>$(1); \
582 sed
-i
"/CONFIG_IPV6_MULTIPLE_TABLES/d" $(1); \
583 echo
"CONFIG_IPV6_MULTIPLE_TABLES=y" >>$(1); \
584 sed
-i
"/CONFIG_IP6_NF_RAW/d" $(1); \
585 echo
"CONFIG_IP6_NF_RAW=m" >>$(1); \
586 sed
-i
"/CONFIG_IPV6_OPTIMISTIC_DAD/d" $(1); \
587 echo
"CONFIG_IPV6_OPTIMISTIC_DAD=y" >>$(1); \
588 sed
-i
"/CONFIG_IPV6_MROUTE/d" $(1); \
589 echo
"CONFIG_IPV6_MROUTE=y" >>$(1); \
590 sed
-i
"/CONFIG_IP6_NF_TARGET_ROUTE/d" $(1); \
591 echo
"CONFIG_IP6_NF_TARGET_ROUTE=m" >>$(1); \
593 sed
-i
"/CONFIG_IP6_NF_CONNTRACK/d" $(1); \
594 echo
"CONFIG_IP6_NF_CONNTRACK=m" >>$(1); \
595 sed
-i
"/CONFIG_IP6_NF_MATCH_HL/d" $(1); \
596 echo
"CONFIG_IP6_NF_MATCH_HL=m" >>$(1); \
597 sed
-i
"/CONFIG_IP6_NF_FTP/d" $(1); \
598 echo
"CONFIG_IP6_NF_FTP=m" >>$(1); \
599 sed
-i
"/CONFIG_IP6_NF_MATCH_LIMIT/d" $(1); \
600 echo
"CONFIG_IP6_NF_MATCH_LIMIT=m" >>$(1); \
601 sed
-i
"/CONFIG_IP6_NF_MATCH_CONDITION/d" $(1); \
602 echo
"CONFIG_IP6_NF_MATCH_CONDITION=m" >>$(1); \
603 sed
-i
"/CONFIG_IP6_NF_MATCH_MAC/d" $(1); \
604 echo
"CONFIG_IP6_NF_MATCH_MAC=m" >>$(1); \
605 sed
-i
"/CONFIG_IP6_NF_MATCH_MULTIPORT/d" $(1); \
606 echo
"CONFIG_IP6_NF_MATCH_MULTIPORT=m" >>$(1); \
607 sed
-i
"/CONFIG_IP6_NF_MATCH_MARK/d" $(1); \
608 echo
"CONFIG_IP6_NF_MATCH_MARK=m" >>$(1); \
609 sed
-i
"/CONFIG_IP6_NF_MATCH_LENGTH/d" $(1); \
610 echo
"CONFIG_IP6_NF_MATCH_LENGTH=m" >>$(1); \
611 sed
-i
"/CONFIG_IP6_NF_MATCH_STATE/d" $(1); \
612 echo
"CONFIG_IP6_NF_MATCH_STATE=m" >>$(1); \
613 sed
-i
"/CONFIG_IP6_NF_TARGET_MARK/d" $(1); \
614 echo
"CONFIG_IP6_NF_TARGET_MARK=m" >>$(1); \
615 sed
-i
"/CONFIG_IP6_NF_TARGET_TCPMSS/d" $(1); \
616 echo
"CONFIG_IP6_NF_TARGET_TCPMSS=m" >>$(1); \
617 sed
-i
"/CONFIG_IP6_NF_TARGET_ROUTE/d" $(1); \
618 echo
"CONFIG_IP6_NF_TARGET_ROUTE=m" >>$(1); \
621 sed
-i
"/CONFIG_BCM57XX/d" $(1); \
622 if
[ "$(BCM57)" = "y" ]; then \
623 echo
"CONFIG_BCM57XX=m" >>$(1); \
625 echo
"# CONFIG_BCM57XX is not set" >>$(1); \
627 if
[ "$(CONFIG_LINUX26)" = "y" ] && [ "$(EBTABLES)" = "y" ]; then \
628 sed
-i
"/CONFIG_BRIDGE_NF_EBTABLES/d" $(1); \
629 echo
"CONFIG_BRIDGE_NF_EBTABLES=m" >>$(1); \
630 if
[ "$(IPV6SUPP)" = "y" ]; then \
631 sed
-i
"/CONFIG_BRIDGE_EBT_IP6/d" $(1); \
632 echo
"CONFIG_BRIDGE_EBT_IP6=m" >>$(1); \
641 @echo
$@
" is not a valid target!"
644 @cp router
/config_base router
/config_
$(lowercase_B
)
645 @cp router
/busybox
/config_base router
/busybox
/config_
$(lowercase_B
)
646 @cp
$(LINUXDIR
)/config_base
$(LINUXDIR
)/config_
$(lowercase_B
)
648 $(call RouterOptions
, router
/config_
$(lowercase_B
))
649 $(call KernelConfig
, $(LINUXDIR
)/config_
$(lowercase_B
))
650 $(call BusyboxOptions
, router
/busybox
/config_
$(lowercase_B
))
652 @
$(MAKE
) setprofile N
=$(TPROFILE
) B
=$(B
) DESC
="$(BUILD_DESC)" USB
="$(USB)" MIPS32
="${MIPS32}" V1
="${V1}" V2
="${V2}"
655 ## Make the "normal" build
657 @
$(MAKE
) bin B
=A BUILD_DESC
="Std" USB
="USB" VLAN
="$(VLAN)" SNMP
=y
659 ## Make the "normal but without SSH" build
661 @
$(MAKE
) bin NO_SSH
=y B
=B BUILD_DESC
="No SSH" USB
="USB" VLAN
="$(VLAN)" SNMP
=y
663 ## Make the "normal but without CIFS" build
665 @
$(MAKE
) bin NO_CIFS
=y B
=C BUILD_DESC
="No CIFS" USB
="USB" VLAN
="$(VLAN)" SNMP
=y
667 ## Make the "normal but without SAMBA" (Lite) build
669 ifeq ($(CONFIG_LINUX26
),y
)
670 @
$(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)"
672 @
$(MAKE
) bin NO_SAMBA
=y SLIM
=y B
=D BUILD_DESC
="Lite" USB
="USB" VLAN
="$(VLAN)" SNMP
="$(SNMP)"
675 ## Make the "normal (with NTFS support) + VPN" build
677 ifeq ($(CONFIG_LINUX26
),y
)
678 @
$(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 TCPDUMP
="$(TCPDUMP)"
680 # @$(MAKE) bin OPENVPN=y USERPPTP=y PPTPD=y NTFS=y B=E BUILD_DESC="$(VPN)" USB="USB" VLAN="$(VLAN)"
681 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y PPTPD
=y BBEXTRAS
=y USBEXTRAS
=y NTFS
=y B
=E BUILD_DESC
="$(VPN)" USB
="USB" SNMP
=y VLAN
="$(VLAN)" TCPDUMP
="$(TCPDUMP)"
684 ## Make the "Mini: no USB, no CIFS, no Zebra" build - targeted for Netgear routers
686 @
$(MAKE
) bin JFFSv1
=y NO_CIFS
=y NO_SSH
=y NO_ZEBRA
=y SLIM
=y B
=F BUILD_DESC
="Mini" USB
="" VLAN
="$(VLAN)"
688 ## Make the "Tiny: no JFFS, no USB, no CIFS, no Zebra" build - targeted for cheapskate routers
690 @
$(MAKE
) bin NO_CIFS
=y NO_SSH
=y NO_JFFS
=y NO_ZEBRA
=y SLIM
=y B
=FS BUILD_DESC
="Tiny" USB
="" VLAN
="$(VLAN)"
692 ## Make the "No USB with IPv6, no Zebra" build - for 4MB routers
694 @
$(MAKE
) bin JFFSv1
=y NO_CIFS
=y NO_SSH
=y NO_ZEBRA
=y IPV6SUPP
=y B
=I BUILD_DESC
="MiniIPv6" USB
="" VLAN
="$(VLAN)"
696 ## Make the "No USB with IPv6, no Zebra, with VPN" build - for 4MB routers
697 ifeq ($(CONFIG_LINUX26
),y
)
699 @
$(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)"
702 ## Make the "normal with Extras and NTFS" build
704 ifeq ($(CONFIG_LINUX26
),y
)
705 @
$(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 TCPDUMP
="$(TCPDUMP)"
707 @
$(MAKE
) bin NTFS
=y BBEXTRAS
=y USBEXTRAS
=y B
=M BUILD_DESC
="Ext" USB
="USB" VLAN
="$(VLAN)" SNMP
=y USERPPTP
=y PPTPD
=y TCPDUMP
="$(TCPDUMP)"
711 ## Make the "normal (with NTFS support) + VPN + NOCAT" build
713 ifeq ($(CONFIG_LINUX26
),y
)
714 @
$(MAKE
) bin 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" SNMP
=y VLAN
="$(VLAN)" NOCAT
=y TCPDUMP
="$(TCPDUMP)" BUILD_DESC
+="-$(NC)"
716 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y PPTPD
=y NTFS
=y B
=NC BUILD_DESC
="$(VPN)" USB
="USB" VLAN
="$(VLAN)" NOCAT
=y TCPDUMP
="$(TCPDUMP)" BUILD_DESC
+=" $(NC)"
720 ## Make the "Mini: no USB, + NOCAT" build - for 4MB routers
722 @
$(MAKE
) bin JFFSv1
=y NOCAT
=y B
=NCM BUILD_DESC
="Mini-NOCAT" USB
="" VLAN
="$(VLAN)"
725 ## Make the "normal" build + NOCAT
727 @
$(MAKE
) bin NOCAT
=y B
=NCS BUILD_DESC
="Std-NOCAT" USB
="USB" SNMP
=y VLAN
="$(VLAN)" TCPDUMP
="$(TCPDUMP)"
730 ## Make the "No USB" build
732 ifeq ($(CONFIG_LINUX26
),y
)
733 @
$(MAKE
) bin JFFSv1
=y
$(if
$(filter r2
, $(MIPS32
)),,BCM57
=y
) B
=S BUILD_DESC
="Std" USB
="" VLAN
="$(VLAN)" TCPDUMP
="$(TCPDUMP)"
735 @
$(MAKE
) bin BBEXTRAS
=y BCM57
=y B
=S BUILD_DESC
="Std" USB
="" VLAN
="$(VLAN)" TCPDUMP
="$(TCPDUMP)"
739 ## Make the "No USB with Extras" build (K26 only, for 8MB flash)
740 ifeq ($(CONFIG_LINUX26
),y
)
742 @
$(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)"
743 ## Make the "No USB with OpenVPN and Extras" build (K26 only, for 8MB flash)
745 @
$(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)"
748 ## Make the "VPN with no USB support" build
750 ifeq ($(CONFIG_LINUX26
),y
)
751 @
$(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)"
753 @
$(MAKE
) bin OPENVPN
=y PPTPD
=y BBEXTRAS
=y B
=V BUILD_DESC
="$(VPN)" USB
="" SNMP
=y VLAN
="$(VLAN)" TCPDUMP
="$(TCPDUMP)" TCPDUMP
="$(TCPDUMP)"
756 ## Make the "Small VPN with no USB support" build
758 ifeq ($(CONFIG_LINUX26
),y
)
759 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y PPTPD
=y NO_JFFS
=y NO_CIFS
=y B
=VS BUILD_DESC
="SmallVPN" USB
=""
761 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y PPTPD
=y NO_JFFS
=y NO_CIFS
=y BCM57
=y B
=VS BUILD_DESC
="SmallVPN" USB
=""
764 ## Make Mips32r2 builds
782 @
$(MAKE
) f MIPS32
=r2 BELKIN
=y
785 @
$(MAKE
) fs MIPS32
=r2
800 @
$(MAKE
) nc MIPS32
=r2
818 @
$(MAKE
) vs MIPS32
=r2
821 @
$(MAKE
) r2a NVRAM_SIZE
=60 LINKSYS_E
=y
824 @
$(MAKE
) r2b NVRAM_SIZE
=60 LINKSYS_E
=y
827 @
$(MAKE
) r2c NVRAM_SIZE
=60 LINKSYS_E
=y
830 @
$(MAKE
) r2e NVRAM_SIZE
=60 LINKSYS_E
=y
833 @
$(MAKE
) r2m NVRAM_SIZE
=60 LINKSYS_E
=y
836 @
$(MAKE
) r2n NVRAM_SIZE
=60 LINKSYS_E
=y
839 @
$(MAKE
) r2nc NVRAM_SIZE
=60 LINKSYS_E
=y
842 @
$(MAKE
) r2o NVRAM_SIZE
=60 LINKSYS_E
=y
845 @
$(MAKE
) r2r NVRAM_SIZE
=60 LINKSYS_E
=y
848 @
$(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"
851 @
$(MAKE
) r2t NVRAM_SIZE
=60 LINKSYS_E
=y
854 @
$(MAKE
) bin MIPS32
=r2 B
=V USB
="" NVRAM_SIZE
=60 LINKSYS_E
=y BBEXTRAS
=y EBTABLES
=y NO_LIBOPT
=y IPV6SUPP
=y OPENVPN
=y USERPPTP
=y BUILD_DESC
="$(VPN)"
858 echo
'#ifndef TOMATO_PROFILE' > router
/shared
/tomato_profile.h
859 echo
'#define TOMATO_$(N) 1' >> router
/shared
/tomato_profile.h
860 echo
'#define PROFILE_G 1' >> router
/shared
/tomato_profile.h
861 echo
'#define PROFILE_N 2' >> router
/shared
/tomato_profile.h
862 echo
'#define TOMATO_PROFILE PROFILE_$(N)' >> router
/shared
/tomato_profile.h
863 echo
'#define TOMATO_PROFILE_NAME "$(N)"' >> router
/shared
/tomato_profile.h
864 echo
'#define TOMATO_BUILD_NAME "$(B)"' >> router
/shared
/tomato_profile.h
865 echo
'#define TOMATO_BUILD_DESC "$(EXTRA_PREDESC)$(DESC)"' >> router
/shared
/tomato_profile.h
866 echo
'#ifndef CONFIG_NVRAM_SIZE' >> router
/shared
/tomato_profile.h
867 echo
'#define CONFIG_NVRAM_SIZE $(NVRAM_SIZE)' >> router
/shared
/tomato_profile.h
868 echo
'#endif' >> router
/shared
/tomato_profile.h
869 echo
'#endif' >> router
/shared
/tomato_profile.h
871 echo
'TOMATO_$(N) = 1' > tomato_profile.mak
872 echo
'PROFILE_G = 1' >> tomato_profile.mak
873 echo
'PROFILE_N = 2' >> tomato_profile.mak
874 echo
'TOMATO_PROFILE = $$(PROFILE_$(N))' >> tomato_profile.mak
875 echo
'TOMATO_PROFILE_NAME = "$(N)"' >> tomato_profile.mak
876 echo
'TOMATO_BUILD = "$(B)"' >> tomato_profile.mak
877 echo
'TOMATO_BUILD_NAME = "$(B)"' >> tomato_profile.mak
878 echo
'TOMATO_BUILD_DESC = "$(EXTRA_PREDESC)$(DESC)"' >> tomato_profile.mak
879 echo
'TOMATO_PROFILE_L = $(lowercase_N)' >> tomato_profile.mak
880 echo
'TOMATO_PROFILE_U = $(uppercase_N)' >> tomato_profile.mak
881 echo
'TOMATO_BUILD_USB = "$(USB)"' >> tomato_profile.mak
882 echo
'TOMATO_BUILD_MIPS32 = "${MIPS32}"' >> tomato_profile.mak
883 echo
'TOMATO_BUILD_V1 = "${V1}"' >> tomato_profile.mak
884 echo
'TOMATO_BUILD_V2 = "${V2}"' >> tomato_profile.mak
886 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))' >> tomato_profile.mak
888 # Note that changes to variables in tomato_profile.mak don't
889 # get propogated to this invocation of make!
891 @echo
"Using $(N) profile, $(B) build config."
895 rm -f config_current
; \
896 ln
-s config_
$(lowercase_B
) config_current
; \
897 cp
-f config_current .config
899 @cd router
/busybox
&& \
900 rm -f config_current
; \
901 ln
-s config_
$(lowercase_B
) config_current
; \
902 cp config_current .config
905 rm -f config_current
; \
906 ln
-s config_
$(lowercase_B
) config_current
; \
907 cp config_current .config
909 @
$(MAKE
) -C router oldconfig
912 @echo
"a A build (standard)"
913 @echo
"b B build (standard minus SSH)"
914 @echo
"c C build (standard minus CIFS)"
915 @echo
"d D build (standard minus Samba server)"
916 @echo
"m M build (standard plus extra utilities and NTFS support)"
917 @echo
"nc NC build (standard plus VPN, extra utilities, NTFS support and NOCAT)"
918 @echo
"ncm NCS build (no USB support, NOCAT)"
919 @echo
"ncs NCS build (std + NOCAT)"
920 @echo
"m Ext - (standard plus extra utilities and NTFS support)"
922 ifeq ($(CONFIG_LINUX26
),y
)
923 @echo
"e E build (standard plus VPN, extra utilities and NTFS support)"
924 @echo
"i I build (IPv6 with no USB support minus CIFS and RIPv1/2)"
926 @echo
"e E build (standard plus VPN and NTFS support)"
928 @echo
"s S build (no USB support)"
929 @echo
"f F build (no USB support minus CIFS and RIPv1/2)"
930 @echo
"fs FS build (no USB support minus CIFS, JFFS, Zebra and RIPv1/2)"
931 @echo
"v V build (VPN with no USB support)"
932 @echo
"vs VS build (Small VPN with no USB support)"
934 ifeq ($(CONFIG_LINUX26
),y
)
935 @echo
"r2a MIPS Release 2 A build (standard)"
936 @echo
"r2b MIPS Release 2 B build (standard minus SSH)"
937 @echo
"r2c MIPS Release 2 C build (standard minus CIFS)"
938 @echo
"r2d MIPS Release 2 D build (standard minus Samba server)"
939 @echo
"r2e MIPS Release 2 E build (standard plus VPN and extras)"
940 @echo
"r2f MIPS Release 2 F build (no USB support minus CIFS, RIPv1/2)"
941 @echo
"r2fs MIPS Release 2 FS build (no USB support minus JFFS, CIFS, RIPv1/2, Zebra)"
942 @echo
"r2i MIPS Release 2 I build (IPv6 with no USB support minus CIFS and RIPv1/2)"
943 @echo
"r2m MIPS Release 2 M build (standard plus extras)"
944 @echo
"r2nc MIPS Release 2 NC build (standard plus VPN, extras and NOCAT)"
945 @echo
"r2ncm MIPS Release 2 NCM build (no USB support, plus NOCAT)"
946 @echo
"r2ncs MIPS Release 2 NCS build (standard plus NOCAT)"
947 @echo
"r2s MIPS Release 2 S build (no USB support)"
948 @echo
"r2t MIPS Release 2 T build (no USB support with extras)"
949 @echo
"r2u MIPS Release 2 U build (no USB support plus VPN with extras)"
950 @echo
"r2v MIPS Release 2 V build (VPN with no USB support)"
951 @echo
"r2vs MIPS Release 2 VS build (Small VPN with no USB support)"
952 @echo
"n60m Linksys E-series build (60KB NVRAM, standard plus extras)"
953 @echo
"n60e Linksys E-series build (60KB NVRAM, standard plus VPN and extras)"
954 @echo
"n60nc Linksys E-series build (60KB NVRAM, standard plus extras, plus VPN, plus NOCAT)"
955 @echo
"n60s Linksys E-series build (60KB NVRAM, no USB support)"
956 @echo
"n60v Linksys E-series build (60KB NVRAM, VPN with no USB support)"
958 @echo
"..etc.. other build configs"
959 @echo
"clean -C router clean"
960 @echo
"cleanimage rm -rf image"
961 @echo
"cleantools clean btools, mksquashfs"
962 @echo
"cleankernel -C Linux distclean (but preserves .config)"
963 @echo
"distclean distclean of Linux & busybox (but preserve .configs)"
964 @echo
"prepk -C Linux oldconfig dep"
966 .PHONY
: all clean distclean cleanimage cleantools cleankernel prepk what setprofile help
967 .PHONY
: a b c d m Makefile allversions tomato_profile.mak