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 n o
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 n o
26 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
29 export ac_cv_func_malloc_0_nonnull
=yes
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.
41 ifeq ($(CONFIG_LINUX26
),y
)
53 -include tomato_profile.mak
55 # This could be simpler by just using $(TOMATO_PROFILE_NAME) like it used to be,
56 # but that's fragile. If you make one certain innocuous change elsewhere in the
57 # makefile(s), the build will silently be wrong. This way it works properly every time.
58 current_BUILD_NAME
= $(strip $(shell grep
"^TOMATO_BUILD_NAME" tomato_profile.mak | cut
-d
"=" -f2
))
59 current_BUILD_DESC
= $(strip $(shell grep
"^TOMATO_BUILD_DESC" tomato_profile.mak | cut
-d
"=" -f2 | sed
-e
"s/ //g"))
60 current_BUILD_USB
= $(strip $(shell grep
"^TOMATO_BUILD_USB" tomato_profile.mak | cut
-d
"=" -f2 | sed
-e
"s/ //g"))
61 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
))
63 uppercase_N
= $(shell echo
$(N
) | tr a-z A-Z
)
64 lowercase_N
= $(shell echo
$(N
) | tr A-Z a-z
)
65 uppercase_B
= $(shell echo
$(B
) | tr a-z A-Z
)
66 lowercase_B
= $(shell echo
$(B
) | tr A-Z a-z
)
68 ifeq ($(CONFIG_LINUX26
),y
)
69 mips_rev
= $(if
$(filter $(MIPS32
),r2
),MIPSR2
,MIPSR1
)
76 beta
= $(if
$(filter $(TOMATO_EXPERIMENTAL
),1),-beta
,)
80 @btools
/uversion.pl
--gen
$(V1
) $(mips_rev
)$(beta
)$(V2
) $(ND
) $(current_BUILD_USB
) $(current_BUILD_DESC
)
82 ifeq ($(TOMATO_BUILD
),)
91 @echo
"Building Tomato $(ND) $(current_BUILD_USB) $(current_TOMATO_VER).$(V1)$(mips_rev)$(beta)$(V2) $(current_BUILD_DESC) $(current_BUILD_NAME) with $(TOMATO_PROFILE_NAME) Profile"
97 @
$(MAKE
) -C router
all
98 @
$(MAKE
) -C router
install
101 @
rm -f image
/tomato-
$(ND
)$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).trx
102 @
rm -f image
/tomato-
$(ND
)$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin
103 ifeq ($(LINKSYS_E
),1)
104 @
rm -f image
/tomato-E??
00$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin
107 ifneq ($(NVRAM_SIZE
),60)
108 @
rm -f image
/tomato-F7D????
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin
109 @
rm -f image
/tomato-F5D8235v3
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin
113 @echo
"***********************" `date` "************************" >>fpkg.log
114 @cat router
/shared
/tomato_version
>>fpkg.log
116 @cat router
/target.
info >>fpkg.log
117 ifeq ($(wildcard include/bcm20xx.h
),)
118 @btools
/fpkg
-i lzma-loader
/loader.gz
-i
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/vmlinuz
-a
1024 -i router
/mipsel-uclibc
/target.image \
119 -t image
/tomato.trx \
120 -l W54G
,image
/WRT54G_WRT54GL.bin \
121 -l W54S
,image
/WRT54GS.bin \
122 -l W54s
,image
/WRT54GSv4.bin \
123 -l W54U
,image
/WRTSL54GS.bin \
124 -m
0x10577050,image
/WR850G.bin \
127 ifeq ($(LINKSYS_E
),1)
128 # Linksys E-series build plus generic TRX image
129 @btools
/fpkg
-i lzma-loader
/loader.gz
-i
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/vmlinuz
-a
1024 -i router
/mipsel-uclibc
/target.image \
130 -t image
/tomato-
$(ND
)$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).trx \
131 -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 \
132 -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 \
133 -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 \
137 ifneq ($(NVRAM_SIZE
),60)
138 # Create Belkin images
139 @btools
/fpkg
-i lzma-loader
/loader.gz
-i
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/vmlinuz
-a
1024 -i router
/mipsel-uclibc
/target.image \
140 -t image
/tomato-
$(ND
)$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).trx \
141 -b
0x20100322,image
/tomato-F7D3301
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
142 -b
0x20090928,image
/tomato-F7D3302
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
143 -b
0x20091006,image
/tomato-F7D4302
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
144 -b
0x00017116,image
/tomato-F5D8235v3
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
148 # Create generic TRX image
149 @btools
/fpkg
-i lzma-loader
/loader.gz
-i
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/vmlinuz
-a
1024 -i router
/mipsel-uclibc
/target.image \
150 -t image
/tomato-
$(ND
)$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).trx \
156 @cp fpkg.log image
/fpkg-
$(V1
)$(mips_rev
)$(beta
)$(V2
).log
158 @echo
"-----------------"
159 @echo
`cat router/shared/tomato_version` " ready"
160 @echo
"-----------------"
161 ifneq ($(NOVERSION
),1)
162 @cp router
/shared
/tomato_version router
/shared
/tomato_version_last
163 @btools
/uversion.pl
--bump
170 @touch router
/.config
171 @
rm -f router
/config_
[a-z
]
172 @
rm -f router
/busybox
/config_
[a-z
]
173 @
$(MAKE
) -C router
$@
174 @
-rmdir router
/mipsel-uclibc
179 @
rm -f router
/.config
180 @touch router
/.config
184 @
$(MAKE
) -C
$(LINUXDIR
)/scripts
/squashfs
clean
185 @
$(MAKE
) -C btools
clean
189 mv .config save-config
&& \
190 $(MAKE
) distclean || true
; \
191 cp
-p save-config .config || true
194 @
$(MAKE
) -C router kernel
195 @ls
-l
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/zImage
197 distclean: clean cleanimage cleankernel cleantools
198 ifneq ($(INSIDE_MAK
),1)
199 @
$(MAKE
) -C router
$@ INSIDE_MAK
=1
201 mv router
/busybox
/.config busybox-saved-config || true
202 @
$(MAKE
) -C router
/busybox
distclean
203 @
rm -f router
/busybox
/config_current
204 @cp
-p busybox-saved-config router
/busybox
/.config || true
205 @cp
-p router
/busybox
/.config router
/busybox
/config_current || true
206 @
rm -f router
/config_current
207 @
rm -f router
/.config.cmd router
/.config.old router
/.config
208 @
rm -f router
/libfoo_xref.txt
209 @
rm -f tomato_profile.mak router
/shared
/tomato_profile.h
210 @touch tomato_profile.mak
211 @touch router
/shared
/tomato_profile.h
216 rm -f config_current
; \
217 ln
-s config_base config_current
; \
218 cp
-f config_current .config
219 $(MAKE
) -C
$(LINUXDIR
) oldconfig
220 ifneq ($(CONFIG_LINUX26
),y
)
221 $(MAKE
) -C
$(LINUXDIR
) dep
226 @echo
"$(current_BUILD_DESC)-$(current_BUILD_NAME)-$(TOMATO_PROFILE_NAME) Profile"
230 # The methodology for making the different builds is to
231 # copy the "base" config file to the "target" config file in
232 # the appropriate directory, and then edit it by removing and
233 # inserting the desired configuration lines.
234 # You can't just delete the "whatever=y" line, you must have
235 # a "...is not set" line, or the make oldconfig will stop and ask
238 # Options for "make bin" :
239 # BUILD_DESC (Std|Lite|Ext|...)
244 # NO_CIFS, NO_SSH, NO_ZEBRA, NO_SAMBA, NO_HTTPS, NO_XXTP, NO_LIBOPT
245 # SAMBA3, OPENVPN, IPV6SUPP, EBTABLES, NTFS, MEDIASRV, BBEXTRAS, USBEXTRAS, BCM57, SLIM, NOCAT, CTF, NGINX NANO
246 # NFS BTCLIENT BTGUI TR_EXTRAS SNMP SDHC HFS UPS DNSCRYPT PPTPD TOR IPSEC RAID
250 if
[ "$(CONFIG_LINUX26)" = "y" ] ||
[ "$(SAMBA3)" = "y" ]; then \
251 sed
-i
"/TCONFIG_SAMBA3/d" $(1); \
252 echo
"TCONFIG_SAMBA3=y" >>$(1); \
254 sed
-i
"/TCONFIG_EMF/d" $(1); \
255 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
256 if
[ "$(SLIM)" = "y" ]; then \
257 echo
"# TCONFIG_EMF is not set" >>$(1); \
259 echo
"TCONFIG_EMF=y" >>$(1); \
262 echo
"# TCONFIG_EMF is not set" >>$(1); \
264 sed
-i
"/TCONFIG_JFFSV1/d" $(1); \
265 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
266 if
[ "$(JFFSv1)" = "y" ]; then \
267 echo
"TCONFIG_JFFSV1=y" >>$(1); \
269 echo
"# TCONFIG_JFFSV1 is not set" >>$(1); \
272 echo
"TCONFIG_JFFSV1=y" >>$(1); \
274 if
[ "$(CONFIG_LINUX26)" = "y" ] && [ "$(IPSEC)" = "y" ]; then \
275 echo
"TCONFIG_IPSEC=y" >>$(1); \
277 echo
"# TCONFIG_IPSEC is not set" >>$(1); \
279 if
[ "$(CONFIG_LINUX26)" = "y" ] && [ "$(RAID)" = "y" ]; then \
280 echo
"TCONFIG_RAID=y" >>$(1); \
282 echo
"# TCONFIG_RAID is not set" >>$(1); \
284 if
[ "$(USB)" = "USB" ]; then \
285 sed
-i
"/TCONFIG_USB is not set/d" $(1); \
286 echo
"TCONFIG_USB=y" >>$(1); \
287 if
[ "$(USBEXTRAS)" = "y" ]; then \
288 sed
-i
"/TCONFIG_USB_EXTRAS/d" $(1); \
289 echo
"TCONFIG_USB_EXTRAS=y" >>$(1); \
291 if
[ "$(NTFS)" = "y" ]; then \
292 sed
-i
"/TCONFIG_NTFS/d" $(1); \
293 echo
"TCONFIG_NTFS=y" >>$(1); \
295 if
[ "$(MEDIASRV)" = "y" ]; then \
296 sed
-i
"/TCONFIG_MEDIA_SERVER/d" $(1); \
297 echo
"TCONFIG_MEDIA_SERVER=y" >>$(1); \
300 sed
-i
"/TCONFIG_USB=y/d" $(1); \
301 echo
"# TCONFIG_USB is not set" >>$(1); \
303 if
[ "$(NO_SAMBA)" = "y" ]; then \
304 sed
-i
"/TCONFIG_SAMBASRV/d" $(1); \
305 echo
"# TCONFIG_SAMBASRV is not set" >>$(1); \
307 if
[ "$(NO_ZEBRA)" = "y" ]; then \
308 sed
-i
"/TCONFIG_ZEBRA/d" $(1); \
309 echo
"# TCONFIG_ZEBRA is not set" >>$(1); \
311 if
[ "$(NO_JFFS)" = "y" ]; then \
312 sed
-i
"/TCONFIG_JFFS2/d" $(1); \
313 echo
"# TCONFIG_JFFS2 is not set" >>$(1); \
314 sed
-i
"/TCONFIG_JFFSV1/d" $(1); \
315 echo
"# TCONFIG_JFFSV1 is not set" >>$(1); \
317 if
[ "$(NO_CIFS)" = "y" ]; then \
318 sed
-i
"/TCONFIG_CIFS/d" $(1); \
319 echo
"# TCONFIG_CIFS is not set" >>$(1); \
321 if
[ "$(NO_SSH)" = "y" ]; then \
322 sed
-i
"/TCONFIG_SSH/d" $(1); \
323 echo
"# TCONFIG_SSH is not set" >>$(1); \
325 if
[ "$(NO_HTTPS)" = "y" ]; then \
326 sed
-i
"/TCONFIG_HTTPS/d" $(1); \
327 echo
"# TCONFIG_HTTPS is not set" >>$(1); \
329 if
[ "$(NO_XXTP)" = "y" ]; then \
330 sed
-i
"/TCONFIG_L2TP/d" $(1); \
331 echo
"# TCONFIG_L2TP is not set" >>$(1); \
332 sed
-i
"/TCONFIG_PPTP/d" $(1); \
333 echo
"# TCONFIG_PPTP is not set" >>$(1); \
335 if
[ "$(NO_LIBOPT)" = "y" ]; then \
336 sed
-i
"/TCONFIG_OPTIMIZE_SHARED_LIBS/d" $(1); \
337 echo
"# TCONFIG_OPTIMIZE_SHARED_LIBS is not set" >>$(1); \
339 if
[ "$(EBTABLES)" = "y" ]; then \
340 sed
-i
"/TCONFIG_EBTABLES/d" $(1); \
341 echo
"TCONFIG_EBTABLES=y" >>$(1); \
343 if
[ "$(IPV6SUPP)" = "y" ]; then \
344 sed
-i
"/TCONFIG_IPV6/d" $(1); \
345 echo
"TCONFIG_IPV6=y" >>$(1); \
347 if
[ "$(NOCAT)" = "y" ]; then \
348 sed
-i
"/TCONFIG_NOCAT/d" $(1); \
349 echo
"TCONFIG_NOCAT=y" >>$(1); \
351 if
[ "$(NGINX)" = "y" ]; then \
352 sed
-i
"/TCONFIG_NGINX/d" $(1); \
353 echo
"TCONFIG_NGINX=y" >>$(1); \
355 if
[ "$(OPENVPN)" = "y" ]; then \
356 sed
-i
"/TCONFIG_LZO/d" $(1); \
357 echo
"TCONFIG_LZO=y" >>$(1); \
358 sed
-i
"/TCONFIG_OPENVPN/d" $(1); \
359 echo
"TCONFIG_OPENVPN=y" >>$(1); \
360 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
361 sed
-i
"/TCONFIG_FTP_SSL/d" $(1); \
362 echo
"TCONFIG_FTP_SSL=y" >>$(1); \
365 if
[ "$(PPTPD)" = "y" ]; then \
366 sed
-i
"/TCONFIG_PPTPD/d" $(1); \
367 echo
"TCONFIG_PPTPD=y" >>$(1); \
369 if
[ "$(BTCLIENT)" = "y" ]; then \
370 sed
-i
"/TCONFIG_BT/d" $(1); \
371 echo
"TCONFIG_BT=y" >>$(1); \
372 sed
-i
"/TCONFIG_BBT/d" $(1); \
373 echo
"TCONFIG_BBT=y" >>$(1); \
375 if
[ "$(BTGUI)" = "y" ]; then \
376 sed
-i
"/TCONFIG_BT/d" $(1); \
377 echo
"TCONFIG_BT=y" >>$(1); \
379 if
[ "$(TR_EXTRAS)" = "y" ]; then \
380 sed
-i
"/TCONFIG_TR_EXTRAS/d" $(1); \
381 echo
"TCONFIG_TR_EXTRAS=y" >>$(1); \
383 if
[ "$(NFS)" = "y" ]; then \
384 sed
-i
"/TCONFIG_NFS/d" $(1); \
385 echo
"TCONFIG_NFS=y" >>$(1); \
387 if
[ "$(SNMP)" = "y" ]; then \
388 sed
-i
"/TCONFIG_SNMP/d" $(1); \
389 echo
"TCONFIG_SNMP=y" >>$(1); \
391 if
[ "$(SDHC)" = "y" ]; then \
392 sed
-i
"/TCONFIG_SDHC/d" $(1); \
393 echo
"TCONFIG_SDHC=y" >>$(1); \
395 if
[ "$(DNSSEC)" = "y" ]; then \
396 sed
-i
"/TCONFIG_DNSSEC/d" $(1); \
397 echo
"TCONFIG_DNSSEC=y" >>$(1); \
399 if
[ "$(HFS)" = "y" ]; then \
400 sed
-i
"/TCONFIG_HFS/d" $(1); \
401 echo
"TCONFIG_HFS=y" >>$(1); \
403 if
[ "$(UPS)" = "y" ]; then \
404 sed
-i
"/TCONFIG_UPS/d" $(1); \
405 echo
"TCONFIG_UPS=y" >>$(1); \
407 if
[ "$(NANO)" = "y" ]; then \
408 sed
-i
"/TCONFIG_NANO/d" $(1); \
409 echo
"TCONFIG_NANO=y" >>$(1); \
411 if
[ "$(DNSCRYPT)" = "y" ]; then \
412 sed
-i
"/TCONFIG_DNSCRYPT/d" $(1); \
413 echo
"TCONFIG_DNSCRYPT=y" >>$(1); \
415 if
[ "$(TOR)" = "y" ]; then \
416 sed
-i
"/TCONFIG_TOR/d" $(1); \
417 echo
"TCONFIG_TOR=y" >>$(1); \
419 if
[ "$(CTF)" = "y" ]; then \
420 sed
-i
"/TCONFIG_CTF/d" $(1); \
421 echo
"TCONFIG_CTF=y" >>$(1); \
423 if
[ "$(TINC)" = "y" ]; then \
424 sed
-i
"/TCONFIG_TINC/d" $(1); \
425 echo
"TCONFIG_TINC=y" >>$(1); \
430 define BusyboxOptions
432 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
433 sed
-i
"/CONFIG_FEATURE_2_4_MODULES/d" $(1); \
434 echo
"# CONFIG_FEATURE_2_4_MODULES is not set" >>$(1); \
435 sed
-i
"/CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT/d" $(1); \
436 echo
"CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y" >>$(1); \
437 sed
-i
"/CONFIG_FEATURE_DEVFS/d" $(1); \
438 echo
"# CONFIG_FEATURE_DEVFS is not set" >>$(1); \
439 sed
-i
"/CONFIG_MKNOD/d" $(1); \
440 echo
"CONFIG_MKNOD=y" >>$(1); \
441 sed
-i
"/CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE/d" $(1); \
442 echo
"CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=512" >>$(1); \
444 sed
-i
"/CONFIG_UDHCPC=y/d" $(1); \
445 sed
-i
"/CONFIG_UDHCPC_OLD/d" $(1); \
446 echo
"CONFIG_UDHCPC_OLD=y" >>$(1); \
447 echo
"# CONFIG_UDHCPC is not set" >>$(1); \
449 if
[ "$(NO_CIFS)" = "y" ]; then \
450 sed
-i
"/CONFIG_FEATURE_MOUNT_CIFS/d" $(1); \
451 echo
"# CONFIG_FEATURE_MOUNT_CIFS is not set" >>$(1); \
453 if
[ "$(BBEXTRAS)" = "y" ]; then \
454 sed
-i
"/CONFIG_SENDMAIL/d" $(1); \
455 echo
"CONFIG_SENDMAIL=y" >>$(1); \
456 sed
-i
"/CONFIG_WHOIS/d" $(1); \
457 echo
"CONFIG_WHOIS=y" >>$(1); \
458 sed
-i
"/CONFIG_FEATURE_SORT_BIG/d" $(1); \
459 echo
"CONFIG_FEATURE_SORT_BIG=y" >>$(1); \
460 sed
-i
"/CONFIG_CLEAR/d" $(1); \
461 echo
"CONFIG_CLEAR=y" >>$(1); \
462 sed
-i
"/CONFIG_NICE/d" $(1); \
463 echo
"CONFIG_NICE=y" >>$(1); \
464 sed
-i
"/CONFIG_SETCONSOLE/d" $(1); \
465 echo
"CONFIG_SETCONSOLE=y" >>$(1); \
466 sed
-i
"/CONFIG_SEQ/d" $(1); \
467 echo
"CONFIG_SEQ=y" >>$(1); \
468 sed
-i
"/CONFIG_STTY/d" $(1); \
469 echo
"CONFIG_STTY=y" >>$(1); \
471 if
[ "$(USB)" = "USB" ]; then \
472 if
[ "$(USBEXTRAS)" = "y" ]; then \
473 sed
-i
"/CONFIG_E2FSCK/d" $(1); \
474 echo
"CONFIG_E2FSCK=y" >>$(1); \
475 sed
-i
"/CONFIG_MKE2FS/d" $(1); \
476 echo
"CONFIG_MKE2FS=y" >>$(1); \
477 sed
-i
"/CONFIG_FDISK/d" $(1); \
478 echo
"CONFIG_FDISK=y" >>$(1); \
479 sed
-i
"/CONFIG_FEATURE_FDISK_WRITABLE/d" $(1); \
480 echo
"CONFIG_FEATURE_FDISK_WRITABLE=y" >>$(1); \
481 sed
-i
"/CONFIG_MKFS_VFAT/d" $(1); \
482 echo
"CONFIG_MKFS_VFAT=y" >>$(1); \
483 sed
-i
"/CONFIG_MKSWAP/d" $(1); \
484 echo
"CONFIG_MKSWAP=y" >>$(1); \
485 sed
-i
"/CONFIG_FLOCK/d" $(1); \
486 echo
"CONFIG_FLOCK=y" >>$(1); \
487 sed
-i
"/CONFIG_FSYNC/d" $(1); \
488 echo
"CONFIG_FSYNC=y" >>$(1); \
489 sed
-i
"/CONFIG_TUNE2FS/d" $(1); \
490 echo
"CONFIG_TUNE2FS=y" >>$(1); \
491 sed
-i
"/CONFIG_E2LABEL/d" $(1); \
492 echo
"CONFIG_E2LABEL=y" >>$(1); \
493 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
494 sed
-i
"/CONFIG_LSUSB/d" $(1); \
495 echo
"CONFIG_LSUSB=y" >>$(1); \
496 sed
-i
"/CONFIG_FEATURE_WGET_STATUSBAR/d" $(1); \
497 echo
"CONFIG_FEATURE_WGET_STATUSBAR=y" >>$(1); \
498 sed
-i
"/CONFIG_FEATURE_VERBOSE_USAGE/d" $(1); \
499 echo
"CONFIG_FEATURE_VERBOSE_USAGE=y" >>$(1); \
503 sed
-i
"/CONFIG_FEATURE_MOUNT_LOOP/d" $(1); \
504 echo
"# CONFIG_FEATURE_MOUNT_LOOP is not set" >>$(1); \
505 sed
-i
"/CONFIG_FEATURE_DEVFS/d" $(1); \
506 echo
"# CONFIG_FEATURE_DEVFS is not set" >>$(1); \
507 sed
-i
"/CONFIG_FEATURE_MOUNT_LABEL/d" $(1); \
508 echo
"# CONFIG_FEATURE_MOUNT_LABEL is not set" >>$(1); \
509 sed
-i
"/CONFIG_FEATURE_MOUNT_FSTAB/d" $(1); \
510 echo
"# CONFIG_FEATURE_MOUNT_FSTAB is not set" >>$(1); \
511 sed
-i
"/CONFIG_VOLUMEID/d" $(1); \
512 echo
"# CONFIG_VOLUMEID is not set" >>$(1); \
513 sed
-i
"/CONFIG_BLKID/d" $(1); \
514 echo
"# CONFIG_BLKID is not set" >>$(1); \
515 sed
-i
"/CONFIG_SWAPONOFF/d" $(1); \
516 echo
"# CONFIG_SWAPONOFF is not set" >>$(1); \
517 sed
-i
"/CONFIG_CHROOT/d" $(1); \
518 echo
"# CONFIG_CHROOT is not set" >>$(1); \
519 sed
-i
"/CONFIG_PIVOT_ROOT/d" $(1); \
520 echo
"# CONFIG_PIVOT_ROOT is not set" >>$(1); \
521 sed
-i
"/CONFIG_TRUE/d" $(1); \
522 echo
"# CONFIG_TRUE is not set" >>$(1); \
524 if
[ "$(IPV6SUPP)" = "y" ]; then \
525 sed
-i
"/CONFIG_FEATURE_IPV6/d" $(1); \
526 echo
"CONFIG_FEATURE_IPV6=y" >>$(1); \
527 sed
-i
"/CONFIG_PING6/d" $(1); \
528 echo
"CONFIG_PING6=y" >>$(1); \
529 sed
-i
"/CONFIG_TRACEROUTE6/d" $(1); \
530 echo
"CONFIG_TRACEROUTE6=y" >>$(1); \
531 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
532 sed
-i
"/CONFIG_FEATURE_UDHCP_RFC5969/d" $(1); \
533 echo
"CONFIG_FEATURE_UDHCP_RFC5969=y" >>$(1); \
536 if
[ "$(SLIM)" = "y" ]; then \
537 sed
-i
"/CONFIG_AWK/d" $(1); \
538 echo
"# CONFIG_AWK is not set" >>$(1); \
539 sed
-i
"/CONFIG_BASENAME/d" $(1); \
540 echo
"# CONFIG_BASENAME is not set" >>$(1); \
541 sed
-i
"/CONFIG_FEATURE_DEVFS/d" $(1); \
542 echo
"# CONFIG_FEATURE_DEVFS is not set" >>$(1); \
543 sed
-i
"/CONFIG_BLKID/d" $(1); \
544 echo
"# CONFIG_BLKID is not set" >>$(1); \
545 sed
-i
"/CONFIG_TELNET=y/d" $(1); \
546 echo
"# CONFIG_TELNET is not set" >>$(1); \
547 sed
-i
"/CONFIG_ARPING/d" $(1); \
548 echo
"# CONFIG_ARPING is not set" >>$(1); \
549 sed
-i
"/CONFIG_FEATURE_LS_COLOR/d" $(1); \
550 echo
"# CONFIG_FEATURE_LS_COLOR is not set" >>$(1); \
551 sed
-i
"/CONFIG_CHOWN/d" $(1); \
552 echo
"# CONFIG_CHOWN is not set" >>$(1); \
554 sed
-i
"/CONFIG_FEATURE_LS_COLOR/d" $(1); \
555 echo
"CONFIG_FEATURE_LS_COLOR=y" >>$(1); \
556 sed
-i
"/CONFIG_FEATURE_LS_COLOR_IS_DEFAULT/d" $(1); \
557 echo
"CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y" >>$(1); \
564 sed
-i
"/CONFIG_NVRAM_SIZE/d" $(1); \
565 echo
"CONFIG_NVRAM_SIZE="$(NVRAM_SIZE
) >>$(1); \
566 sed
-i
"/CONFIG_CC_OPTIMIZE_FOR_SIZE/d" $(1); \
567 if
[ "$(KERN_SIZE_OPT)" = "y" ]; then \
568 echo
"CONFIG_CC_OPTIMIZE_FOR_SIZE=y" >>$(1); \
570 echo
"# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set" >>$(1); \
572 if
[ "$(CONFIG_LINUX26)" = "y" ] && [ "$(MIPS32)" = "r2" ]; then \
573 sed
-i
"/CONFIG_CPU_MIPS32_R1/d" $(1); \
574 echo
"# CONFIG_CPU_MIPS32_R1 is not set" >>$(1); \
575 sed
-i
"/CONFIG_CPU_MIPS32_R2/d" $(1); \
576 echo
"CONFIG_CPU_MIPS32_R2=y" >>$(1); \
577 sed
-i
"/CONFIG_CPU_MIPSR1/d" $(1); \
578 echo
"CONFIG_CPU_MIPSR2=y" >>$(1); \
580 if
[ "$(UPS)" = "y" ]; then \
581 sed
-i
"/CONFIG_INPUT=m/d" $(1); \
582 echo
"CONFIG_INPUT=y" >>$(1); \
583 sed
-i
"/CONFIG_USB=m/d" $(1); \
584 echo
"CONFIG_USB=y" >>$(1); \
585 sed
-i
"/CONFIG_HID=m/d" $(1); \
586 echo
"CONFIG_HID=y" >>$(1); \
587 sed
-i
"/CONFIG_USB_HID=m/d" $(1); \
588 echo
"CONFIG_USB_HID=y" >>$(1); \
589 sed
-i
"/CONFIG_USB_HIDDEV=m/d" $(1); \
590 echo
"CONFIG_USB_HIDDEV=y" >>$(1); \
591 sed
-i
"/CONFIG_USB_DEVICEFS=m/d" $(1); \
592 echo
"CONFIG_USB_DEVICEFS=y" >>$(1); \
594 if
[ "$(USB)" = "" ]; then \
595 sed
-i
"/CONFIG_EFI_PARTITION/d" $(1); \
596 echo
"# CONFIG_EFI_PARTITION is not set" >>$(1); \
598 if
[ "$(IPV6SUPP)" = "y" ]; then \
599 sed
-i
"/CONFIG_IPV6 is not set/d" $(1); \
600 echo
"CONFIG_IPV6=y" >>$(1); \
601 sed
-i
"/CONFIG_IP6_NF_IPTABLES/d" $(1); \
602 echo
"CONFIG_IP6_NF_IPTABLES=y" >>$(1); \
603 sed
-i
"/CONFIG_IP6_NF_MATCH_RT/d" $(1); \
604 echo
"CONFIG_IP6_NF_MATCH_RT=y" >>$(1); \
605 sed
-i
"/CONFIG_IP6_NF_FILTER/d" $(1); \
606 echo
"CONFIG_IP6_NF_FILTER=m" >>$(1); \
607 sed
-i
"/CONFIG_IP6_NF_TARGET_LOG/d" $(1); \
608 echo
"CONFIG_IP6_NF_TARGET_LOG=m" >>$(1); \
609 sed
-i
"/CONFIG_IP6_NF_TARGET_REJECT/d" $(1); \
610 echo
"CONFIG_IP6_NF_TARGET_REJECT=m" >>$(1); \
611 sed
-i
"/CONFIG_IP6_NF_MANGLE/d" $(1); \
612 echo
"CONFIG_IP6_NF_MANGLE=m" >>$(1); \
613 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
614 sed
-i
"/CONFIG_NF_CONNTRACK_IPV6/d" $(1); \
615 echo
"CONFIG_NF_CONNTRACK_IPV6=m" >>$(1); \
616 sed
-i
"/CONFIG_NETFILTER_XT_MATCH_HL/d" $(1); \
617 echo
"CONFIG_NETFILTER_XT_MATCH_HL=m" >>$(1); \
618 sed
-i
"/CONFIG_IPV6_ROUTER_PREF/d" $(1); \
619 echo
"CONFIG_IPV6_ROUTER_PREF=y" >>$(1); \
620 sed
-i
"/CONFIG_IPV6_SIT/d" $(1); \
621 echo
"CONFIG_IPV6_SIT=m" >>$(1); \
622 sed
-i
"/CONFIG_IPV6_SIT_6RD/d" $(1); \
623 echo
"CONFIG_IPV6_SIT_6RD=y" >>$(1); \
624 sed
-i
"/CONFIG_IPV6_MULTIPLE_TABLES/d" $(1); \
625 echo
"CONFIG_IPV6_MULTIPLE_TABLES=y" >>$(1); \
626 sed
-i
"/CONFIG_IP6_NF_RAW/d" $(1); \
627 echo
"CONFIG_IP6_NF_RAW=m" >>$(1); \
628 sed
-i
"/CONFIG_IPV6_OPTIMISTIC_DAD/d" $(1); \
629 echo
"CONFIG_IPV6_OPTIMISTIC_DAD=y" >>$(1); \
630 sed
-i
"/CONFIG_IPV6_MROUTE/d" $(1); \
631 echo
"CONFIG_IPV6_MROUTE=y" >>$(1); \
632 sed
-i
"/CONFIG_IP6_NF_TARGET_ROUTE/d" $(1); \
633 echo
"CONFIG_IP6_NF_TARGET_ROUTE=m" >>$(1); \
634 sed
-i
"/CONFIG_INET6_XFRM_TUNNEL/d" $(1); \
635 echo
"CONFIG_INET6_XFRM_TUNNEL=m" >>$(1); \
636 sed
-i
"/CONFIG_INET6_AH/d" $(1); \
637 echo
"CONFIG_INET6_AH=m" >>$(1); \
638 sed
-i
"/CONFIG_INET6_ESP/d" $(1); \
639 echo
"CONFIG_INET6_ESP=m" >>$(1); \
640 sed
-i
"/CONFIG_INET6_IPCOMP/d" $(1); \
641 echo
"CONFIG_INET6_IPCOMP=m" >>$(1); \
642 sed
-i
"/CONFIG_INET6_XFRM_MODE_TRANSPORT/d" $(1); \
643 echo
"CONFIG_INET6_XFRM_MODE_TRANSPORT=m" >>$(1); \
644 sed
-i
"/CONFIG_INET6_XFRM_MODE_TUNNEL/d" $(1); \
645 echo
"CONFIG_INET6_XFRM_MODE_TUNNEL=m" >>$(1); \
646 sed
-i
"/CONFIG_INET6_XFRM_MODE_BEET/d" $(1); \
647 echo
"CONFIG_INET6_XFRM_MODE_BEET=m" >>$(1); \
649 sed
-i
"/CONFIG_IP6_NF_CONNTRACK/d" $(1); \
650 echo
"CONFIG_IP6_NF_CONNTRACK=m" >>$(1); \
651 sed
-i
"/CONFIG_IP6_NF_MATCH_HL/d" $(1); \
652 echo
"CONFIG_IP6_NF_MATCH_HL=m" >>$(1); \
653 sed
-i
"/CONFIG_IP6_NF_FTP/d" $(1); \
654 echo
"CONFIG_IP6_NF_FTP=m" >>$(1); \
655 sed
-i
"/CONFIG_IP6_NF_MATCH_LIMIT/d" $(1); \
656 echo
"CONFIG_IP6_NF_MATCH_LIMIT=m" >>$(1); \
657 sed
-i
"/CONFIG_IP6_NF_MATCH_CONDITION/d" $(1); \
658 echo
"CONFIG_IP6_NF_MATCH_CONDITION=m" >>$(1); \
659 sed
-i
"/CONFIG_IP6_NF_MATCH_MAC/d" $(1); \
660 echo
"CONFIG_IP6_NF_MATCH_MAC=m" >>$(1); \
661 sed
-i
"/CONFIG_IP6_NF_MATCH_MULTIPORT/d" $(1); \
662 echo
"CONFIG_IP6_NF_MATCH_MULTIPORT=m" >>$(1); \
663 sed
-i
"/CONFIG_IP6_NF_MATCH_MARK/d" $(1); \
664 echo
"CONFIG_IP6_NF_MATCH_MARK=m" >>$(1); \
665 sed
-i
"/CONFIG_IP6_NF_MATCH_LENGTH/d" $(1); \
666 echo
"CONFIG_IP6_NF_MATCH_LENGTH=m" >>$(1); \
667 sed
-i
"/CONFIG_IP6_NF_MATCH_STATE/d" $(1); \
668 echo
"CONFIG_IP6_NF_MATCH_STATE=m" >>$(1); \
669 sed
-i
"/CONFIG_IP6_NF_TARGET_MARK/d" $(1); \
670 echo
"CONFIG_IP6_NF_TARGET_MARK=m" >>$(1); \
671 sed
-i
"/CONFIG_IP6_NF_TARGET_TCPMSS/d" $(1); \
672 echo
"CONFIG_IP6_NF_TARGET_TCPMSS=m" >>$(1); \
673 sed
-i
"/CONFIG_IP6_NF_TARGET_ROUTE/d" $(1); \
674 echo
"CONFIG_IP6_NF_TARGET_ROUTE=m" >>$(1); \
677 sed
-i
"/CONFIG_BCM57XX/d" $(1); \
678 if
[ "$(BCM57)" = "y" ]; then \
679 echo
"CONFIG_BCM57XX=m" >>$(1); \
681 echo
"# CONFIG_BCM57XX is not set" >>$(1); \
683 if
[ "$(CONFIG_LINUX26)" = "y" ] && [ "$(EBTABLES)" = "y" ]; then \
684 sed
-i
"/CONFIG_BRIDGE_NF_EBTABLES/d" $(1); \
685 echo
"CONFIG_BRIDGE_NF_EBTABLES=m" >>$(1); \
686 if
[ "$(IPV6SUPP)" = "y" ]; then \
687 sed
-i
"/CONFIG_BRIDGE_EBT_IP6/d" $(1); \
688 echo
"CONFIG_BRIDGE_EBT_IP6=m" >>$(1); \
697 @echo
$@
" is not a valid target!"
700 @cp router
/config_base router
/config_
$(lowercase_B
)
701 @cp router
/busybox
/config_base router
/busybox
/config_
$(lowercase_B
)
702 @cp
$(LINUXDIR
)/config_base
$(LINUXDIR
)/config_
$(lowercase_B
)
704 $(call RouterOptions
, router
/config_
$(lowercase_B
))
705 $(call KernelConfig
, $(LINUXDIR
)/config_
$(lowercase_B
))
706 $(call BusyboxOptions
, router
/busybox
/config_
$(lowercase_B
))
708 @
$(MAKE
) setprofile N
=$(TPROFILE
) B
=$(B
) DESC
="$(BUILD_DESC)" USB
="$(USB)"
711 ## mini-USB - K24 only
713 ifneq ($(CONFIG_LINUX26
),y
)
714 @
$(MAKE
) bin BBEXTRAS
=y USBEXTRAS
=y B
=E BUILD_DESC
="mini-USB" USB
="USB"
719 ifeq ($(CONFIG_LINUX26
),y
)
720 @
$(MAKE
) bin OPENVPN
=y NTFS
=y BBEXTRAS
=y USBEXTRAS
=y EBTABLES
=y MEDIASRV
=y IPV6SUPP
=y B
=E BUILD_DESC
="$(VPN)" USB
="USB" DNSCRYPT
=y PPTPD
=y
722 @
$(MAKE
) bin OPENVPN
=y NTFS
=y BBEXTRAS
=y USBEXTRAS
=y B
=E BUILD_DESC
="$(VPN)" USB
="USB" DNSCRYPT
=y PPTPD
=y
727 ifeq ($(CONFIG_LINUX26
),y
)
728 @
$(MAKE
) bin NTFS
=y OPENVPN
=y BBEXTRAS
=y USBEXTRAS
=y EBTABLES
=y MEDIASRV
=y IPV6SUPP
=y B
=M BUILD_DESC
="BTgui-VPN" USB
="USB" BTGUI
=y DNSCRYPT
=y PPTPD
=y
730 @
$(MAKE
) bin NTFS
=y BBEXTRAS
=y USBEXTRAS
=y B
=M BUILD_DESC
="BTgui" USB
="USB" BTGUI
=y DNSCRYPT
=y PPTPD
=y
735 ifeq ($(CONFIG_LINUX26
),y
)
736 @
$(MAKE
) bin NTFS
=y BBEXTRAS
=y USBEXTRAS
=y EBTABLES
=y MEDIASRV
=y IPV6SUPP
=y B
=M BUILD_DESC
="Nocat-VPN" USB
="USB" BTGUI
=y NOCAT
=y OPENVPN
=y DNSCRYPT
=y PPTPD
=y
738 @
$(MAKE
) bin NTFS
=y BBEXTRAS
=y USBEXTRAS
=y B
=M BUILD_DESC
="Nocat-VPN" USB
="USB" BTGUI
=y NOCAT
=y OPENVPN
=y DNSCRYPT
=y PPTPD
=y
743 ifeq ($(CONFIG_LINUX26
),y
)
744 @
$(MAKE
) bin NTFS
=y BBEXTRAS
=y USBEXTRAS
=y EBTABLES
=y MEDIASRV
=y IPV6SUPP
=y B
=M BUILD_DESC
="Tor-VPN" USB
="USB" BTGUI
=y TOR
=y OPENVPN
=y PPTPD
=y NO_CIFS
=y NO_JFFS
=y
746 @
$(MAKE
) bin NTFS
=y BBEXTRAS
=y USBEXTRAS
=y B
=M BUILD_DESC
="Tor-VPN" USB
="USB" BTGUI
=y TOR
=y OPENVPN
=y PPTPD
=y NO_CIFS
=y NO_JFFS
=y
751 ifeq ($(CONFIG_LINUX26
),y
)
752 @
$(MAKE
) bin NTFS
=y USBEXTRAS
=y EBTABLES
=y MEDIASRV
=y IPV6SUPP
=y B
=M BUILD_DESC
="BT" USB
="USB" BTCLIENT
=y
754 @
$(MAKE
) bin NTFS
=y USBEXTRAS
=y B
=M BUILD_DESC
="BT" USB
="USB" BTCLIENT
=y
759 ifeq ($(CONFIG_LINUX26
),y
)
760 @
$(MAKE
) bin OPENVPN
=y NTFS
=y USBEXTRAS
=y EBTABLES
=y MEDIASRV
=y IPV6SUPP
=y B
=M BUILD_DESC
="BT-VPN" USB
="USB" BTCLIENT
=y NO_JFFS
=y PPTPD
=y
762 @
$(MAKE
) bin OPENVPN
=y NTFS
=y USBEXTRAS
=y B
=M BUILD_DESC
="BT-VPN" USB
="USB" BTCLIENT
=y NO_JFFS
=y PPTPD
=y
767 ifeq ($(CONFIG_LINUX26
),y
)
768 @
$(MAKE
) bin NTFS
=y BBEXTRAS
=y USBEXTRAS
=y EBTABLES
=y MEDIASRV
=y IPV6SUPP
=y B
=M BUILD_DESC
="Big-VPN" USB
="USB" BTGUI
=y NFS
=y NOCAT
=y OPENVPN
=y DNSCRYPT
=y PPTPD
=y NO_JFFS
=y NO_CIFS
=y
770 @
$(MAKE
) bin NTFS
=y BBEXTRAS
=y USBEXTRAS
=y B
=M BUILD_DESC
="Big-VPN" USB
="USB" BTGUI
=y NOCAT
=y NFS
=y OPENVPN
=y DNSCRYPT
=y PPTPD
=y NO_JJFS
=y NO_CIFS
=y
775 ifeq ($(CONFIG_LINUX26
),y
)
776 @
$(MAKE
) bin OPENVPN
=y NTFS
=y BBEXTRAS
=y USBEXTRAS
=y EBTABLES
=y MEDIASRV
=y IPV6SUPP
=y B
=E BUILD_DESC
="Mega-VPN" USB
="USB" NOCAT
=y BTCLIENT
=y DNSCRYPT
=y SNMP
=y UPS
=y PPTPD
=y TR_EXTRAS
=y TOR
=y IPSEC
=y RAID
=y
778 ## All-In-One (AIO) MIPS1 - only for router with more than 8MB flash!! ZTE H618B
780 @
$(MAKE
) bin OPENVPN
=y NTFS
=y BBEXTRAS
=y USBEXTRAS
=y EBTABLES
=y MEDIASRV
=y IPV6SUPP
=y B
=E BUILD_DESC
="AIO" USB
="USB" NOCAT
=y BTCLIENT
=y TR_EXTRAS
=y NFS
=y SNMP
=y HFS
=y DNSCRYPT
=y UPS
=y PPTPD
=y TOR
=y IPSEC
=y RAID
=y NGINX
=y DNSSEC
=y TINC
=y NANO
=y
783 #################################
785 ifeq ($(CONFIG_LINUX26
),y
)
787 ## Mini - targeted for Netgear routers
789 @
$(MAKE
) bin JFFSv1
=y NO_CIFS
=y NO_ZEBRA
=y B
=F BUILD_DESC
="Mini" USB
=""
791 ## MiniIPv6 - for 4MB routers
793 @
$(MAKE
) bin NO_JFFS
=y NO_CIFS
=y NO_ZEBRA
=y IPV6SUPP
=y B
=I BUILD_DESC
="MiniIPv6" USB
=""
795 ## MiniVPN - for 4MB routers
797 @
$(MAKE
) bin NO_JFFS
=y NO_CIFS
=y NO_ZEBRA
=y B
=V BUILD_DESC
="MiniVPN" USB
="" PPTPD
=y OPENVPN
=y
800 ## VPN with no USB support (IPv6 in K26 build)
802 ifeq ($(CONFIG_LINUX26
),y
)
803 @
$(MAKE
) bin OPENVPN
=y NO_JFFS
=y B
=V BUILD_DESC
="IPv6-$(VPN)" USB
="" PPTPD
=y IPV6SUPP
=y
805 @
$(MAKE
) bin OPENVPN
=y BBEXTRAS
=y BCM57
=y B
=V BUILD_DESC
="$(VPN)" USB
="" PPTPD
=y
808 ## Max build for router with 8MB flash without USB Support (like WRT54GS v1)
810 ifeq ($(CONFIG_LINUX26
),y
)
811 @
$(MAKE
) bin OPENVPN
=y BBEXTRAS
=y EBTABLES
=y IPV6SUPP
=y B
=E BUILD_DESC
="Max" USB
="" NOCAT
=y NFS
=y SNMP
=y DNSCRYPT
=y PPTPD
=y TOR
=y IPSEC
=y
813 @
$(MAKE
) bin OPENVPN
=y BBEXTRAS
=y B
=E BUILD_DESC
="Max" USB
="" NOCAT
=y NFS
=y SNMP
=y DNSCRYPT
=y PPTPD
=y TOR
=y
818 ifneq ($(CONFIG_LINUX26
),y
)
819 @
$(MAKE
) bin OPENVPN
=y BBEXTRAS
=y BCM57
=y B
=V BUILD_DESC
="SD-VPN" USB
="" SDHC
=y DNSCRYPT
=y PPTPD
=y
823 ## Make Mips32r2 builds ##
825 #AIO MIPS2 for RT-N16 and E4200
854 @
$(MAKE
) f MIPS32
=r2 BELKIN
=y
870 @
$(MAKE
) r2z NVRAM_SIZE
=60 LINKSYS_E
=1
873 @
$(MAKE
) r2e NVRAM_SIZE
=60 LINKSYS_E
=1
876 @
$(MAKE
) r2c NVRAM_SIZE
=60 LINKSYS_E
=1
879 @
$(MAKE
) r2u NVRAM_SIZE
=60 LINKSYS_E
=1
882 @
$(MAKE
) r2t NVRAM_SIZE
=60 LINKSYS_E
=1
885 @
$(MAKE
) r2b NVRAM_SIZE
=60 LINKSYS_E
=1
888 @
$(MAKE
) r2d NVRAM_SIZE
=60 LINKSYS_E
=1
891 @
$(MAKE
) r2g NVRAM_SIZE
=60 LINKSYS_E
=1
894 @
$(MAKE
) r2o NVRAM_SIZE
=60 LINKSYS_E
=1
897 @
$(MAKE
) r2v NVRAM_SIZE
=60 LINKSYS_E
=1
900 @
$(MAKE
) r2m NVRAM_SIZE
=60 LINKSYS_E
=1
903 echo
'#ifndef TOMATO_PROFILE' > router
/shared
/tomato_profile.h
904 echo
'#define TOMATO_$(N) 1' >> router
/shared
/tomato_profile.h
905 echo
'#define PROFILE_G 1' >> router
/shared
/tomato_profile.h
906 echo
'#define PROFILE_N 2' >> router
/shared
/tomato_profile.h
907 echo
'#define TOMATO_PROFILE PROFILE_$(N)' >> router
/shared
/tomato_profile.h
908 echo
'#define TOMATO_PROFILE_NAME "$(N)"' >> router
/shared
/tomato_profile.h
909 echo
'#define TOMATO_BUILD_NAME "$(B)"' >> router
/shared
/tomato_profile.h
910 echo
'#define TOMATO_BUILD_DESC "$(DESC)"' >> router
/shared
/tomato_profile.h
911 echo
'#ifndef CONFIG_NVRAM_SIZE' >> router
/shared
/tomato_profile.h
912 echo
'#define CONFIG_NVRAM_SIZE $(NVRAM_SIZE)' >> router
/shared
/tomato_profile.h
913 echo
'#endif' >> router
/shared
/tomato_profile.h
914 echo
'#endif' >> router
/shared
/tomato_profile.h
916 echo
'TOMATO_$(N) = 1' > tomato_profile.mak
917 echo
'PROFILE_G = 1' >> tomato_profile.mak
918 echo
'PROFILE_N = 2' >> tomato_profile.mak
919 echo
'TOMATO_PROFILE = $$(PROFILE_$(N))' >> tomato_profile.mak
920 echo
'TOMATO_PROFILE_NAME = "$(N)"' >> tomato_profile.mak
921 echo
'TOMATO_BUILD = "$(B)"' >> tomato_profile.mak
922 echo
'TOMATO_BUILD_NAME = "$(B)"' >> tomato_profile.mak
923 echo
'TOMATO_BUILD_DESC = "$(DESC)"' >> tomato_profile.mak
924 echo
'TOMATO_PROFILE_L = $(lowercase_N)' >> tomato_profile.mak
925 echo
'TOMATO_PROFILE_U = $(uppercase_N)' >> tomato_profile.mak
926 echo
'TOMATO_BUILD_USB = "$(USB)"' >> tomato_profile.mak
928 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
930 # Note that changes to variables in tomato_profile.mak don't
931 # get propogated to this invocation of make!
933 @echo
"Using $(N) profile, $(B) build config."
937 rm -f config_current
; \
938 ln
-s config_
$(lowercase_B
) config_current
; \
939 cp
-f config_current .config
941 @cd router
/busybox
&& \
942 rm -f config_current
; \
943 ln
-s config_
$(lowercase_B
) config_current
; \
944 cp config_current .config
947 rm -f config_current
; \
948 ln
-s config_
$(lowercase_B
) config_current
; \
949 cp config_current .config
951 @
$(MAKE
) -C router oldconfig
954 @echo
"n Mini-USB - for oruter with 4MB flash and USB port - K24 only"
955 @echo
"e VPN - (standard plus VPN, extra utilities and NTFS support)"
956 @echo
"c BTgui-VPN - (Ext plus BT gui)"
957 @echo
"d Nocat-VPN - (BTgui plus VPN plus Nocat)"
958 @echo
"g Tor-VPN - (BTgui plus VPN plus TOR Project)"
959 @echo
"t BT-VPN - (BT plus VPN)"
960 @echo
"b Big-VPN - (Big plus VPN)"
961 @echo
"o Mega-VPN - (Mega plus VPN plus NOCAT minus NFS)"
962 ifeq ($(CONFIG_LINUX26
),y
)
963 @echo
"z MIPS Release 15F AIO (for routers +8MB flash)"
964 @echo
"i MiniIPv6 - (IPv6 with no USB support minus CIFS and RIPv1/2)"
965 @echo
"j MiniVPN - (VPN with no USB support minus CIFS and RIPv1/2)"
967 @echo
"f Mini - (no USB support minus CIFS and RIPv1/2)"
968 @echo
"v VPN (no usb) - (VPN with no USB support)" / in K26
+ IPv6 support
969 @echo
"m Max (no usb) - (Max with no USB support)" / in K26
+ IPv6 support
970 @echo
"w SD-VPN (no usb) - (VPN with SD-MOD and no USB support)"
971 ifeq ($(CONFIG_LINUX26
),y
)
972 @echo
"r2e MIPS Release 2 VPN"
973 @echo
"r2c MIPS Release 2 BTgui-VPN"
974 @echo
"r2d MIPS Release 2 Nocat-VPN"
975 @echo
"r2g MIPS Release 2 Tor-VPN"
976 @echo
"r2t MIPS Release 2 BT-VPN"
977 @echo
"r2b MIPS Release 2 Big-VPN"
978 @echo
"r2o MIPS Release 2 Mega-VPN (for routers +8MB flash)"
979 @echo
"r2z MIPS Release 2 AIO (for routers +8MB flash)"
980 @echo
"r2v MIPS Release 2 VPN (no usb)"
981 @echo
"r2m MIPS Release 2 Max (no usb)"
982 @echo
"r2i MIPS Release 2 MiniIPv6 (for 4MB flash)"
983 @echo
"r2j MIPS Release 2 MiniVPN (for 4MB flash)"
984 @echo
"r2f MIPS Release 2 Mini (for netgear)"
985 @echo
"n60e Linksys E-series build VPN"
986 @echo
"n60c Linksys E-series build BTGui-VPN"
987 @echo
"n60d Linksys E-series build BTGui-VPN plus Nocat"
988 @echo
"n60g Linksys E-series build BTGui-VPN plus TOR Project"
989 @echo
"n60t Linksys E-series build BT-VPN"
990 @echo
"n60b Linksys E-series build Big-VPN"
991 @echo
"n60o Linksys E-series build Mega-VPN"
992 @echo
"n60z Linksys E-series build AIO"
993 @echo
"n60v Linksys E-series build IPv6-VPN for E2000"
994 @echo
"n60m Linksys E-series build Max for E2000"
996 @echo
"..etc.. other build configs"
997 @echo
"clean -C router clean"
998 @echo
"cleanimage rm -rf image"
999 @echo
"cleantools clean btools, mksquashfs"
1000 @echo
"cleankernel -C Linux distclean (but preserves .config)"
1001 @echo
"distclean distclean of Linux & busybox (but preserve .configs)"
1002 @echo
"prepk -C Linux oldconfig dep"
1004 .PHONY
: all clean distclean cleanimage cleantools cleankernel prepk what setprofile help
1005 .PHONY
: a b c d m nc Makefile allversions tomato_profile.mak