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
[ "$(MIPS32)" = "r2" ]; then \
285 echo
"TCONFIG_MIPSR2=y" >>$(1); \
287 echo
"# TCONFIG_MIPSR2 is not set" >>$(1); \
289 if
[ "$(USB)" = "USB" ]; then \
290 sed
-i
"/TCONFIG_USB is not set/d" $(1); \
291 echo
"TCONFIG_USB=y" >>$(1); \
292 if
[ "$(USBEXTRAS)" = "y" ]; then \
293 sed
-i
"/TCONFIG_USB_EXTRAS/d" $(1); \
294 echo
"TCONFIG_USB_EXTRAS=y" >>$(1); \
296 if
[ "$(NTFS)" = "y" ]; then \
297 sed
-i
"/TCONFIG_NTFS/d" $(1); \
298 echo
"TCONFIG_NTFS=y" >>$(1); \
300 if
[ "$(MEDIASRV)" = "y" ]; then \
301 sed
-i
"/TCONFIG_MEDIA_SERVER/d" $(1); \
302 echo
"TCONFIG_MEDIA_SERVER=y" >>$(1); \
305 sed
-i
"/TCONFIG_USB=y/d" $(1); \
306 echo
"# TCONFIG_USB is not set" >>$(1); \
308 if
[ "$(NO_SAMBA)" = "y" ]; then \
309 sed
-i
"/TCONFIG_SAMBASRV/d" $(1); \
310 echo
"# TCONFIG_SAMBASRV is not set" >>$(1); \
312 if
[ "$(NO_ZEBRA)" = "y" ]; then \
313 sed
-i
"/TCONFIG_ZEBRA/d" $(1); \
314 echo
"# TCONFIG_ZEBRA is not set" >>$(1); \
316 if
[ "$(NO_JFFS)" = "y" ]; then \
317 sed
-i
"/TCONFIG_JFFS2/d" $(1); \
318 echo
"# TCONFIG_JFFS2 is not set" >>$(1); \
319 sed
-i
"/TCONFIG_JFFSV1/d" $(1); \
320 echo
"# TCONFIG_JFFSV1 is not set" >>$(1); \
322 if
[ "$(NO_CIFS)" = "y" ]; then \
323 sed
-i
"/TCONFIG_CIFS/d" $(1); \
324 echo
"# TCONFIG_CIFS is not set" >>$(1); \
326 if
[ "$(NO_SSH)" = "y" ]; then \
327 sed
-i
"/TCONFIG_SSH/d" $(1); \
328 echo
"# TCONFIG_SSH is not set" >>$(1); \
330 if
[ "$(NO_HTTPS)" = "y" ]; then \
331 sed
-i
"/TCONFIG_HTTPS/d" $(1); \
332 echo
"# TCONFIG_HTTPS is not set" >>$(1); \
334 if
[ "$(NO_XXTP)" = "y" ]; then \
335 sed
-i
"/TCONFIG_L2TP/d" $(1); \
336 echo
"# TCONFIG_L2TP is not set" >>$(1); \
337 sed
-i
"/TCONFIG_PPTP/d" $(1); \
338 echo
"# TCONFIG_PPTP is not set" >>$(1); \
340 if
[ "$(NO_LIBOPT)" = "y" ]; then \
341 sed
-i
"/TCONFIG_OPTIMIZE_SHARED_LIBS/d" $(1); \
342 echo
"# TCONFIG_OPTIMIZE_SHARED_LIBS is not set" >>$(1); \
344 if
[ "$(EBTABLES)" = "y" ]; then \
345 sed
-i
"/TCONFIG_EBTABLES/d" $(1); \
346 echo
"TCONFIG_EBTABLES=y" >>$(1); \
348 if
[ "$(IPV6SUPP)" = "y" ]; then \
349 sed
-i
"/TCONFIG_IPV6/d" $(1); \
350 echo
"TCONFIG_IPV6=y" >>$(1); \
352 if
[ "$(NOCAT)" = "y" ]; then \
353 sed
-i
"/TCONFIG_NOCAT/d" $(1); \
354 echo
"TCONFIG_NOCAT=y" >>$(1); \
356 if
[ "$(NGINX)" = "y" ]; then \
357 sed
-i
"/TCONFIG_NGINX/d" $(1); \
358 echo
"TCONFIG_NGINX=y" >>$(1); \
360 if
[ "$(OPENVPN)" = "y" ]; then \
361 sed
-i
"/TCONFIG_LZO/d" $(1); \
362 echo
"TCONFIG_LZO=y" >>$(1); \
363 sed
-i
"/TCONFIG_OPENVPN/d" $(1); \
364 echo
"TCONFIG_OPENVPN=y" >>$(1); \
365 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
366 sed
-i
"/TCONFIG_FTP_SSL/d" $(1); \
367 echo
"TCONFIG_FTP_SSL=y" >>$(1); \
370 if
[ "$(PPTPD)" = "y" ]; then \
371 sed
-i
"/TCONFIG_PPTPD/d" $(1); \
372 echo
"TCONFIG_PPTPD=y" >>$(1); \
374 if
[ "$(BTCLIENT)" = "y" ]; then \
375 sed
-i
"/TCONFIG_BT/d" $(1); \
376 echo
"TCONFIG_BT=y" >>$(1); \
377 sed
-i
"/TCONFIG_BBT/d" $(1); \
378 echo
"TCONFIG_BBT=y" >>$(1); \
380 if
[ "$(BTGUI)" = "y" ]; then \
381 sed
-i
"/TCONFIG_BT/d" $(1); \
382 echo
"TCONFIG_BT=y" >>$(1); \
384 if
[ "$(TR_EXTRAS)" = "y" ]; then \
385 sed
-i
"/TCONFIG_TR_EXTRAS/d" $(1); \
386 echo
"TCONFIG_TR_EXTRAS=y" >>$(1); \
388 if
[ "$(NFS)" = "y" ]; then \
389 sed
-i
"/TCONFIG_NFS/d" $(1); \
390 echo
"TCONFIG_NFS=y" >>$(1); \
392 if
[ "$(SNMP)" = "y" ]; then \
393 sed
-i
"/TCONFIG_SNMP/d" $(1); \
394 echo
"TCONFIG_SNMP=y" >>$(1); \
396 if
[ "$(SDHC)" = "y" ]; then \
397 sed
-i
"/TCONFIG_SDHC/d" $(1); \
398 echo
"TCONFIG_SDHC=y" >>$(1); \
400 if
[ "$(DNSSEC)" = "y" ]; then \
401 sed
-i
"/TCONFIG_DNSSEC/d" $(1); \
402 echo
"TCONFIG_DNSSEC=y" >>$(1); \
404 if
[ "$(HFS)" = "y" ]; then \
405 sed
-i
"/TCONFIG_HFS/d" $(1); \
406 echo
"TCONFIG_HFS=y" >>$(1); \
408 if
[ "$(UPS)" = "y" ]; then \
409 sed
-i
"/TCONFIG_UPS/d" $(1); \
410 echo
"TCONFIG_UPS=y" >>$(1); \
412 if
[ "$(NANO)" = "y" ]; then \
413 sed
-i
"/TCONFIG_NANO/d" $(1); \
414 echo
"TCONFIG_NANO=y" >>$(1); \
416 if
[ "$(DNSCRYPT)" = "y" ]; then \
417 sed
-i
"/TCONFIG_DNSCRYPT/d" $(1); \
418 echo
"TCONFIG_DNSCRYPT=y" >>$(1); \
420 if
[ "$(TOR)" = "y" ]; then \
421 sed
-i
"/TCONFIG_TOR/d" $(1); \
422 echo
"TCONFIG_TOR=y" >>$(1); \
424 if
[ "$(CTF)" = "y" ]; then \
425 sed
-i
"/TCONFIG_CTF/d" $(1); \
426 echo
"TCONFIG_CTF=y" >>$(1); \
428 if
[ "$(TINC)" = "y" ]; then \
429 sed
-i
"/TCONFIG_TINC/d" $(1); \
430 echo
"TCONFIG_TINC=y" >>$(1); \
435 define BusyboxOptions
437 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
438 sed
-i
"/CONFIG_FEATURE_2_4_MODULES/d" $(1); \
439 echo
"# CONFIG_FEATURE_2_4_MODULES is not set" >>$(1); \
440 sed
-i
"/CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT/d" $(1); \
441 echo
"CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y" >>$(1); \
442 sed
-i
"/CONFIG_FEATURE_DEVFS/d" $(1); \
443 echo
"# CONFIG_FEATURE_DEVFS is not set" >>$(1); \
444 sed
-i
"/CONFIG_MKNOD/d" $(1); \
445 echo
"CONFIG_MKNOD=y" >>$(1); \
446 sed
-i
"/CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE/d" $(1); \
447 echo
"CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=512" >>$(1); \
449 sed
-i
"/CONFIG_UDHCPC=y/d" $(1); \
450 sed
-i
"/CONFIG_UDHCPC_OLD/d" $(1); \
451 echo
"CONFIG_UDHCPC_OLD=y" >>$(1); \
452 echo
"# CONFIG_UDHCPC is not set" >>$(1); \
454 if
[ "$(NO_CIFS)" = "y" ]; then \
455 sed
-i
"/CONFIG_FEATURE_MOUNT_CIFS/d" $(1); \
456 echo
"# CONFIG_FEATURE_MOUNT_CIFS is not set" >>$(1); \
458 if
[ "$(BBEXTRAS)" = "y" ]; then \
459 sed
-i
"/CONFIG_SENDMAIL/d" $(1); \
460 echo
"CONFIG_SENDMAIL=y" >>$(1); \
461 sed
-i
"/CONFIG_WHOIS/d" $(1); \
462 echo
"CONFIG_WHOIS=y" >>$(1); \
463 sed
-i
"/CONFIG_FEATURE_SORT_BIG/d" $(1); \
464 echo
"CONFIG_FEATURE_SORT_BIG=y" >>$(1); \
465 sed
-i
"/CONFIG_CLEAR/d" $(1); \
466 echo
"CONFIG_CLEAR=y" >>$(1); \
467 sed
-i
"/CONFIG_NICE/d" $(1); \
468 echo
"CONFIG_NICE=y" >>$(1); \
469 sed
-i
"/CONFIG_SETCONSOLE/d" $(1); \
470 echo
"CONFIG_SETCONSOLE=y" >>$(1); \
471 sed
-i
"/CONFIG_SEQ/d" $(1); \
472 echo
"CONFIG_SEQ=y" >>$(1); \
473 sed
-i
"/CONFIG_STTY/d" $(1); \
474 echo
"CONFIG_STTY=y" >>$(1); \
476 if
[ "$(USB)" = "USB" ]; then \
477 if
[ "$(USBEXTRAS)" = "y" ]; then \
478 sed
-i
"/CONFIG_E2FSCK/d" $(1); \
479 echo
"CONFIG_E2FSCK=y" >>$(1); \
480 sed
-i
"/CONFIG_MKE2FS/d" $(1); \
481 echo
"CONFIG_MKE2FS=y" >>$(1); \
482 sed
-i
"/CONFIG_FDISK/d" $(1); \
483 echo
"CONFIG_FDISK=y" >>$(1); \
484 sed
-i
"/CONFIG_FEATURE_FDISK_WRITABLE/d" $(1); \
485 echo
"CONFIG_FEATURE_FDISK_WRITABLE=y" >>$(1); \
486 sed
-i
"/CONFIG_MKFS_VFAT/d" $(1); \
487 echo
"CONFIG_MKFS_VFAT=y" >>$(1); \
488 sed
-i
"/CONFIG_MKSWAP/d" $(1); \
489 echo
"CONFIG_MKSWAP=y" >>$(1); \
490 sed
-i
"/CONFIG_FLOCK/d" $(1); \
491 echo
"CONFIG_FLOCK=y" >>$(1); \
492 sed
-i
"/CONFIG_FSYNC/d" $(1); \
493 echo
"CONFIG_FSYNC=y" >>$(1); \
494 sed
-i
"/CONFIG_TUNE2FS/d" $(1); \
495 echo
"CONFIG_TUNE2FS=y" >>$(1); \
496 sed
-i
"/CONFIG_E2LABEL/d" $(1); \
497 echo
"CONFIG_E2LABEL=y" >>$(1); \
498 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
499 sed
-i
"/CONFIG_LSUSB/d" $(1); \
500 echo
"CONFIG_LSUSB=y" >>$(1); \
501 sed
-i
"/CONFIG_FEATURE_WGET_STATUSBAR/d" $(1); \
502 echo
"CONFIG_FEATURE_WGET_STATUSBAR=y" >>$(1); \
503 sed
-i
"/CONFIG_FEATURE_VERBOSE_USAGE/d" $(1); \
504 echo
"CONFIG_FEATURE_VERBOSE_USAGE=y" >>$(1); \
508 sed
-i
"/CONFIG_FEATURE_MOUNT_LOOP/d" $(1); \
509 echo
"# CONFIG_FEATURE_MOUNT_LOOP is not set" >>$(1); \
510 sed
-i
"/CONFIG_FEATURE_DEVFS/d" $(1); \
511 echo
"# CONFIG_FEATURE_DEVFS is not set" >>$(1); \
512 sed
-i
"/CONFIG_FEATURE_MOUNT_LABEL/d" $(1); \
513 echo
"# CONFIG_FEATURE_MOUNT_LABEL is not set" >>$(1); \
514 sed
-i
"/CONFIG_FEATURE_MOUNT_FSTAB/d" $(1); \
515 echo
"# CONFIG_FEATURE_MOUNT_FSTAB is not set" >>$(1); \
516 sed
-i
"/CONFIG_VOLUMEID/d" $(1); \
517 echo
"# CONFIG_VOLUMEID is not set" >>$(1); \
518 sed
-i
"/CONFIG_BLKID/d" $(1); \
519 echo
"# CONFIG_BLKID is not set" >>$(1); \
520 sed
-i
"/CONFIG_SWAPONOFF/d" $(1); \
521 echo
"# CONFIG_SWAPONOFF is not set" >>$(1); \
522 sed
-i
"/CONFIG_CHROOT/d" $(1); \
523 echo
"# CONFIG_CHROOT is not set" >>$(1); \
524 sed
-i
"/CONFIG_PIVOT_ROOT/d" $(1); \
525 echo
"# CONFIG_PIVOT_ROOT is not set" >>$(1); \
526 sed
-i
"/CONFIG_TRUE/d" $(1); \
527 echo
"# CONFIG_TRUE is not set" >>$(1); \
529 if
[ "$(IPV6SUPP)" = "y" ]; then \
530 sed
-i
"/CONFIG_FEATURE_IPV6/d" $(1); \
531 echo
"CONFIG_FEATURE_IPV6=y" >>$(1); \
532 sed
-i
"/CONFIG_PING6/d" $(1); \
533 echo
"CONFIG_PING6=y" >>$(1); \
534 sed
-i
"/CONFIG_TRACEROUTE6/d" $(1); \
535 echo
"CONFIG_TRACEROUTE6=y" >>$(1); \
536 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
537 sed
-i
"/CONFIG_FEATURE_UDHCP_RFC5969/d" $(1); \
538 echo
"CONFIG_FEATURE_UDHCP_RFC5969=y" >>$(1); \
541 if
[ "$(SLIM)" = "y" ]; then \
542 sed
-i
"/CONFIG_AWK/d" $(1); \
543 echo
"# CONFIG_AWK is not set" >>$(1); \
544 sed
-i
"/CONFIG_BASENAME/d" $(1); \
545 echo
"# CONFIG_BASENAME is not set" >>$(1); \
546 sed
-i
"/CONFIG_FEATURE_DEVFS/d" $(1); \
547 echo
"# CONFIG_FEATURE_DEVFS is not set" >>$(1); \
548 sed
-i
"/CONFIG_BLKID/d" $(1); \
549 echo
"# CONFIG_BLKID is not set" >>$(1); \
550 sed
-i
"/CONFIG_TELNET=y/d" $(1); \
551 echo
"# CONFIG_TELNET is not set" >>$(1); \
552 sed
-i
"/CONFIG_ARPING/d" $(1); \
553 echo
"# CONFIG_ARPING is not set" >>$(1); \
554 sed
-i
"/CONFIG_FEATURE_LS_COLOR/d" $(1); \
555 echo
"# CONFIG_FEATURE_LS_COLOR is not set" >>$(1); \
556 sed
-i
"/CONFIG_CHOWN/d" $(1); \
557 echo
"# CONFIG_CHOWN is not set" >>$(1); \
559 sed
-i
"/CONFIG_FEATURE_LS_COLOR/d" $(1); \
560 echo
"CONFIG_FEATURE_LS_COLOR=y" >>$(1); \
561 sed
-i
"/CONFIG_FEATURE_LS_COLOR_IS_DEFAULT/d" $(1); \
562 echo
"CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y" >>$(1); \
569 sed
-i
"/CONFIG_NVRAM_SIZE/d" $(1); \
570 echo
"CONFIG_NVRAM_SIZE="$(NVRAM_SIZE
) >>$(1); \
571 sed
-i
"/CONFIG_CC_OPTIMIZE_FOR_SIZE/d" $(1); \
572 if
[ "$(KERN_SIZE_OPT)" = "y" ]; then \
573 echo
"CONFIG_CC_OPTIMIZE_FOR_SIZE=y" >>$(1); \
575 echo
"# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set" >>$(1); \
577 if
[ "$(CONFIG_LINUX26)" = "y" ] && [ "$(MIPS32)" = "r2" ]; then \
578 sed
-i
"/CONFIG_CPU_MIPS32_R1/d" $(1); \
579 echo
"# CONFIG_CPU_MIPS32_R1 is not set" >>$(1); \
580 sed
-i
"/CONFIG_CPU_MIPS32_R2/d" $(1); \
581 echo
"CONFIG_CPU_MIPS32_R2=y" >>$(1); \
582 sed
-i
"/CONFIG_CPU_MIPSR1/d" $(1); \
583 echo
"CONFIG_CPU_MIPSR2=y" >>$(1); \
585 if
[ "$(UPS)" = "y" ]; then \
586 sed
-i
"/CONFIG_INPUT=m/d" $(1); \
587 echo
"CONFIG_INPUT=y" >>$(1); \
588 sed
-i
"/CONFIG_USB=m/d" $(1); \
589 echo
"CONFIG_USB=y" >>$(1); \
590 sed
-i
"/CONFIG_HID=m/d" $(1); \
591 echo
"CONFIG_HID=y" >>$(1); \
592 sed
-i
"/CONFIG_USB_HID=m/d" $(1); \
593 echo
"CONFIG_USB_HID=y" >>$(1); \
594 sed
-i
"/CONFIG_USB_HIDDEV=m/d" $(1); \
595 echo
"CONFIG_USB_HIDDEV=y" >>$(1); \
596 sed
-i
"/CONFIG_USB_DEVICEFS=m/d" $(1); \
597 echo
"CONFIG_USB_DEVICEFS=y" >>$(1); \
599 if
[ "$(USB)" = "" ]; then \
600 sed
-i
"/CONFIG_EFI_PARTITION/d" $(1); \
601 echo
"# CONFIG_EFI_PARTITION is not set" >>$(1); \
603 if
[ "$(IPV6SUPP)" = "y" ]; then \
604 sed
-i
"/CONFIG_IPV6 is not set/d" $(1); \
605 echo
"CONFIG_IPV6=y" >>$(1); \
606 sed
-i
"/CONFIG_IP6_NF_IPTABLES/d" $(1); \
607 echo
"CONFIG_IP6_NF_IPTABLES=y" >>$(1); \
608 sed
-i
"/CONFIG_IP6_NF_MATCH_RT/d" $(1); \
609 echo
"CONFIG_IP6_NF_MATCH_RT=y" >>$(1); \
610 sed
-i
"/CONFIG_IP6_NF_FILTER/d" $(1); \
611 echo
"CONFIG_IP6_NF_FILTER=m" >>$(1); \
612 sed
-i
"/CONFIG_IP6_NF_TARGET_LOG/d" $(1); \
613 echo
"CONFIG_IP6_NF_TARGET_LOG=m" >>$(1); \
614 sed
-i
"/CONFIG_IP6_NF_TARGET_REJECT/d" $(1); \
615 echo
"CONFIG_IP6_NF_TARGET_REJECT=m" >>$(1); \
616 sed
-i
"/CONFIG_IP6_NF_MANGLE/d" $(1); \
617 echo
"CONFIG_IP6_NF_MANGLE=m" >>$(1); \
618 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
619 sed
-i
"/CONFIG_NF_CONNTRACK_IPV6/d" $(1); \
620 echo
"CONFIG_NF_CONNTRACK_IPV6=m" >>$(1); \
621 sed
-i
"/CONFIG_NETFILTER_XT_MATCH_HL/d" $(1); \
622 echo
"CONFIG_NETFILTER_XT_MATCH_HL=m" >>$(1); \
623 sed
-i
"/CONFIG_IPV6_ROUTER_PREF/d" $(1); \
624 echo
"CONFIG_IPV6_ROUTER_PREF=y" >>$(1); \
625 sed
-i
"/CONFIG_IPV6_SIT/d" $(1); \
626 echo
"CONFIG_IPV6_SIT=m" >>$(1); \
627 sed
-i
"/CONFIG_IPV6_SIT_6RD/d" $(1); \
628 echo
"CONFIG_IPV6_SIT_6RD=y" >>$(1); \
629 sed
-i
"/CONFIG_IPV6_MULTIPLE_TABLES/d" $(1); \
630 echo
"CONFIG_IPV6_MULTIPLE_TABLES=y" >>$(1); \
631 sed
-i
"/CONFIG_IP6_NF_RAW/d" $(1); \
632 echo
"CONFIG_IP6_NF_RAW=m" >>$(1); \
633 sed
-i
"/CONFIG_IPV6_OPTIMISTIC_DAD/d" $(1); \
634 echo
"CONFIG_IPV6_OPTIMISTIC_DAD=y" >>$(1); \
635 sed
-i
"/CONFIG_IPV6_MROUTE/d" $(1); \
636 echo
"CONFIG_IPV6_MROUTE=y" >>$(1); \
637 sed
-i
"/CONFIG_IP6_NF_TARGET_ROUTE/d" $(1); \
638 echo
"CONFIG_IP6_NF_TARGET_ROUTE=m" >>$(1); \
639 sed
-i
"/CONFIG_INET6_XFRM_TUNNEL/d" $(1); \
640 echo
"CONFIG_INET6_XFRM_TUNNEL=m" >>$(1); \
641 sed
-i
"/CONFIG_INET6_AH/d" $(1); \
642 echo
"CONFIG_INET6_AH=m" >>$(1); \
643 sed
-i
"/CONFIG_INET6_ESP/d" $(1); \
644 echo
"CONFIG_INET6_ESP=m" >>$(1); \
645 sed
-i
"/CONFIG_INET6_IPCOMP/d" $(1); \
646 echo
"CONFIG_INET6_IPCOMP=m" >>$(1); \
647 sed
-i
"/CONFIG_INET6_XFRM_MODE_TRANSPORT/d" $(1); \
648 echo
"CONFIG_INET6_XFRM_MODE_TRANSPORT=m" >>$(1); \
649 sed
-i
"/CONFIG_INET6_XFRM_MODE_TUNNEL/d" $(1); \
650 echo
"CONFIG_INET6_XFRM_MODE_TUNNEL=m" >>$(1); \
651 sed
-i
"/CONFIG_INET6_XFRM_MODE_BEET/d" $(1); \
652 echo
"CONFIG_INET6_XFRM_MODE_BEET=m" >>$(1); \
654 sed
-i
"/CONFIG_IP6_NF_CONNTRACK/d" $(1); \
655 echo
"CONFIG_IP6_NF_CONNTRACK=m" >>$(1); \
656 sed
-i
"/CONFIG_IP6_NF_MATCH_HL/d" $(1); \
657 echo
"CONFIG_IP6_NF_MATCH_HL=m" >>$(1); \
658 sed
-i
"/CONFIG_IP6_NF_FTP/d" $(1); \
659 echo
"CONFIG_IP6_NF_FTP=m" >>$(1); \
660 sed
-i
"/CONFIG_IP6_NF_MATCH_LIMIT/d" $(1); \
661 echo
"CONFIG_IP6_NF_MATCH_LIMIT=m" >>$(1); \
662 sed
-i
"/CONFIG_IP6_NF_MATCH_CONDITION/d" $(1); \
663 echo
"CONFIG_IP6_NF_MATCH_CONDITION=m" >>$(1); \
664 sed
-i
"/CONFIG_IP6_NF_MATCH_MAC/d" $(1); \
665 echo
"CONFIG_IP6_NF_MATCH_MAC=m" >>$(1); \
666 sed
-i
"/CONFIG_IP6_NF_MATCH_MULTIPORT/d" $(1); \
667 echo
"CONFIG_IP6_NF_MATCH_MULTIPORT=m" >>$(1); \
668 sed
-i
"/CONFIG_IP6_NF_MATCH_MARK/d" $(1); \
669 echo
"CONFIG_IP6_NF_MATCH_MARK=m" >>$(1); \
670 sed
-i
"/CONFIG_IP6_NF_MATCH_LENGTH/d" $(1); \
671 echo
"CONFIG_IP6_NF_MATCH_LENGTH=m" >>$(1); \
672 sed
-i
"/CONFIG_IP6_NF_MATCH_STATE/d" $(1); \
673 echo
"CONFIG_IP6_NF_MATCH_STATE=m" >>$(1); \
674 sed
-i
"/CONFIG_IP6_NF_TARGET_MARK/d" $(1); \
675 echo
"CONFIG_IP6_NF_TARGET_MARK=m" >>$(1); \
676 sed
-i
"/CONFIG_IP6_NF_TARGET_TCPMSS/d" $(1); \
677 echo
"CONFIG_IP6_NF_TARGET_TCPMSS=m" >>$(1); \
678 sed
-i
"/CONFIG_IP6_NF_TARGET_ROUTE/d" $(1); \
679 echo
"CONFIG_IP6_NF_TARGET_ROUTE=m" >>$(1); \
682 sed
-i
"/CONFIG_BCM57XX/d" $(1); \
683 if
[ "$(BCM57)" = "y" ]; then \
684 echo
"CONFIG_BCM57XX=m" >>$(1); \
686 echo
"# CONFIG_BCM57XX is not set" >>$(1); \
688 if
[ "$(CONFIG_LINUX26)" = "y" ] && [ "$(EBTABLES)" = "y" ]; then \
689 sed
-i
"/CONFIG_BRIDGE_NF_EBTABLES/d" $(1); \
690 echo
"CONFIG_BRIDGE_NF_EBTABLES=m" >>$(1); \
691 if
[ "$(IPV6SUPP)" = "y" ]; then \
692 sed
-i
"/CONFIG_BRIDGE_EBT_IP6/d" $(1); \
693 echo
"CONFIG_BRIDGE_EBT_IP6=m" >>$(1); \
702 @echo
$@
" is not a valid target!"
705 @cp router
/config_base router
/config_
$(lowercase_B
)
706 @cp router
/busybox
/config_base router
/busybox
/config_
$(lowercase_B
)
707 @cp
$(LINUXDIR
)/config_base
$(LINUXDIR
)/config_
$(lowercase_B
)
709 $(call RouterOptions
, router
/config_
$(lowercase_B
))
710 $(call KernelConfig
, $(LINUXDIR
)/config_
$(lowercase_B
))
711 $(call BusyboxOptions
, router
/busybox
/config_
$(lowercase_B
))
713 @
$(MAKE
) setprofile N
=$(TPROFILE
) B
=$(B
) DESC
="$(BUILD_DESC)" USB
="$(USB)"
716 # Make the "normal" build
718 @
$(MAKE
) bin B
=A BUILD_DESC
="Std" USB
="USB" SNMP
=y
720 ## Make the "normal but without SSH" build
722 @
$(MAKE
) bin NO_SSH
=y B
=B BUILD_DESC
="No SSH" USB
="USB" SNMP
=y
724 ## Make the "normal but without CIFS" build
726 @
$(MAKE
) bin NO_CIFS
=y B
=C BUILD_DESC
="No CIFS" USB
="USB" SNMP
=y
728 ## Make the "normal but without SAMBA" (Lite) build
730 ifeq ($(CONFIG_LINUX26
),y
)
731 @
$(MAKE
) bin NO_SAMBA
=y SLIM
=y NO_CIFS
=y NO_JFFS
=y NO_ZEBRA
=y B
=D BUILD_DESC
="Lite" USB
="USB" SNMP
="$(SNMP)"
733 @
$(MAKE
) bin NO_SAMBA
=y SLIM
=y B
=D BUILD_DESC
="Lite" USB
="USB"SNMP
="$(SNMP)"
736 ## Make the "normal (with NTFS support) + VPN" build
738 ifeq ($(CONFIG_LINUX26
),y
)
739 @
$(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" SNMP
=y TCPDUMP
="$(TCPDUMP)"
741 # @$(MAKE) bin OPENVPN=y USERPPTP=y PPTPD=y NTFS=y B=E BUILD_DESC="VPN)" USB="USB"
742 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y PPTPD
=y BBEXTRAS
=y USBEXTRAS
=y NTFS
=y B
=E BUILD_DESC
="VPN" USB
="USB" SNMP
=y TCPDUMP
="$(TCPDUMP)"
745 ## Make the "Mini: no USB, no CIFS, no Zebra" build - targeted for Netgear routers
747 @
$(MAKE
) bin JFFSv1
=y NO_CIFS
=y NO_SSH
=y NO_ZEBRA
=y SLIM
=y B
=F BUILD_DESC
="Mini" USB
=""
749 ## Make the "Tiny: no JFFS, no USB, no CIFS, no Zebra" build - targeted for cheapskate routers
751 @
$(MAKE
) bin NO_CIFS
=y NO_SSH
=y NO_JFFS
=y NO_ZEBRA
=y SLIM
=y B
=FS BUILD_DESC
="Tiny" USB
=""
753 ## Make the "No USB with IPv6, no Zebra" build - for 4MB routers
755 @
$(MAKE
) bin JFFSv1
=y NO_CIFS
=y NO_SSH
=y NO_ZEBRA
=y IPV6SUPP
=y B
=I BUILD_DESC
="MiniIPv6" USB
=""
757 ## Make the "No USB with IPv6, no Zebra, with VPN" build - for 4MB routers
758 ifeq ($(CONFIG_LINUX26
),y
)
760 @
$(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
="" SNMP
="$(SNMP)"
763 ## Make the "normal with Extras and NTFS" build
765 ifeq ($(CONFIG_LINUX26
),y
)
766 @
$(MAKE
) bin NTFS
=y BBEXTRAS
=y USBEXTRAS
=y EBTABLES
=y NO_LIBOPT
=y MEDIASRV
=y IPV6SUPP
=y B
=M BUILD_DESC
="Ext" USB
="USB" SNMP
=y USERPPTP
=y PPTPD
=y TCPDUMP
="$(TCPDUMP)"
768 @
$(MAKE
) bin NTFS
=y BBEXTRAS
=y USBEXTRAS
=y B
=M BUILD_DESC
="Ext" USB
="USB" SNMP
=y USERPPTP
=y PPTPD
=y TCPDUMP
="$(TCPDUMP)"
772 ## Make the "normal (with NTFS support) + VPN + NOCAT" build
774 ifeq ($(CONFIG_LINUX26
),y
)
775 @
$(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-NC" USB
="USB" SNMP
=y NOCAT
=y TCPDUMP
="$(TCPDUMP)"
777 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y PPTPD
=y NTFS
=y B
=NC BUILD_DESC
="VPN-NC" USB
="USB" NOCAT
=y TCPDUMP
="$(TCPDUMP)"
781 ## Make the "Mini: no USB, + NOCAT" build - for 4MB routers
783 @
$(MAKE
) bin JFFSv1
=y NOCAT
=y B
=NCM BUILD_DESC
="Mini-NOCAT" USB
=""
786 ## Make the "normal" build + NOCAT
788 @
$(MAKE
) bin NOCAT
=y B
=NCS BUILD_DESC
="Std-NOCAT" USB
="USB" SNMP
=y TCPDUMP
="$(TCPDUMP)"
791 ## Make the "No USB" build
793 ifeq ($(CONFIG_LINUX26
),y
)
794 @
$(MAKE
) bin JFFSv1
=y
$(if
$(filter r2
, $(MIPS32
)),,BCM57
=y
) B
=S BUILD_DESC
="Std" USB
="" TCPDUMP
="$(TCPDUMP)"
796 @
$(MAKE
) bin BBEXTRAS
=y BCM57
=y B
=S BUILD_DESC
="Std" USB
="" TCPDUMP
="$(TCPDUMP)"
800 ## Make the "No USB with Extras" build (K26 only, for 8MB flash)
801 ifeq ($(CONFIG_LINUX26
),y
)
803 @
$(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
804 ## Make the "No USB with OpenVPN and Extras" build (K26 only, for 8MB flash)
806 @
$(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-Ext" SNMP
=y
809 ## Make the "VPN with no USB support" build
811 ifeq ($(CONFIG_LINUX26
),y
)
812 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y PPTPD
=y NO_JFFS
=y BCM57
=y B
=V BUILD_DESC
="VPN" USB
="" TCPDUMP
="$(TCPDUMP)" TCPDUMP
="$(TCPDUMP)"
814 @
$(MAKE
) bin OPENVPN
=y PPTPD
=y BBEXTRAS
=y B
=V BUILD_DESC
="VPN" USB
="" SNMP
=y TCPDUMP
="$(TCPDUMP)" TCPDUMP
="$(TCPDUMP)"
817 ## Make the "Small VPN with no USB support" build
819 ifeq ($(CONFIG_LINUX26
),y
)
820 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y PPTPD
=y NO_JFFS
=y NO_CIFS
=y B
=VS BUILD_DESC
="SmallVPN" USB
=""
822 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y PPTPD
=y NO_JFFS
=y NO_CIFS
=y BCM57
=y B
=VS BUILD_DESC
="SmallVPN" USB
=""
825 ## Make Mips32r2 builds
843 @
$(MAKE
) f MIPS32
=r2 BELKIN
=y
846 @
$(MAKE
) fs MIPS32
=r2
861 @
$(MAKE
) nc MIPS32
=r2
876 @
$(MAKE
) vs MIPS32
=r2
879 @
$(MAKE
) r2a NVRAM_SIZE
=60 LINKSYS_E
=1
882 @
$(MAKE
) r2b NVRAM_SIZE
=60 LINKSYS_E
=1
885 @
$(MAKE
) r2c NVRAM_SIZE
=60 LINKSYS_E
=1
888 @
$(MAKE
) r2e NVRAM_SIZE
=60 LINKSYS_E
=1
891 @
$(MAKE
) r2m NVRAM_SIZE
=60 LINKSYS_E
=1
894 @
$(MAKE
) r2n NVRAM_SIZE
=60 LINKSYS_E
=1
897 @
$(MAKE
) r2nc NVRAM_SIZE
=60 LINKSYS_E
=1
900 @
$(MAKE
) r2o NVRAM_SIZE
=60 LINKSYS_E
=1
903 @
$(MAKE
) r2r NVRAM_SIZE
=60 LINKSYS_E
=1
906 @
$(MAKE
) bin MIPS32
=r2 B
=S USB
="" NVRAM_SIZE
=60 LINKSYS_E
=1 BBEXTRAS
=y EBTABLES
=y NO_LIBOPT
=y IPV6SUPP
=y BUILD_DESC
="Std"
909 @
$(MAKE
) r2t NVRAM_SIZE
=60 LINKSYS_E
=1
912 @
$(MAKE
) bin MIPS32
=r2 B
=V USB
="" NVRAM_SIZE
=60 LINKSYS_E
=1 BBEXTRAS
=y EBTABLES
=y NO_LIBOPT
=y IPV6SUPP
=y OPENVPN
=y USERPPTP
=y BUILD_DESC
="VPN"
917 echo
'#ifndef TOMATO_PROFILE' > router
/shared
/tomato_profile.h
918 echo
'#define TOMATO_$(N) 1' >> router
/shared
/tomato_profile.h
919 echo
'#define PROFILE_G 1' >> router
/shared
/tomato_profile.h
920 echo
'#define PROFILE_N 2' >> router
/shared
/tomato_profile.h
921 echo
'#define TOMATO_PROFILE PROFILE_$(N)' >> router
/shared
/tomato_profile.h
922 echo
'#define TOMATO_PROFILE_NAME "$(N)"' >> router
/shared
/tomato_profile.h
923 echo
'#define TOMATO_BUILD_NAME "$(B)"' >> router
/shared
/tomato_profile.h
924 echo
'#define TOMATO_BUILD_DESC "$(DESC)"' >> router
/shared
/tomato_profile.h
925 echo
'#ifndef CONFIG_NVRAM_SIZE' >> router
/shared
/tomato_profile.h
926 echo
'#define CONFIG_NVRAM_SIZE $(NVRAM_SIZE)' >> router
/shared
/tomato_profile.h
927 echo
'#endif' >> router
/shared
/tomato_profile.h
928 echo
'#endif' >> router
/shared
/tomato_profile.h
930 echo
'TOMATO_$(N) = 1' > tomato_profile.mak
931 echo
'PROFILE_G = 1' >> tomato_profile.mak
932 echo
'PROFILE_N = 2' >> tomato_profile.mak
933 echo
'TOMATO_PROFILE = $$(PROFILE_$(N))' >> tomato_profile.mak
934 echo
'TOMATO_PROFILE_NAME = "$(N)"' >> tomato_profile.mak
935 echo
'TOMATO_BUILD = "$(B)"' >> tomato_profile.mak
936 echo
'TOMATO_BUILD_NAME = "$(B)"' >> tomato_profile.mak
937 echo
'TOMATO_BUILD_DESC = "$(DESC)"' >> tomato_profile.mak
938 echo
'TOMATO_PROFILE_L = $(lowercase_N)' >> tomato_profile.mak
939 echo
'TOMATO_PROFILE_U = $(uppercase_N)' >> tomato_profile.mak
940 echo
'TOMATO_BUILD_USB = "$(USB)"' >> tomato_profile.mak
942 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
944 # Note that changes to variables in tomato_profile.mak don't
945 # get propogated to this invocation of make!
947 @echo
"Using $(N) profile, $(B) build config."
951 rm -f config_current
; \
952 ln
-s config_
$(lowercase_B
) config_current
; \
953 cp
-f config_current .config
955 @cd router
/busybox
&& \
956 rm -f config_current
; \
957 ln
-s config_
$(lowercase_B
) config_current
; \
958 cp config_current .config
961 rm -f config_current
; \
962 ln
-s config_
$(lowercase_B
) config_current
; \
963 cp config_current .config
965 @
$(MAKE
) -C router oldconfig
968 @echo
"a A build (standard)"
969 @echo
"b B build (standard minus SSH)"
970 @echo
"c C build (standard minus CIFS)"
971 @echo
"d D build (standard minus Samba server)"
972 @echo
"m M build (standard plus extra utilities and NTFS support)"
973 @echo
"nc NC build (standard plus VPN, extra utilities, NTFS support and NOCAT)"
974 @echo
"ncm NCS build (no USB support, NOCAT)"
975 @echo
"ncs NCS build (std + NOCAT)"
976 @echo
"m Ext - (standard plus extra utilities and NTFS support)"
978 ifeq ($(CONFIG_LINUX26
),y
)
979 @echo
"e E build (standard plus VPN, extra utilities and NTFS support)"
980 @echo
"i I build (IPv6 with no USB support minus CIFS and RIPv1/2)"
982 @echo
"e E build (standard plus VPN and NTFS support)"
984 @echo
"s S build (no USB support)"
985 @echo
"f F build (no USB support minus CIFS and RIPv1/2)"
986 @echo
"fs FS build (no USB support minus CIFS, JFFS, Zebra and RIPv1/2)"
987 @echo
"v V build (VPN with no USB support)"
988 @echo
"vs VS build (Small VPN with no USB support)"
990 ifeq ($(CONFIG_LINUX26
),y
)
991 @echo
"r2a MIPS Release 2 A build (standard)"
992 @echo
"r2b MIPS Release 2 B build (standard minus SSH)"
993 @echo
"r2c MIPS Release 2 C build (standard minus CIFS)"
994 @echo
"r2d MIPS Release 2 D build (standard minus Samba server)"
995 @echo
"r2e MIPS Release 2 E build (standard plus VPN and extras)"
996 @echo
"r2f MIPS Release 2 F build (no USB minus CIFS, RIPv1/2)"
997 @echo
"r2fs MIPS Release 2 FS build (no USB minus JFFS, CIFS, RIPv1/2, Zebra) + F5D8235v3, F7D301/2, F7D4302"
998 @echo
"r2i MIPS Release 2 I build (IPv6 no USB minus CIFS and RIPv1/2)"
999 @echo
"r2m MIPS Release 2 M build (standard plus extras)"
1000 @echo
"r2nc MIPS Release 2 NC build (standard plus VPN, extras and NOCAT)"
1001 @echo
"r2ncm MIPS Release 2 NCM build (no USB, plus NOCAT)"
1002 @echo
"r2ncs MIPS Release 2 NCS build (standard plus NOCAT)"
1003 @echo
"r2s MIPS Release 2 S build (no USB)"
1004 @echo
"r2t MIPS Release 2 T build (no USB, with extras)"
1005 @echo
"r2u MIPS Release 2 U build (no USB, plus VPN with extras)"
1006 @echo
"r2v MIPS Release 2 V build (VPN with no USB)"
1007 @echo
"r2vs MIPS Release 2 VS build (Small VPN with no USB)"
1008 @echo
"n60m Linksys E-series build (60KB NVRAM, standard plus extras)"
1009 @echo
"n60e Linksys E-series build (60KB NVRAM, standard plus VPN and extras)"
1010 @echo
"n60nc Linksys E-series build (60KB NVRAM, standard plus extras, plus VPN, plus NOCAT)"
1011 @echo
"n60s Linksys E-series build (60KB NVRAM, no USB)"
1012 @echo
"n60v Linksys E-series build (60KB NVRAM, VPN with no USB)"
1014 @echo
"..etc.. other build configs"
1015 @echo
"clean -C router clean"
1016 @echo
"cleanimage rm -rf image"
1017 @echo
"cleantools clean btools, mksquashfs"
1018 @echo
"cleankernel -C Linux distclean (but preserves .config)"
1019 @echo
"distclean distclean of Linux & busybox (but preserve .configs)"
1020 @echo
"prepk -C Linux oldconfig dep"
1022 .PHONY
: all clean distclean cleanimage cleantools cleankernel prepk what setprofile help
1023 .PHONY
: a b c d m nc Makefile allversions tomato_profile.mak