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 # Make the "normal" build
713 @
$(MAKE
) bin B
=A BUILD_DESC
="Std" USB
="USB" SNMP
=y
715 ## Make the "normal but without SSH" build
717 @
$(MAKE
) bin NO_SSH
=y B
=B BUILD_DESC
="No SSH" USB
="USB" SNMP
=y
719 ## Make the "normal but without CIFS" build
721 @
$(MAKE
) bin NO_CIFS
=y B
=C BUILD_DESC
="No CIFS" USB
="USB" SNMP
=y
723 ## Make the "normal but without SAMBA" (Lite) build
725 ifeq ($(CONFIG_LINUX26
),y
)
726 @
$(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)"
728 @
$(MAKE
) bin NO_SAMBA
=y SLIM
=y B
=D BUILD_DESC
="Lite" USB
="USB"SNMP
="$(SNMP)"
731 ## Make the "normal (with NTFS support) + VPN" build
733 ifeq ($(CONFIG_LINUX26
),y
)
734 @
$(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)"
736 # @$(MAKE) bin OPENVPN=y USERPPTP=y PPTPD=y NTFS=y B=E BUILD_DESC="VPN)" USB="USB"
737 @
$(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)"
740 ## Make the "Mini: no USB, no CIFS, no Zebra" build - targeted for Netgear routers
742 @
$(MAKE
) bin JFFSv1
=y NO_CIFS
=y NO_SSH
=y NO_ZEBRA
=y SLIM
=y B
=F BUILD_DESC
="Mini" USB
=""
744 ## Make the "Tiny: no JFFS, no USB, no CIFS, no Zebra" build - targeted for cheapskate routers
746 @
$(MAKE
) bin NO_CIFS
=y NO_SSH
=y NO_JFFS
=y NO_ZEBRA
=y SLIM
=y B
=FS BUILD_DESC
="Tiny" USB
=""
748 ## Make the "No USB with IPv6, no Zebra" build - for 4MB routers
750 @
$(MAKE
) bin JFFSv1
=y NO_CIFS
=y NO_SSH
=y NO_ZEBRA
=y IPV6SUPP
=y B
=I BUILD_DESC
="MiniIPv6" USB
=""
752 ## Make the "No USB with IPv6, no Zebra, with VPN" build - for 4MB routers
753 ifeq ($(CONFIG_LINUX26
),y
)
755 @
$(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)"
758 ## Make the "normal with Extras and NTFS" build
760 ifeq ($(CONFIG_LINUX26
),y
)
761 @
$(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)"
763 @
$(MAKE
) bin NTFS
=y BBEXTRAS
=y USBEXTRAS
=y B
=M BUILD_DESC
="Ext" USB
="USB" SNMP
=y USERPPTP
=y PPTPD
=y TCPDUMP
="$(TCPDUMP)"
767 ## Make the "normal (with NTFS support) + VPN + NOCAT" build
769 ifeq ($(CONFIG_LINUX26
),y
)
770 @
$(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)"
772 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y PPTPD
=y NTFS
=y B
=NC BUILD_DESC
="VPN-NC" USB
="USB" NOCAT
=y TCPDUMP
="$(TCPDUMP)"
776 ## Make the "Mini: no USB, + NOCAT" build - for 4MB routers
778 @
$(MAKE
) bin JFFSv1
=y NOCAT
=y B
=NCM BUILD_DESC
="Mini-NOCAT" USB
=""
781 ## Make the "normal" build + NOCAT
783 @
$(MAKE
) bin NOCAT
=y B
=NCS BUILD_DESC
="Std-NOCAT" USB
="USB" SNMP
=y TCPDUMP
="$(TCPDUMP)"
786 ## Make the "No USB" build
788 ifeq ($(CONFIG_LINUX26
),y
)
789 @
$(MAKE
) bin JFFSv1
=y
$(if
$(filter r2
, $(MIPS32
)),,BCM57
=y
) B
=S BUILD_DESC
="Std" USB
="" TCPDUMP
="$(TCPDUMP)"
791 @
$(MAKE
) bin BBEXTRAS
=y BCM57
=y B
=S BUILD_DESC
="Std" USB
="" TCPDUMP
="$(TCPDUMP)"
795 ## Make the "No USB with Extras" build (K26 only, for 8MB flash)
796 ifeq ($(CONFIG_LINUX26
),y
)
798 @
$(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
799 ## Make the "No USB with OpenVPN and Extras" build (K26 only, for 8MB flash)
801 @
$(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
804 ## Make the "VPN with no USB support" build
806 ifeq ($(CONFIG_LINUX26
),y
)
807 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y PPTPD
=y NO_JFFS
=y BCM57
=y B
=V BUILD_DESC
="VPN" USB
="" TCPDUMP
="$(TCPDUMP)" TCPDUMP
="$(TCPDUMP)"
809 @
$(MAKE
) bin OPENVPN
=y PPTPD
=y BBEXTRAS
=y B
=V BUILD_DESC
="VPN" USB
="" SNMP
=y TCPDUMP
="$(TCPDUMP)" TCPDUMP
="$(TCPDUMP)"
812 ## Make the "Small VPN with no USB support" build
814 ifeq ($(CONFIG_LINUX26
),y
)
815 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y PPTPD
=y NO_JFFS
=y NO_CIFS
=y B
=VS BUILD_DESC
="SmallVPN" USB
=""
817 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y PPTPD
=y NO_JFFS
=y NO_CIFS
=y BCM57
=y B
=VS BUILD_DESC
="SmallVPN" USB
=""
820 ## Make Mips32r2 builds
838 @
$(MAKE
) f MIPS32
=r2 BELKIN
=y
841 @
$(MAKE
) fs MIPS32
=r2
856 @
$(MAKE
) nc MIPS32
=r2
871 @
$(MAKE
) vs MIPS32
=r2
874 @
$(MAKE
) r2a NVRAM_SIZE
=60 LINKSYS_E
=y
877 @
$(MAKE
) r2b NVRAM_SIZE
=60 LINKSYS_E
=y
880 @
$(MAKE
) r2c NVRAM_SIZE
=60 LINKSYS_E
=y
883 @
$(MAKE
) r2e NVRAM_SIZE
=60 LINKSYS_E
=y
886 @
$(MAKE
) r2m NVRAM_SIZE
=60 LINKSYS_E
=y
889 @
$(MAKE
) r2n NVRAM_SIZE
=60 LINKSYS_E
=y
892 @
$(MAKE
) r2nc NVRAM_SIZE
=60 LINKSYS_E
=y
895 @
$(MAKE
) r2o NVRAM_SIZE
=60 LINKSYS_E
=y
898 @
$(MAKE
) r2r NVRAM_SIZE
=60 LINKSYS_E
=y
901 @
$(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"
904 @
$(MAKE
) r2t NVRAM_SIZE
=60 LINKSYS_E
=y
907 @
$(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"
912 echo
'#ifndef TOMATO_PROFILE' > router
/shared
/tomato_profile.h
913 echo
'#define TOMATO_$(N) 1' >> router
/shared
/tomato_profile.h
914 echo
'#define PROFILE_G 1' >> router
/shared
/tomato_profile.h
915 echo
'#define PROFILE_N 2' >> router
/shared
/tomato_profile.h
916 echo
'#define TOMATO_PROFILE PROFILE_$(N)' >> router
/shared
/tomato_profile.h
917 echo
'#define TOMATO_PROFILE_NAME "$(N)"' >> router
/shared
/tomato_profile.h
918 echo
'#define TOMATO_BUILD_NAME "$(B)"' >> router
/shared
/tomato_profile.h
919 echo
'#define TOMATO_BUILD_DESC "$(DESC)"' >> router
/shared
/tomato_profile.h
920 echo
'#ifndef CONFIG_NVRAM_SIZE' >> router
/shared
/tomato_profile.h
921 echo
'#define CONFIG_NVRAM_SIZE $(NVRAM_SIZE)' >> router
/shared
/tomato_profile.h
922 echo
'#endif' >> router
/shared
/tomato_profile.h
923 echo
'#endif' >> router
/shared
/tomato_profile.h
925 echo
'TOMATO_$(N) = 1' > tomato_profile.mak
926 echo
'PROFILE_G = 1' >> tomato_profile.mak
927 echo
'PROFILE_N = 2' >> tomato_profile.mak
928 echo
'TOMATO_PROFILE = $$(PROFILE_$(N))' >> tomato_profile.mak
929 echo
'TOMATO_PROFILE_NAME = "$(N)"' >> tomato_profile.mak
930 echo
'TOMATO_BUILD = "$(B)"' >> tomato_profile.mak
931 echo
'TOMATO_BUILD_NAME = "$(B)"' >> tomato_profile.mak
932 echo
'TOMATO_BUILD_DESC = "$(DESC)"' >> tomato_profile.mak
933 echo
'TOMATO_PROFILE_L = $(lowercase_N)' >> tomato_profile.mak
934 echo
'TOMATO_PROFILE_U = $(uppercase_N)' >> tomato_profile.mak
935 echo
'TOMATO_BUILD_USB = "$(USB)"' >> tomato_profile.mak
937 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
939 # Note that changes to variables in tomato_profile.mak don't
940 # get propogated to this invocation of make!
942 @echo
"Using $(N) profile, $(B) build config."
946 rm -f config_current
; \
947 ln
-s config_
$(lowercase_B
) config_current
; \
948 cp
-f config_current .config
950 @cd router
/busybox
&& \
951 rm -f config_current
; \
952 ln
-s config_
$(lowercase_B
) config_current
; \
953 cp config_current .config
956 rm -f config_current
; \
957 ln
-s config_
$(lowercase_B
) config_current
; \
958 cp config_current .config
960 @
$(MAKE
) -C router oldconfig
963 @echo
"a A build (standard)"
964 @echo
"b B build (standard minus SSH)"
965 @echo
"c C build (standard minus CIFS)"
966 @echo
"d D build (standard minus Samba server)"
967 @echo
"m M build (standard plus extra utilities and NTFS support)"
968 @echo
"nc NC build (standard plus VPN, extra utilities, NTFS support and NOCAT)"
969 @echo
"ncm NCS build (no USB support, NOCAT)"
970 @echo
"ncs NCS build (std + NOCAT)"
971 @echo
"m Ext - (standard plus extra utilities and NTFS support)"
973 ifeq ($(CONFIG_LINUX26
),y
)
974 @echo
"e E build (standard plus VPN, extra utilities and NTFS support)"
975 @echo
"i I build (IPv6 with no USB support minus CIFS and RIPv1/2)"
977 @echo
"e E build (standard plus VPN and NTFS support)"
979 @echo
"s S build (no USB support)"
980 @echo
"f F build (no USB support minus CIFS and RIPv1/2)"
981 @echo
"fs FS build (no USB support minus CIFS, JFFS, Zebra and RIPv1/2)"
982 @echo
"v V build (VPN with no USB support)"
983 @echo
"vs VS build (Small VPN with no USB support)"
985 ifeq ($(CONFIG_LINUX26
),y
)
986 @echo
"r2a MIPS Release 2 A build (standard)"
987 @echo
"r2b MIPS Release 2 B build (standard minus SSH)"
988 @echo
"r2c MIPS Release 2 C build (standard minus CIFS)"
989 @echo
"r2d MIPS Release 2 D build (standard minus Samba server)"
990 @echo
"r2e MIPS Release 2 E build (standard plus VPN and extras)"
991 @echo
"r2f MIPS Release 2 F build (no USB minus CIFS, RIPv1/2)"
992 @echo
"r2fs MIPS Release 2 FS build (no USB minus JFFS, CIFS, RIPv1/2, Zebra) + F5D8235v3, F7D301/2, F7D4302"
993 @echo
"r2i MIPS Release 2 I build (IPv6 no USB minus CIFS and RIPv1/2)"
994 @echo
"r2m MIPS Release 2 M build (standard plus extras)"
995 @echo
"r2nc MIPS Release 2 NC build (standard plus VPN, extras and NOCAT)"
996 @echo
"r2ncm MIPS Release 2 NCM build (no USB, plus NOCAT)"
997 @echo
"r2ncs MIPS Release 2 NCS build (standard plus NOCAT)"
998 @echo
"r2s MIPS Release 2 S build (no USB)"
999 @echo
"r2t MIPS Release 2 T build (no USB, with extras)"
1000 @echo
"r2u MIPS Release 2 U build (no USB, plus VPN with extras)"
1001 @echo
"r2v MIPS Release 2 V build (VPN with no USB)"
1002 @echo
"r2vs MIPS Release 2 VS build (Small VPN with no USB)"
1003 @echo
"n60m Linksys E-series build (60KB NVRAM, standard plus extras)"
1004 @echo
"n60e Linksys E-series build (60KB NVRAM, standard plus VPN and extras)"
1005 @echo
"n60nc Linksys E-series build (60KB NVRAM, standard plus extras, plus VPN, plus NOCAT)"
1006 @echo
"n60s Linksys E-series build (60KB NVRAM, no USB)"
1007 @echo
"n60v Linksys E-series build (60KB NVRAM, VPN with no USB)"
1009 @echo
"..etc.. other build configs"
1010 @echo
"clean -C router clean"
1011 @echo
"cleanimage rm -rf image"
1012 @echo
"cleantools clean btools, mksquashfs"
1013 @echo
"cleankernel -C Linux distclean (but preserves .config)"
1014 @echo
"distclean distclean of Linux & busybox (but preserve .configs)"
1015 @echo
"prepk -C Linux oldconfig dep"
1017 .PHONY
: all clean distclean cleanimage cleantools cleankernel prepk what setprofile help
1018 .PHONY
: a b c d m nc Makefile allversions tomato_profile.mak