2 # Toplevel Makefile for the BCM947xx Linux Router release
4 # Copyright 2005, Broadcom Corporation
7 # THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
8 # KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
9 # SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
10 # FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
12 # $Id: Makefile,v 1.53 2005/04/25 03:54:37 tallest Exp $
15 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
17 # To rebuild everything and all configurations:
19 # make V1=whatever V2=sub-whatever VPN=vpn3.6 a b c d m
20 # The 1st "whatever" would be the build number, the sub-whatever would
21 # be the update to the version.
24 # make V1=8516 V2="-jffs.1" a b c d m s
26 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
30 export SRCBASE
:= $(shell pwd
)
31 RELEASEDIR
:= $(shell (cd
$(SRCBASE
)/..
&& pwd
-P
))
32 PATH
:= $(RELEASEDIR
)/tools
:$(PATH
)
37 # Normally you'd do something like "make V1=8516 V2=-sub-ver a b c d"
38 # But if you don't give anything for "V1", it'll get a default from tomato_version.
42 ifeq ($(CONFIG_LINUX26
),y
)
55 -include tomato_profile.mak
57 # This could be simpler by just using $(TOMATO_PROFILE_NAME) like it used to be,
58 # but that's fragile. If you make one certain innocuous change elsewhere in the
59 # makefile(s), the build will silently be wrong. This way it works properly every time.
60 current_BUILD_NAME
= $(strip $(shell grep
"^TOMATO_BUILD_NAME" tomato_profile.mak | cut
-d
"=" -f2
))
61 current_BUILD_DESC
= $(strip $(shell grep
"^TOMATO_BUILD_DESC" tomato_profile.mak | cut
-d
"=" -f2 | sed
-e
"s/ //g"))
62 current_BUILD_USB
= $(strip $(shell grep
"^TOMATO_BUILD_USB" tomato_profile.mak | cut
-d
"=" -f2 | sed
-e
"s/ //g"))
63 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
))
65 uppercase_N
= $(shell echo
$(N
) | tr a-z A-Z
)
66 lowercase_N
= $(shell echo
$(N
) | tr A-Z a-z
)
67 uppercase_B
= $(shell echo
$(B
) | tr a-z A-Z
)
68 lowercase_B
= $(shell echo
$(B
) | tr A-Z a-z
)
70 ifeq ($(CONFIG_LINUX26
),y
)
71 mips_rev
= $(if
$(filter $(MIPS32
),r2
),MIPSR2
,MIPSR1
)
78 beta
= $(if
$(filter $(TOMATO_EXPERIMENTAL
),1),-beta
,)
82 @btools
/uversion.pl
--gen
$(V1
) $(mips_rev
)$(beta
)$(V2
) $(ND
) $(current_BUILD_USB
) $(current_BUILD_DESC
)
84 ifeq ($(TOMATO_BUILD
),)
93 @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"
99 @
$(MAKE
) -C router
all
100 @
$(MAKE
) -C router
install
103 @
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
104 @
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
107 @
rm -f image
/tomato-WRT54
*$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin
108 @
rm -f image
/tomato-WRTSL54
*$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin
109 @
rm -f image
/tomato-WR850G
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin
112 ifeq ($(LINKSYS_E
),y
)
113 @
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
116 ifneq ($(NVRAM_SIZE
),60)
117 @
rm -f image
/tomato-F7D????
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin
118 @
rm -f image
/tomato-F5D8235v3
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin
122 @echo
"***********************" `date` "************************" >>fpkg.log
123 @cat router
/shared
/tomato_version
>>fpkg.log
125 @cat router
/target.
info >>fpkg.log
128 @btools
/fpkg
-i lzma-loader
/loader.gz
-i
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/vmlinuz
-a
1024 -i router
/mipsel-uclibc
/target.image \
129 -l W54G
,image
/tomato-WRT54G_WRT54GL
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
130 -l W54S
,image
/tomato-WRT54GS
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
131 -l W54s
,image
/tomato-WRT54GSv4
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
132 -l W54U
,image
/tomato-WRTSL54GS
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
133 -m
0x10577050,image
/tomato-WR850G
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
137 ifeq ($(LINKSYS_E
),y
)
138 # Linksys E-series 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 -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 \
141 -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 \
142 -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 \
146 ifneq ($(NVRAM_SIZE
),60)
147 # Create Belkin images
148 @btools
/fpkg
-i lzma-loader
/loader.gz
-i
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/vmlinuz
-a
1024 -i router
/mipsel-uclibc
/target.image \
149 -b
0x20100322,image
/tomato-F7D3301
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
150 -b
0x20090928,image
/tomato-F7D3302
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
151 -b
0x20091006,image
/tomato-F7D4302
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
152 -b
0x00017116,image
/tomato-F5D8235v3
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
156 # Create generic TRX image
157 @btools
/fpkg
-i lzma-loader
/loader.gz
-i
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/vmlinuz
-a
1024 -i router
/mipsel-uclibc
/target.image \
158 -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 \
161 @cp fpkg.log image
/fpkg-
$(V1
)$(mips_rev
)$(beta
)$(V2
).log
163 @echo
"-----------------"
164 @echo
`cat router/shared/tomato_version` " ready"
165 @echo
"-----------------"
166 ifneq ($(NOVERSION
),1)
167 @cp router
/shared
/tomato_version router
/shared
/tomato_version_last
168 @btools
/uversion.pl
--bump
175 @touch router
/.config
176 @
rm -f router
/config_
[a-z
]
177 @
rm -f router
/busybox
/config_
[a-z
]
178 @
$(MAKE
) -C router
$@
179 @
-rmdir router
/mipsel-uclibc
184 @
rm -f router
/.config
185 @touch router
/.config
189 @
$(MAKE
) -C
$(LINUXDIR
)/scripts
/squashfs
clean
190 @
$(MAKE
) -C btools
clean
194 mv .config save-config
&& \
195 $(MAKE
) distclean || true
; \
196 cp
-p save-config .config || true
199 @
$(MAKE
) -C router kernel
200 @ls
-l
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/zImage
202 distclean: clean cleanimage cleankernel cleantools
203 ifneq ($(INSIDE_MAK
),1)
204 @
$(MAKE
) -C router
$@ INSIDE_MAK
=1
206 mv router
/busybox
/.config busybox-saved-config || true
207 @
$(MAKE
) -C router
/busybox
distclean
208 @
rm -f router
/busybox
/config_current
209 @cp
-p busybox-saved-config router
/busybox
/.config || true
210 @cp
-p router
/busybox
/.config router
/busybox
/config_current || true
211 @
rm -f router
/config_current
212 @
rm -f router
/.config.cmd router
/.config.old router
/.config
213 @
rm -f router
/libfoo_xref.txt
214 @
rm -f tomato_profile.mak router
/shared
/tomato_profile.h
215 @touch tomato_profile.mak
216 @touch router
/shared
/tomato_profile.h
221 rm -f config_current
; \
222 ln
-s config_base config_current
; \
223 cp
-f config_current .config
224 $(MAKE
) -C
$(LINUXDIR
) oldconfig
225 ifneq ($(CONFIG_LINUX26
),y
)
226 $(MAKE
) -C
$(LINUXDIR
) dep
231 @echo
"$(current_BUILD_DESC)-$(current_BUILD_NAME)-$(TOMATO_PROFILE_NAME) Profile"
235 # The methodology for making the different builds is to
236 # copy the "base" config file to the "target" config file in
237 # the appropriate directory, and then edit it by removing and
238 # inserting the desired configuration lines.
239 # You can't just delete the "whatever=y" line, you must have
240 # a "...is not set" line, or the make oldconfig will stop and ask
243 # Options for "make bin" :
244 # BUILD_DESC (Std|Lite|Ext|...)
249 # NO_CIFS, NO_SSH, NO_ZEBRA, NO_SAMBA, NO_HTTPS, NO_XXTP, NO_LIBOPT
250 # SAMBA3, OPENVPN, IPV6SUPP, EBTABLES, NTFS, MEDIASRV, BBEXTRAS, USBEXTRAS, BCM57, SLIM
258 if
[ "$(CONFIG_LINUX26)" = "y" ] ||
[ "$(SAMBA3)" = "y" ]; then \
259 sed
-i
"/TCONFIG_SAMBA3/d" $(1); \
260 echo
"TCONFIG_SAMBA3=y" >>$(1); \
262 sed
-i
"/TCONFIG_EMF/d" $(1); \
263 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
264 if
[ "$(SLIM)" = "y" ]; then \
265 echo
"# TCONFIG_EMF is not set" >>$(1); \
267 echo
"TCONFIG_EMF=y" >>$(1); \
270 echo
"# TCONFIG_EMF is not set" >>$(1); \
272 sed
-i
"/TCONFIG_JFFSV1/d" $(1); \
273 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
274 if
[ "$(JFFSv1)" = "y" ]; then \
275 echo
"TCONFIG_JFFSV1=y" >>$(1); \
277 echo
"# TCONFIG_JFFSV1 is not set" >>$(1); \
280 echo
"TCONFIG_JFFSV1=y" >>$(1); \
282 if
[ "$(USB)" = "USB" ]; then \
283 sed
-i
"/TCONFIG_USB is not set/d" $(1); \
284 echo
"TCONFIG_USB=y" >>$(1); \
285 if
[ "$(USBEXTRAS)" = "y" ]; then \
286 sed
-i
"/TCONFIG_USB_EXTRAS/d" $(1); \
287 echo
"TCONFIG_USB_EXTRAS=y" >>$(1); \
289 if
[ "$(NTFS)" = "y" ]; then \
290 sed
-i
"/TCONFIG_NTFS/d" $(1); \
291 echo
"TCONFIG_NTFS=y" >>$(1); \
293 if
[ "$(MEDIASRV)" = "y" ]; then \
294 sed
-i
"/TCONFIG_MEDIA_SERVER/d" $(1); \
295 echo
"TCONFIG_MEDIA_SERVER=y" >>$(1); \
298 sed
-i
"/TCONFIG_USB=y/d" $(1); \
299 echo
"# TCONFIG_USB is not set" >>$(1); \
301 if
[ "$(NO_SAMBA)" = "y" ]; then \
302 sed
-i
"/TCONFIG_SAMBASRV/d" $(1); \
303 echo
"# TCONFIG_SAMBASRV is not set" >>$(1); \
305 if
[ "$(NO_ZEBRA)" = "y" ]; then \
306 sed
-i
"/TCONFIG_ZEBRA/d" $(1); \
307 echo
"# TCONFIG_ZEBRA is not set" >>$(1); \
309 if
[ "$(NO_JFFS)" = "y" ]; then \
310 sed
-i
"/TCONFIG_JFFS2/d" $(1); \
311 echo
"# TCONFIG_JFFS2 is not set" >>$(1); \
312 sed
-i
"/TCONFIG_JFFSV1/d" $(1); \
313 echo
"# TCONFIG_JFFSV1 is not set" >>$(1); \
315 if
[ "$(NO_CIFS)" = "y" ]; then \
316 sed
-i
"/TCONFIG_CIFS/d" $(1); \
317 echo
"# TCONFIG_CIFS is not set" >>$(1); \
319 if
[ "$(NO_SSH)" = "y" ]; then \
320 sed
-i
"/TCONFIG_SSH/d" $(1); \
321 echo
"# TCONFIG_SSH is not set" >>$(1); \
323 if
[ "$(NO_HTTPS)" = "y" ]; then \
324 sed
-i
"/TCONFIG_HTTPS/d" $(1); \
325 echo
"# TCONFIG_HTTPS is not set" >>$(1); \
327 if
[ "$(NO_XXTP)" = "y" ]; then \
328 sed
-i
"/TCONFIG_L2TP/d" $(1); \
329 echo
"# TCONFIG_L2TP is not set" >>$(1); \
330 sed
-i
"/TCONFIG_PPTP/d" $(1); \
331 echo
"# TCONFIG_PPTP is not set" >>$(1); \
333 if
[ "$(NO_LIBOPT)" = "y" ]; then \
334 sed
-i
"/TCONFIG_OPTIMIZE_SHARED_LIBS/d" $(1); \
335 echo
"# TCONFIG_OPTIMIZE_SHARED_LIBS is not set" >>$(1); \
337 if
[ "$(EBTABLES)" = "y" ]; then \
338 sed
-i
"/TCONFIG_EBTABLES/d" $(1); \
339 echo
"TCONFIG_EBTABLES=y" >>$(1); \
341 if
[ "$(IPV6SUPP)" = "y" ]; then \
342 sed
-i
"/TCONFIG_IPV6/d" $(1); \
343 echo
"TCONFIG_IPV6=y" >>$(1); \
345 if
[ "$(NOCAT)" = "y" ]; then \
346 sed
-i
"/TCONFIG_NOCAT/d" $(1); \
347 echo
"TCONFIG_NOCAT=y" >>$(1); \
349 if
[ "$(OPENVPN)" = "y" ]; then \
350 sed
-i
"/TCONFIG_LZO/d" $(1); \
351 echo
"TCONFIG_LZO=y" >>$(1); \
352 sed
-i
"/TCONFIG_OPENVPN/d" $(1); \
353 echo
"TCONFIG_OPENVPN=y" >>$(1); \
354 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
355 sed
-i
"/TCONFIG_FTP_SSL/d" $(1); \
356 echo
"TCONFIG_FTP_SSL=y" >>$(1); \
359 if
[ "$(SNMP)" = "y" ]; then \
360 sed
-i
"/TCONFIG_SNMP/d" $(1); \
361 echo
"TCONFIG_SNMP=y" >>$(1); \
363 if
[ "$(USERPPTP)" = "y" ]; then \
364 sed
-i
"/TCONFIG_USERPPTP/d" $(1); \
365 echo
"TCONFIG_USERPPTP=y" >>$(1); \
367 if
[ "$(VLAN)" = "y" ]; then \
368 sed
-i
"/TCONFIG_VLAN/d" $(1); \
369 echo
"TCONFIG_VLAN=y" >>$(1); \
374 define BusyboxOptions
376 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
377 sed
-i
"/CONFIG_FEATURE_2_4_MODULES/d" $(1); \
378 echo
"# CONFIG_FEATURE_2_4_MODULES is not set" >>$(1); \
379 sed
-i
"/CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT/d" $(1); \
380 echo
"CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y" >>$(1); \
381 sed
-i
"/CONFIG_FEATURE_DEVFS/d" $(1); \
382 echo
"# CONFIG_FEATURE_DEVFS is not set" >>$(1); \
383 sed
-i
"/CONFIG_MKNOD/d" $(1); \
384 echo
"CONFIG_MKNOD=y" >>$(1); \
385 sed
-i
"/CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE/d" $(1); \
386 echo
"CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=512" >>$(1); \
388 if
[ "$(NO_CIFS)" = "y" ]; then \
389 sed
-i
"/CONFIG_FEATURE_MOUNT_CIFS/d" $(1); \
390 echo
"# CONFIG_FEATURE_MOUNT_CIFS is not set" >>$(1); \
392 if
[ "$(BBEXTRAS)" = "y" ]; then \
393 sed
-i
"/CONFIG_SENDMAIL/d" $(1); \
394 echo
"CONFIG_SENDMAIL=y" >>$(1); \
395 sed
-i
"/CONFIG_FEATURE_SORT_BIG/d" $(1); \
396 echo
"CONFIG_FEATURE_SORT_BIG=y" >>$(1); \
397 sed
-i
"/CONFIG_FTPPUT/d" $(1); \
398 echo
"CONFIG_FTPPUT=y" >>$(1); \
399 sed
-i
"/CONFIG_FTPGET/d" $(1); \
400 echo
"CONFIG_FTPGET=y" >>$(1); \
401 sed
-i
"/CONFIG_CLEAR/d" $(1); \
402 echo
"CONFIG_CLEAR=y" >>$(1); \
403 sed
-i
"/CONFIG_NICE/d" $(1); \
404 echo
"CONFIG_NICE=y" >>$(1); \
405 sed
-i
"/CONFIG_SETCONSOLE/d" $(1); \
406 echo
"CONFIG_SETCONSOLE=y" >>$(1); \
407 sed
-i
"/CONFIG_MKFIFO/d" $(1); \
408 echo
"CONFIG_MKFIFO=y" >>$(1); \
410 if
[ "$(USB)" = "USB" ]; then \
411 if
[ "$(USBEXTRAS)" = "y" ]; then \
412 sed
-i
"/CONFIG_E2FSCK/d" $(1); \
413 echo
"CONFIG_E2FSCK=y" >>$(1); \
414 sed
-i
"/CONFIG_MKE2FS/d" $(1); \
415 echo
"CONFIG_MKE2FS=y" >>$(1); \
416 sed
-i
"/CONFIG_FDISK/d" $(1); \
417 echo
"CONFIG_FDISK=y" >>$(1); \
418 sed
-i
"/CONFIG_FEATURE_FDISK_WRITABLE/d" $(1); \
419 echo
"CONFIG_FEATURE_FDISK_WRITABLE=y" >>$(1); \
420 sed
-i
"/CONFIG_MKFS_VFAT/d" $(1); \
421 echo
"CONFIG_MKFS_VFAT=y" >>$(1); \
422 sed
-i
"/CONFIG_MKSWAP/d" $(1); \
423 echo
"CONFIG_MKSWAP=y" >>$(1); \
424 sed
-i
"/CONFIG_FLOCK/d" $(1); \
425 echo
"CONFIG_FLOCK=y" >>$(1); \
426 sed
-i
"/CONFIG_FSYNC/d" $(1); \
427 echo
"CONFIG_FSYNC=y" >>$(1); \
428 sed
-i
"/CONFIG_UNZIP/d" $(1); \
429 echo
"CONFIG_UNZIP=y" >>$(1); \
430 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
431 sed
-i
"/CONFIG_LSUSB/d" $(1); \
432 echo
"CONFIG_LSUSB=y" >>$(1); \
433 sed
-i
"/CONFIG_FEATURE_WGET_STATUSBAR/d" $(1); \
434 echo
"CONFIG_FEATURE_WGET_STATUSBAR=y" >>$(1); \
435 sed
-i
"/CONFIG_FEATURE_VERBOSE_USAGE/d" $(1); \
436 echo
"CONFIG_FEATURE_VERBOSE_USAGE=y" >>$(1); \
440 sed
-i
"/CONFIG_FEATURE_MOUNT_LOOP/d" $(1); \
441 echo
"# CONFIG_FEATURE_MOUNT_LOOP is not set" >>$(1); \
442 sed
-i
"/CONFIG_FEATURE_DEVFS/d" $(1); \
443 echo
"# CONFIG_FEATURE_DEVFS is not set" >>$(1); \
444 sed
-i
"/CONFIG_FEATURE_MOUNT_LABEL/d" $(1); \
445 echo
"# CONFIG_FEATURE_MOUNT_LABEL is not set" >>$(1); \
446 sed
-i
"/CONFIG_FEATURE_MOUNT_FSTAB/d" $(1); \
447 echo
"# CONFIG_FEATURE_MOUNT_FSTAB is not set" >>$(1); \
448 sed
-i
"/CONFIG_VOLUMEID/d" $(1); \
449 echo
"# CONFIG_VOLUMEID is not set" >>$(1); \
450 sed
-i
"/CONFIG_BLKID/d" $(1); \
451 echo
"# CONFIG_BLKID is not set" >>$(1); \
452 sed
-i
"/CONFIG_SWAPONOFF/d" $(1); \
453 echo
"# CONFIG_SWAPONOFF is not set" >>$(1); \
454 sed
-i
"/CONFIG_CHROOT/d" $(1); \
455 echo
"# CONFIG_CHROOT is not set" >>$(1); \
456 sed
-i
"/CONFIG_PIVOT_ROOT/d" $(1); \
457 echo
"# CONFIG_PIVOT_ROOT is not set" >>$(1); \
458 sed
-i
"/CONFIG_TRUE/d" $(1); \
459 echo
"# CONFIG_TRUE is not set" >>$(1); \
461 if
[ "$(IPV6SUPP)" = "y" ]; then \
462 sed
-i
"/CONFIG_FEATURE_IPV6/d" $(1); \
463 echo
"CONFIG_FEATURE_IPV6=y" >>$(1); \
464 sed
-i
"/CONFIG_PING6/d" $(1); \
465 echo
"CONFIG_PING6=y" >>$(1); \
466 sed
-i
"/CONFIG_TRACEROUTE6/d" $(1); \
467 echo
"CONFIG_TRACEROUTE6=y" >>$(1); \
468 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
469 sed
-i
"/CONFIG_FEATURE_UDHCP_RFC5969/d" $(1); \
470 echo
"CONFIG_FEATURE_UDHCP_RFC5969=y" >>$(1); \
473 if
[ "$(SLIM)" = "y" ]; then \
474 sed
-i
"/CONFIG_AWK/d" $(1); \
475 echo
"# CONFIG_AWK is not set" >>$(1); \
476 sed
-i
"/CONFIG_BASENAME/d" $(1); \
477 echo
"# CONFIG_BASENAME is not set" >>$(1); \
478 sed
-i
"/CONFIG_FEATURE_DEVFS/d" $(1); \
479 echo
"# CONFIG_FEATURE_DEVFS is not set" >>$(1); \
480 sed
-i
"/CONFIG_BLKID/d" $(1); \
481 echo
"# CONFIG_BLKID is not set" >>$(1); \
482 sed
-i
"/CONFIG_TELNET=y/d" $(1); \
483 echo
"# CONFIG_TELNET is not set" >>$(1); \
484 sed
-i
"/CONFIG_ARPING/d" $(1); \
485 echo
"# CONFIG_ARPING is not set" >>$(1); \
486 sed
-i
"/CONFIG_FEATURE_LS_COLOR/d" $(1); \
487 echo
"# CONFIG_FEATURE_LS_COLOR is not set" >>$(1); \
488 sed
-i
"/CONFIG_CHOWN/d" $(1); \
489 echo
"# CONFIG_CHOWN is not set" >>$(1); \
491 sed
-i
"/CONFIG_FEATURE_LS_COLOR/d" $(1); \
492 echo
"CONFIG_FEATURE_LS_COLOR=y" >>$(1); \
493 sed
-i
"/CONFIG_FEATURE_LS_COLOR_IS_DEFAULT/d" $(1); \
494 echo
"CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y" >>$(1); \
501 sed
-i
"/CONFIG_NVRAM_SIZE/d" $(1); \
502 echo
"CONFIG_NVRAM_SIZE="$(NVRAM_SIZE
) >>$(1); \
503 sed
-i
"/CONFIG_CC_OPTIMIZE_FOR_SIZE/d" $(1); \
504 if
[ "$(KERN_SIZE_OPT)" = "y" ]; then \
505 echo
"CONFIG_CC_OPTIMIZE_FOR_SIZE=y" >>$(1); \
507 echo
"# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set" >>$(1); \
509 if
[ "$(CONFIG_LINUX26)" = "y" ] && [ "$(MIPS32)" = "r2" ]; then \
510 sed
-i
"/CONFIG_CPU_MIPS32_R1/d" $(1); \
511 echo
"# CONFIG_CPU_MIPS32_R1 is not set" >>$(1); \
512 sed
-i
"/CONFIG_CPU_MIPS32_R2/d" $(1); \
513 echo
"CONFIG_CPU_MIPS32_R2=y" >>$(1); \
514 sed
-i
"/CONFIG_CPU_MIPSR1/d" $(1); \
515 echo
"CONFIG_CPU_MIPSR2=y" >>$(1); \
517 if
[ "$(USB)" = "" ]; then \
518 sed
-i
"/CONFIG_EFI_PARTITION/d" $(1); \
519 echo
"# CONFIG_EFI_PARTITION is not set" >>$(1); \
521 if
[ "$(IPV6SUPP)" = "y" ]; then \
522 sed
-i
"/CONFIG_IPV6 is not set/d" $(1); \
523 echo
"CONFIG_IPV6=y" >>$(1); \
524 sed
-i
"/CONFIG_IP6_NF_IPTABLES/d" $(1); \
525 echo
"CONFIG_IP6_NF_IPTABLES=y" >>$(1); \
526 sed
-i
"/CONFIG_IP6_NF_MATCH_RT/d" $(1); \
527 echo
"CONFIG_IP6_NF_MATCH_RT=y" >>$(1); \
528 sed
-i
"/CONFIG_IP6_NF_FILTER/d" $(1); \
529 echo
"CONFIG_IP6_NF_FILTER=m" >>$(1); \
530 sed
-i
"/CONFIG_IP6_NF_TARGET_LOG/d" $(1); \
531 echo
"CONFIG_IP6_NF_TARGET_LOG=m" >>$(1); \
532 sed
-i
"/CONFIG_IP6_NF_TARGET_REJECT/d" $(1); \
533 echo
"CONFIG_IP6_NF_TARGET_REJECT=m" >>$(1); \
534 sed
-i
"/CONFIG_IP6_NF_MANGLE/d" $(1); \
535 echo
"CONFIG_IP6_NF_MANGLE=m" >>$(1); \
536 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
537 sed
-i
"/CONFIG_NF_CONNTRACK_IPV6/d" $(1); \
538 echo
"CONFIG_NF_CONNTRACK_IPV6=m" >>$(1); \
539 sed
-i
"/CONFIG_NETFILTER_XT_MATCH_HL/d" $(1); \
540 echo
"CONFIG_NETFILTER_XT_MATCH_HL=m" >>$(1); \
541 sed
-i
"/CONFIG_IPV6_ROUTER_PREF/d" $(1); \
542 echo
"CONFIG_IPV6_ROUTER_PREF=y" >>$(1); \
543 sed
-i
"/CONFIG_IPV6_SIT/d" $(1); \
544 echo
"CONFIG_IPV6_SIT=m" >>$(1); \
545 sed
-i
"/CONFIG_IPV6_SIT_6RD/d" $(1); \
546 echo
"CONFIG_IPV6_SIT_6RD=y" >>$(1); \
547 sed
-i
"/CONFIG_IPV6_MULTIPLE_TABLES/d" $(1); \
548 echo
"CONFIG_IPV6_MULTIPLE_TABLES=y" >>$(1); \
549 sed
-i
"/CONFIG_IP6_NF_RAW/d" $(1); \
550 echo
"CONFIG_IP6_NF_RAW=m" >>$(1); \
551 sed
-i
"/CONFIG_IPV6_OPTIMISTIC_DAD/d" $(1); \
552 echo
"CONFIG_IPV6_OPTIMISTIC_DAD=y" >>$(1); \
553 sed
-i
"/CONFIG_IPV6_MROUTE/d" $(1); \
554 echo
"CONFIG_IPV6_MROUTE=y" >>$(1); \
555 sed
-i
"/CONFIG_IP6_NF_TARGET_ROUTE/d" $(1); \
556 echo
"CONFIG_IP6_NF_TARGET_ROUTE=m" >>$(1); \
558 sed
-i
"/CONFIG_IP6_NF_CONNTRACK/d" $(1); \
559 echo
"CONFIG_IP6_NF_CONNTRACK=m" >>$(1); \
560 sed
-i
"/CONFIG_IP6_NF_MATCH_HL/d" $(1); \
561 echo
"CONFIG_IP6_NF_MATCH_HL=m" >>$(1); \
562 sed
-i
"/CONFIG_IP6_NF_FTP/d" $(1); \
563 echo
"CONFIG_IP6_NF_FTP=m" >>$(1); \
564 sed
-i
"/CONFIG_IP6_NF_MATCH_LIMIT/d" $(1); \
565 echo
"CONFIG_IP6_NF_MATCH_LIMIT=m" >>$(1); \
566 sed
-i
"/CONFIG_IP6_NF_MATCH_CONDITION/d" $(1); \
567 echo
"CONFIG_IP6_NF_MATCH_CONDITION=m" >>$(1); \
568 sed
-i
"/CONFIG_IP6_NF_MATCH_MAC/d" $(1); \
569 echo
"CONFIG_IP6_NF_MATCH_MAC=m" >>$(1); \
570 sed
-i
"/CONFIG_IP6_NF_MATCH_MULTIPORT/d" $(1); \
571 echo
"CONFIG_IP6_NF_MATCH_MULTIPORT=m" >>$(1); \
572 sed
-i
"/CONFIG_IP6_NF_MATCH_MARK/d" $(1); \
573 echo
"CONFIG_IP6_NF_MATCH_MARK=m" >>$(1); \
574 sed
-i
"/CONFIG_IP6_NF_MATCH_LENGTH/d" $(1); \
575 echo
"CONFIG_IP6_NF_MATCH_LENGTH=m" >>$(1); \
576 sed
-i
"/CONFIG_IP6_NF_MATCH_STATE/d" $(1); \
577 echo
"CONFIG_IP6_NF_MATCH_STATE=m" >>$(1); \
578 sed
-i
"/CONFIG_IP6_NF_TARGET_MARK/d" $(1); \
579 echo
"CONFIG_IP6_NF_TARGET_MARK=m" >>$(1); \
580 sed
-i
"/CONFIG_IP6_NF_TARGET_TCPMSS/d" $(1); \
581 echo
"CONFIG_IP6_NF_TARGET_TCPMSS=m" >>$(1); \
582 sed
-i
"/CONFIG_IP6_NF_TARGET_ROUTE/d" $(1); \
583 echo
"CONFIG_IP6_NF_TARGET_ROUTE=m" >>$(1); \
586 sed
-i
"/CONFIG_BCM57XX/d" $(1); \
587 if
[ "$(BCM57)" = "y" ]; then \
588 echo
"CONFIG_BCM57XX=m" >>$(1); \
590 echo
"# CONFIG_BCM57XX is not set" >>$(1); \
592 if
[ "$(CONFIG_LINUX26)" = "y" ] && [ "$(EBTABLES)" = "y" ]; then \
593 sed
-i
"/CONFIG_BRIDGE_NF_EBTABLES/d" $(1); \
594 echo
"CONFIG_BRIDGE_NF_EBTABLES=m" >>$(1); \
595 if
[ "$(IPV6SUPP)" = "y" ]; then \
596 sed
-i
"/CONFIG_BRIDGE_EBT_IP6/d" $(1); \
597 echo
"CONFIG_BRIDGE_EBT_IP6=m" >>$(1); \
606 @echo
$@
" is not a valid target!"
609 @cp router
/config_base router
/config_
$(lowercase_B
)
610 @cp router
/busybox
/config_base router
/busybox
/config_
$(lowercase_B
)
611 @cp
$(LINUXDIR
)/config_base
$(LINUXDIR
)/config_
$(lowercase_B
)
613 $(call RouterOptions
, router
/config_
$(lowercase_B
))
614 $(call KernelConfig
, $(LINUXDIR
)/config_
$(lowercase_B
))
615 $(call BusyboxOptions
, router
/busybox
/config_
$(lowercase_B
))
617 @
$(MAKE
) setprofile N
=$(TPROFILE
) B
=$(B
) DESC
="$(BUILD_DESC)" USB
="$(USB)"
620 ## Make the "normal" build
622 @
$(MAKE
) bin B
=A BUILD_DESC
="Std" USB
="USB" VLAN
="$(VLAN)" SNMP
=y
624 ## Make the "normal but without SSH" build
626 @
$(MAKE
) bin NO_SSH
=y B
=B BUILD_DESC
="No SSH" USB
="USB" VLAN
="$(VLAN)" SNMP
=y
628 ## Make the "normal but without CIFS" build
630 @
$(MAKE
) bin NO_CIFS
=y B
=C BUILD_DESC
="No CIFS" USB
="USB" VLAN
="$(VLAN)" SNMP
=y
632 ## Make the "normal but without SAMBA" (Lite) build
634 ifeq ($(CONFIG_LINUX26
),y
)
635 @
$(MAKE
) bin NO_SAMBA
=y SLIM
=y NO_CIFS
=y NO_JFFS
=y NO_ZEBRA
=y B
=D BUILD_DESC
="Lite" USB
="USB" VLAN
="$(VLAN)" SNMP
="$(SNMP)"
637 @
$(MAKE
) bin NO_SAMBA
=y SLIM
=y B
=D BUILD_DESC
="Lite" USB
="USB" VLAN
="$(VLAN)" SNMP
="$(SNMP)"
640 ## Make the "normal (with NTFS support) + VPN" build
642 ifeq ($(CONFIG_LINUX26
),y
)
643 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y NTFS
=y BBEXTRAS
=y USBEXTRAS
=y EBTABLES
=y NO_LIBOPT
=y MEDIASRV
=y IPV6SUPP
=y B
=E BUILD_DESC
="$(VPN)" USB
="USB" VLAN
="$(VLAN)" SNMP
=y
645 # @$(MAKE) bin OPENVPN=y USERPPTP=y NTFS=y B=E BUILD_DESC="$(VPN)" USB="USB" VLAN="$(VLAN)"
646 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y BBEXTRAS
=y USBEXTRAS
=y NTFS
=y B
=E BUILD_DESC
="$(VPN)" USB
="USB" SNMP
=y VLAN
="$(VLAN)"
649 ## Make the "Mini: no USB, no CIFS, no Zebra" build - targeted for Netgear routers
651 @
$(MAKE
) bin JFFSv1
=y NO_CIFS
=y NO_ZEBRA
=y SLIM
=y B
=F BUILD_DESC
="Mini" USB
="" VLAN
="$(VLAN)"
653 ## Make the "Tiny: no JFFS, no USB, no CIFS, no Zebra" build - targeted for cheapskate routers
655 @
$(MAKE
) bin NO_CIFS
=y NO_JFFS
=y NO_ZEBRA
=y SLIM
=y B
=FS BUILD_DESC
="Tiny" USB
="" VLAN
="$(VLAN)"
657 ## Make the "No USB with IPv6, no Zebra" build - for 4MB routers
659 @
$(MAKE
) bin JFFSv1
=y NO_CIFS
=y NO_ZEBRA
=y IPV6SUPP
=y B
=I BUILD_DESC
="MiniIPv6" USB
="" VLAN
="$(VLAN)"
661 ## Make the "No USB with IPv6, no Zebra, with VPN" build - for 4MB routers
662 ifeq ($(CONFIG_LINUX26
),y
)
664 @
$(MAKE
) bin JFFSv1
=y NO_CIFS
=y NO_XXTP
=y SLIM
=y NO_SAMBA
=y NO_ZEBRA
=y IPV6SUPP
=y OPENVPN
=y USERPPTP
=y NO_LIBOPT
=y B
=I BUILD_DESC
="MiniIPv6-VPN" USB
="" VLAN
="$(VLAN)" SNMP
="$(SNMP)"
667 ## Make the "normal with Extras and NTFS" build
669 ifeq ($(CONFIG_LINUX26
),y
)
670 @
$(MAKE
) bin NTFS
=y BBEXTRAS
=y USBEXTRAS
=y EBTABLES
=y NO_LIBOPT
=y MEDIASRV
=y IPV6SUPP
=y B
=M BUILD_DESC
="Ext" USB
="USB" VLAN
="$(VLAN)" SNMP
=y USERPPTP
=y
672 @
$(MAKE
) bin NTFS
=y BBEXTRAS
=y USBEXTRAS
=y B
=M BUILD_DESC
="Ext" USB
="USB" VLAN
="$(VLAN)" SNMP
=y USERPPTP
=y
676 ## Make the "normal (with NTFS support) + VPN + NOCAT" build
678 ifeq ($(CONFIG_LINUX26
),y
)
679 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y NTFS
=y BBEXTRAS
=y USBEXTRAS
=y EBTABLES
=y NO_LIBOPT
=y MEDIASRV
=y IPV6SUPP
=y B
=NC BUILD_DESC
="$(VPN)" USB
="USB" SNMP
=y VLAN
="$(VLAN)" NOCAT
=y BUILD_DESC
+="-$(NC)"
681 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y NTFS
=y B
=NC BUILD_DESC
="$(VPN)" USB
="USB" VLAN
="$(VLAN)" NOCAT
=y BUILD_DESC
+=" $(NC)"
685 ## Make the "Mini: no USB, + NOCAT" build - for 4MB routers
687 @
$(MAKE
) bin JFFSv1
=y NOCAT
=y B
=F BUILD_DESC
="Mini-NOCAT" USB
="" VLAN
="$(VLAN)"
690 ## Make the "normal" build + NOCAT
692 @
$(MAKE
) bin NOCAT
=y B
=A BUILD_DESC
="Std-NOCAT" USB
="USB" SNMP
=y VLAN
="$(VLAN)"
695 ## Make the "No USB" build
697 ifeq ($(CONFIG_LINUX26
),y
)
698 @
$(MAKE
) bin JFFSv1
=y
$(if
$(filter r2
, $(MIPS32
)),,BCM57
=y
) B
=S BUILD_DESC
="Std" USB
="" VLAN
="$(VLAN)"
700 @
$(MAKE
) bin BBEXTRAS
=y BCM57
=y B
=S BUILD_DESC
="Std" USB
="" VLAN
="$(VLAN)"
704 ## Make the "No USB with Extras" build (K26 only, for 8MB flash)
705 ifeq ($(CONFIG_LINUX26
),y
)
707 @
$(MAKE
) bin B
=S USB
="" BBEXTRAS
=y EBTABLES
=y NO_LIBOPT
=y
$(if
$(filter r2
, $(MIPS32
)),,BCM57
=y
) IPV6SUPP
=y BUILD_DESC
="Std" SNMP
=y VLAN
="$(VLAN)"
708 ## Make the "No USB with OpenVPN and Extras" build (K26 only, for 8MB flash)
710 @
$(MAKE
) bin B
=V USB
="" BBEXTRAS
=y EBTABLES
=y NO_LIBOPT
=y
$(if
$(filter r2
, $(MIPS32
)),,BCM57
=y
) IPV6SUPP
=y OPENVPN
=y USERPPTP
=y BUILD_DESC
="$(VPN)" SNMP
=y VLAN
="$(VLAN)"
713 ## Make the "VPN with no USB support" build
715 ifeq ($(CONFIG_LINUX26
),y
)
716 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y NO_JFFS
=y BCM57
=y B
=V BUILD_DESC
="$(VPN)" USB
="" VLAN
="$(VLAN)"
718 @
$(MAKE
) bin OPENVPN
=y BBEXTRAS
=y B
=V BUILD_DESC
="$(VPN)" USB
="" SNMP
=y VLAN
="$(VLAN)"
721 ## Make the "Small VPN with no USB support" build
723 ifeq ($(CONFIG_LINUX26
),y
)
724 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y NO_JFFS
=y NO_CIFS
=y B
=V BUILD_DESC
="SmallVPN" USB
=""
726 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y NO_JFFS
=y NO_CIFS
=y BCM57
=y B
=VS BUILD_DESC
="SmallVPN" USB
=""
729 ## Make Mips32r2 builds
747 @
$(MAKE
) f MIPS32
=r2 BELKIN
=y
765 @
$(MAKE
) nc MIPS32
=r2
783 @
$(MAKE
) vs MIPS32
=r2
786 @
$(MAKE
) r2a NVRAM_SIZE
=60 LINKSYS_E
=y
789 @
$(MAKE
) r2b NVRAM_SIZE
=60 LINKSYS_E
=y
792 @
$(MAKE
) r2c NVRAM_SIZE
=60 LINKSYS_E
=y
795 @
$(MAKE
) r2e NVRAM_SIZE
=60 LINKSYS_E
=y
798 @
$(MAKE
) r2m NVRAM_SIZE
=60 LINKSYS_E
=y
801 @
$(MAKE
) r2n NVRAM_SIZE
=60 LINKSYS_E
=y
804 @
$(MAKE
) r2nc NVRAM_SIZE
=60 LINKSYS_E
=y
807 @
$(MAKE
) r2o NVRAM_SIZE
=60 LINKSYS_E
=y
810 @
$(MAKE
) r2r NVRAM_SIZE
=60 LINKSYS_E
=y
813 @
$(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"
816 @
$(MAKE
) r2t NVRAM_SIZE
=60 LINKSYS_E
=y
819 @
$(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)"
823 echo
'#ifndef TOMATO_PROFILE' > router
/shared
/tomato_profile.h
824 echo
'#define TOMATO_$(N) 1' >> router
/shared
/tomato_profile.h
825 echo
'#define PROFILE_G 1' >> router
/shared
/tomato_profile.h
826 echo
'#define PROFILE_N 2' >> router
/shared
/tomato_profile.h
827 echo
'#define TOMATO_PROFILE PROFILE_$(N)' >> router
/shared
/tomato_profile.h
828 echo
'#define TOMATO_PROFILE_NAME "$(N)"' >> router
/shared
/tomato_profile.h
829 echo
'#define TOMATO_BUILD_NAME "$(B)"' >> router
/shared
/tomato_profile.h
830 echo
'#define TOMATO_BUILD_DESC "$(DESC)"' >> router
/shared
/tomato_profile.h
831 echo
'#ifndef CONFIG_NVRAM_SIZE' >> router
/shared
/tomato_profile.h
832 echo
'#define CONFIG_NVRAM_SIZE $(NVRAM_SIZE)' >> router
/shared
/tomato_profile.h
833 echo
'#endif' >> router
/shared
/tomato_profile.h
834 echo
'#endif' >> router
/shared
/tomato_profile.h
836 echo
'TOMATO_$(N) = 1' > tomato_profile.mak
837 echo
'PROFILE_G = 1' >> tomato_profile.mak
838 echo
'PROFILE_N = 2' >> tomato_profile.mak
839 echo
'TOMATO_PROFILE = $$(PROFILE_$(N))' >> tomato_profile.mak
840 echo
'TOMATO_PROFILE_NAME = "$(N)"' >> tomato_profile.mak
841 echo
'TOMATO_BUILD = "$(B)"' >> tomato_profile.mak
842 echo
'TOMATO_BUILD_NAME = "$(B)"' >> tomato_profile.mak
843 echo
'TOMATO_BUILD_DESC = "$(DESC)"' >> tomato_profile.mak
844 echo
'TOMATO_PROFILE_L = $(lowercase_N)' >> tomato_profile.mak
845 echo
'TOMATO_PROFILE_U = $(uppercase_N)' >> tomato_profile.mak
846 echo
'TOMATO_BUILD_USB = "$(USB)"' >> tomato_profile.mak
848 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
850 # Note that changes to variables in tomato_profile.mak don't
851 # get propogated to this invocation of make!
853 @echo
"Using $(N) profile, $(B) build config."
857 rm -f config_current
; \
858 ln
-s config_
$(lowercase_B
) config_current
; \
859 cp
-f config_current .config
861 @cd router
/busybox
&& \
862 rm -f config_current
; \
863 ln
-s config_
$(lowercase_B
) config_current
; \
864 cp config_current .config
867 rm -f config_current
; \
868 ln
-s config_
$(lowercase_B
) config_current
; \
869 cp config_current .config
871 @
$(MAKE
) -C router oldconfig
874 @echo
"a A build (standard)"
875 @echo
"b B build (standard minus SSH)"
876 @echo
"c C build (standard minus CIFS)"
877 @echo
"d D build (standard minus Samba server)"
878 @echo
"m M build (standard plus extra utilities and NTFS support)"
879 @echo
"nc NC build (standard plus VPN, extra utilities, NTFS support and NOCAT)"
880 @echo
"ncm NCS build (no USB support, NOCAT)"
881 @echo
"ncs NCS build (std + NOCAT)"
882 @echo
"m Ext - (standard plus extra utilities and NTFS support)"
884 ifeq ($(CONFIG_LINUX26
),y
)
885 @echo
"e E build (standard plus VPN, extra utilities and NTFS support)"
886 @echo
"i I build (IPv6 with no USB support minus CIFS and RIPv1/2)"
888 @echo
"e E build (standard plus VPN and NTFS support)"
890 @echo
"s S build (no USB support)"
891 @echo
"f F build (no USB support minus CIFS and RIPv1/2)"
892 @echo
"fs FS build (no USB support minus CIFS, JFFS, Zebra and RIPv1/2)"
893 @echo
"v V build (VPN with no USB support)"
894 @echo
"vs VS build (Small VPN with no USB support)"
896 ifeq ($(CONFIG_LINUX26
),y
)
897 @echo
"r2a MIPS Release 2 A build (standard)"
898 @echo
"r2b MIPS Release 2 B build (standard minus SSH)"
899 @echo
"r2c MIPS Release 2 C build (standard minus CIFS)"
900 @echo
"r2d MIPS Release 2 D build (standard minus Samba server)"
901 @echo
"r2e MIPS Release 2 E build (standard plus VPN and extras)"
902 @echo
"r2f MIPS Release 2 F build (no USB support minus CIFS, RIPv1/2)"
903 @echo
"r2fs MIPS Release 2 FS build (no USB support minus JFFS, CIFS, RIPv1/2, Zebra)"
904 @echo
"r2i MIPS Release 2 I build (IPv6 with no USB support minus CIFS and RIPv1/2)"
905 @echo
"r2m MIPS Release 2 M build (standard plus extras)"
906 @echo
"r2nc MIPS Release 2 NC build (standard plus VPN, extras and NOCAT)"
907 @echo
"r2ncm MIPS Release 2 NCM build (no USB support, plus NOCAT)"
908 @echo
"r2ncs MIPS Release 2 NCS build (standard plus NOCAT)"
909 @echo
"r2s MIPS Release 2 S build (no USB support)"
910 @echo
"r2t MIPS Release 2 T build (no USB support with extras)"
911 @echo
"r2u MIPS Release 2 U build (no USB support plus VPN with extras)"
912 @echo
"r2v MIPS Release 2 V build (VPN with no USB support)"
913 @echo
"r2vs MIPS Release 2 VS build (Small VPN with no USB support)"
914 @echo
"n60m Linksys E-series build (60KB NVRAM, standard plus extras)"
915 @echo
"n60e Linksys E-series build (60KB NVRAM, standard plus VPN and extras)"
916 @echo
"n60nc Linksys E-series build (60KB NVRAM, standard plus extras, plus VPN, plus NOCAT)"
917 @echo
"n60s Linksys E-series build (60KB NVRAM, no USB support)"
918 @echo
"n60v Linksys E-series build (60KB NVRAM, VPN with no USB support)"
920 @echo
"..etc.. other build configs"
921 @echo
"clean -C router clean"
922 @echo
"cleanimage rm -rf image"
923 @echo
"cleantools clean btools, mksquashfs"
924 @echo
"cleankernel -C Linux distclean (but preserves .config)"
925 @echo
"distclean distclean of Linux & busybox (but preserve .configs)"
926 @echo
"prepk -C Linux oldconfig dep"
928 .PHONY
: all clean distclean cleanimage cleantools cleankernel prepk what setprofile help
929 .PHONY
: a b c d m Makefile allversions tomato_profile.mak