3 # Toplevel Makefile for the BCM947xx Linux Router release
5 # Copyright 2005, Broadcom Corporation
8 # THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
9 # KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
10 # SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
11 # FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
13 # $Id: Makefile,v 1.53 2005/04/25 03:54:37 tallest Exp $
16 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
18 # To rebuild everything and all configurations:
20 # make V1=whatever V2=sub-whatever VPN=vpn3.6 a b c d m
21 # The 1st "whatever" would be the build number, the sub-whatever would
22 # be the update to the version.
25 # make V1=8516 V2="-jffs.1" a b c d m s
27 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
31 export SRCBASE
:= $(shell pwd
)
32 RELEASEDIR
:= $(shell (cd
$(SRCBASE
)/..
&& pwd
-P
))
33 PATH
:= $(RELEASEDIR
)/tools
:$(PATH
)
38 # Normally you'd do something like "make V1=8516 V2=-sub-ver a b c d"
39 # But if you don't give anything for "V1", it'll get a default from tomato_version.
40 current_TOMATO_V1 ?
= "--def"
43 ifeq ($(CONFIG_LINUX26
),y
)
59 EXTRA_PREDESC
= 'VLAN-'
65 EXTRA_POSTDESC
= ' -64K'
66 EXTRA_64KCFLAG
= '-DTCONFIG_NVRAM_64K'
75 WNRTOOL
=$(SRCBASE
)/wnrtool
76 BOARD_FILE
=$(WNRTOOL
)/compatible_WNR3500Lv2.txt
77 fw_cfg_file
:= $(WNRTOOL
)/ambitCfg.h
80 -include tomato_profile.mak
82 # This could be simpler by just using $(TOMATO_PROFILE_NAME) like it used to be,
83 # but that's fragile. If you make one certain innocuous change elsewhere in the
84 # makefile(s), the build will silently be wrong. This way it works properly every time.
85 current_BUILD_NAME
= $(strip $(shell grep
"^TOMATO_BUILD_NAME" tomato_profile.mak | cut
-d
"=" -f2
))
86 current_BUILD_DESC
= $(strip $(shell grep
"^TOMATO_BUILD_DESC" tomato_profile.mak | cut
-d
"=" -f2 | sed
-e
"s/ //g"))
87 current_BUILD_USB
= $(strip $(shell grep
"^TOMATO_BUILD_USB" tomato_profile.mak | cut
-d
"=" -f2 | sed
-e
"s/ //g"))
88 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
))
89 current_TOMATO_MIPS32
= $(strip $(shell grep
"^TOMATO_BUILD_MIPS32" tomato_profile.mak | cut
-d
"=" -f2 | sed
-e
"s/ //g" | sed
-e
"s/\"//g" ))
90 current_TOMATO_V1
= $(strip $(shell grep
"^TOMATO_BUILD_V1" tomato_profile.mak | cut
-d
"=" -f2 | sed
-e
"s/ //g" | sed
-e
"s/\"//g" ))
91 current_TOMATO_V2
= $(strip $(shell grep
"^TOMATO_BUILD_V2" tomato_profile.mak | cut
-d
"=" -f2 | sed
-e
"s/ //g" | sed
-e
"s/\"//g" ))
92 current_TOMATO_B
= $(strip $(shell grep
"^TOMATO_BUILD_NAME" tomato_profile.mak | cut
-d
"=" -f2 | sed
-e
"s/ //g" | sed
-e
"s/\"//g" ))
93 current_TOMATO_N
= $(strip $(shell grep
"^TOMATO_PROFILE_NAME" tomato_profile.mak | cut
-d
"=" -f2 | sed
-e
"s/ //g" | sed
-e
"s/\"//g" ))
97 uppercase_N
= $(shell echo
$(N
) | tr a-z A-Z
)
98 lowercase_N
= $(shell echo
$(N
) | tr A-Z a-z
)
99 uppercase_B
= $(shell echo
$(B
) | tr a-z A-Z
)
100 lowercase_B
= $(shell echo
$(B
) | tr A-Z a-z
)
102 ifeq ($(CONFIG_LINUX26
),y
)
103 mips_rev
= $(if
$(filter $(current_TOMATO_MIPS32
),r2
),MIPSR2
,MIPSR1
)
111 beta
= $(if
$(filter $(TOMATO_EXPERIMENTAL
),1),-beta
,)
115 @btools
/uversion.pl
--gen
$(current_TOMATO_V1
) $(mips_rev
)$(beta
)$(current_TOMATO_V2
) $(ND
) $(current_BUILD_USB
) $(current_BUILD_DESC
)
117 ifeq ($(TOMATO_BUILD
),)
126 @echo
"Building Tomato $(ND) $(current_BUILD_USB) $(current_TOMATO_VER).$(current_TOMATO_V1)$(mips_rev)$(beta)$(current_TOMATO_V2) $(current_BUILD_DESC) $(current_BUILD_NAME) with $(TOMATO_PROFILE_NAME) Profile"
132 @
$(MAKE
) -C router
all
133 @
$(MAKE
) -C router
install
136 @
rm -f image
/tomato-
$(ND
)$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).trx
137 @
rm -f image
/tomato-
$(ND
)$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin
139 ifeq ($(WNR3500LV2
),y
)
140 @echo
"Creating Firmware for Netgear WNR3500L v2 .... "
141 mipsel-uclibc-objcopy
-O binary
-g
$(LINUXDIR
)/vmlinux image
/vmlinux.bin
142 $(WNRTOOL
)/lzma e image
/vmlinux.bin image
/vmlinux.lzma
143 $(WNRTOOL
)/trx
-o image
/tomato-wnr3500lv2.trx image
/vmlinux.lzma
$(SRCBASE
)/router
/mipsel-uclibc
/target.image
144 rm -f image
/vmlinux.bin image
/vmlinux.lzma
145 cd image
&& touch rootfs
146 cd image
&& $(WNRTOOL
)/packet
-k tomato-wnr3500lv2.trx
-f rootfs
-b
$(BOARD_FILE
) -ok kernel_image
-oall kernel_rootfs_image
-or rootfs_image
-i
$(fw_cfg_file
) && rm -f rootfs
&& \
147 cp kernel_rootfs_image.chk tomato-Netgear-3500Lv2-
$(ND
)$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).chk
149 rm -f image
/*image.chk image
/*.trx
153 ifneq ($(current_TOMATO_MIPS32
),r2
)
154 @
rm -f image
/tomato-WRT54
*$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin
155 @
rm -f image
/tomato-WRTSL54
*$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin
156 @
rm -f image
/tomato-WR850G
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin
159 ifeq ($(LINKSYS_E
),y
)
160 @
rm -f image
/tomato-E??????
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin
162 ifeq ($(LINKSYS_E_64k
),y
)
163 @
rm -f image
/tomato-E??????
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin
165 ifeq ($(LINKSYS_E1200v1
),y
)
166 @
rm -f image
/tomato-E1200v1
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin
168 ifeq ($(LINKSYS_E1000v2
),y
)
169 @
rm -f image
/tomato-E1000v2-v21
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin
170 @
rm -f image
/tomato-Cisco-M10v2
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin
173 ifneq ($(NVRAM_SIZE
),60)
174 @
rm -f image
/tomato-F7D????
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin
175 @
rm -f image
/tomato-F5D8235v3
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin
179 @echo
"***********************" `date` "************************" >>fpkg.log
180 @cat router
/shared
/tomato_version
>>fpkg.log
182 @cat router
/target.
info >>fpkg.log
184 ifneq ($(current_TOMATO_MIPS32
),r2
)
185 @btools
/fpkg
-i lzma-loader
/loader.gz
-i
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/vmlinuz
-a
1024 -i router
/mipsel-uclibc
/target.image \
186 -l W54G
,image
/tomato-WRT54G_WRT54GL
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
187 -l W54S
,image
/tomato-WRT54GS
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
188 -l W54s
,image
/tomato-WRT54GSv4
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
189 -l W54U
,image
/tomato-WRTSL54GS
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
190 -m
0x10577050,image
/tomato-WR850G
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
194 ifeq ($(LINKSYS_E
),y
)
195 # Linksys E-series(60k Nvram) images
196 @btools
/fpkg
-i lzma-loader
/loader.gz
-i
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/vmlinuz
-a
1024 -i router
/mipsel-uclibc
/target.image \
197 -l
1550,image
/tomato-E1550
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
198 -l E25X
,image
/tomato-E2500
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
199 -l
3200,image
/tomato-E3200
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
200 -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 \
201 -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 \
202 -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 \
205 ifeq ($(LINKSYS_E_64
),y
)
206 # Linksys E-series(64k Nvram) images
207 @btools
/fpkg
-i lzma-loader
/loader.gz
-i
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/vmlinuz
-a
1024 -i router
/mipsel-uclibc
/target.image \
208 -l E900
,image
/tomato-E900
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
209 -l E122
,image
/tomato-E1200v2
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
210 -l E150
,image
/tomato-E1500
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
213 ifeq ($(LINKSYS_E1000v2
),y
)
214 # Linksys E1000v2/v2.1 images
215 @btools
/fpkg
-i lzma-loader
/loader.gz
-i
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/vmlinuz
-a
1024 -i router
/mipsel-uclibc
/target.image \
216 -l E100
,image
/tomato-E1000v2-v21
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
217 -l M010
,image
/tomato-Cisco-M10v2
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
220 ifeq ($(LINKSYS_E1200v1
),y
)
221 # Linksys E1200v1 images
222 @btools
/fpkg
-i lzma-loader
/loader.gz
-i
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/vmlinuz
-a
1024 -i router
/mipsel-uclibc
/target.image \
223 -l E120
,image
/tomato-E1200v1
$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(V1
)$(mips_rev
)$(beta
)$(V2
)-$(current_BUILD_DESC
).bin \
227 ifneq ($(NVRAM_SIZE
),60)
228 # Create Belkin images
229 @btools
/fpkg
-i lzma-loader
/loader.gz
-i
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/vmlinuz
-a
1024 -i router
/mipsel-uclibc
/target.image \
230 -b
0x20100322,image
/tomato-F7D3301
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
231 -b
0x20090928,image
/tomato-F7D3302
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
232 -b
0x20091006,image
/tomato-F7D4302
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
233 -b
0x00017116,image
/tomato-F5D8235v3
$(current_BUILD_USB
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).bin \
237 # Create generic TRX image
238 @btools
/fpkg
-i lzma-loader
/loader.gz
-i
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/vmlinuz
-a
1024 -i router
/mipsel-uclibc
/target.image \
239 -t image
/tomato-
$(ND
)$(current_BUILD_USB
)$(if
$(filter $(NVRAM_SIZE
),0),,-NVRAM
$(NVRAM_SIZE
)K
)-$(current_TOMATO_VER
).
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
)-$(current_BUILD_DESC
).trx \
242 @cp fpkg.log image
/fpkg-
$(current_TOMATO_V1
)$(mips_rev
)$(beta
)$(current_TOMATO_V2
).log
244 @echo
"-----------------"
245 @echo
`cat router/shared/tomato_version` " ready"
246 @echo
"-----------------"
247 ifneq ($(NOVERSION
),1)
248 @cp router
/shared
/tomato_version router
/shared
/tomato_version_last
249 @btools
/uversion.pl
--bump
256 @touch router
/.config
257 @
rm -f router
/config_
[a-z
]
258 @
rm -f router
/busybox
/config_
[a-z
]
259 @
$(MAKE
) -C router
$@
260 @
-rmdir router
/mipsel-uclibc
265 @
rm -f router
/.config
266 @touch router
/.config
270 @
$(MAKE
) -C
$(LINUXDIR
)/scripts
/squashfs
clean
271 @
$(MAKE
) -C btools
clean
275 mv .config save-config
&& \
276 $(MAKE
) distclean || true
; \
277 cp
-p save-config .config || true
280 @
$(MAKE
) -C router kernel
281 @ls
-l
$(LINUXDIR
)/arch
/mips
/brcm-boards
/bcm947xx
/compressed
/zImage
283 distclean: clean cleanimage cleankernel cleantools
284 ifneq ($(INSIDE_MAK
),1)
285 @
$(MAKE
) -C router
$@ INSIDE_MAK
=1
287 mv router
/busybox
/.config busybox-saved-config || true
288 @
$(MAKE
) -C router
/busybox
distclean
289 @
rm -f router
/busybox
/config_current
290 @cp
-p busybox-saved-config router
/busybox
/.config || true
291 @cp
-p router
/busybox
/.config router
/busybox
/config_current || true
292 @
rm -f router
/config_current
293 @
rm -f router
/.config.cmd router
/.config.old router
/.config
294 @
rm -f router
/libfoo_xref.txt
295 @
rm -f tomato_profile.mak router
/shared
/tomato_profile.h
296 @touch tomato_profile.mak
297 @touch router
/shared
/tomato_profile.h
302 rm -f config_current
; \
303 ln
-s config_base config_current
; \
304 cp
-f config_current .config
305 $(MAKE
) -C
$(LINUXDIR
) oldconfig
306 ifneq ($(CONFIG_LINUX26
),y
)
307 $(MAKE
) -C
$(LINUXDIR
) dep
312 @echo
"$(current_BUILD_DESC)-$(current_BUILD_NAME)-$(TOMATO_PROFILE_NAME) Profile"
316 # The methodology for making the different builds is to
317 # copy the "base" config file to the "target" config file in
318 # the appropriate directory, and then edit it by removing and
319 # inserting the desired configuration lines.
320 # You can't just delete the "whatever=y" line, you must have
321 # a "...is not set" line, or the make oldconfig will stop and ask
324 # Options for "make bin" :
325 # BUILD_DESC (Std|Lite|Ext|...)
331 # NO_CIFS, NO_SSH, NO_ZEBRA, NO_SAMBA, NO_HTTPS, NO_XXTP, NO_LIBOPT, NO_FTP
332 # SAMBA3, OPENVPN, IPV6SUPP, EBTABLES, NTFS, MEDIASRV, BBEXTRAS, USBEXTRAS, BCM57, SLIM
341 if
[ "$(CONFIG_LINUX26)" = "y" ] ||
[ "$(SAMBA3)" = "y" ]; then \
342 sed
-i
"/TCONFIG_SAMBA3/d" $(1); \
343 echo
"TCONFIG_SAMBA3=y" >>$(1); \
345 sed
-i
"/TCONFIG_EMF/d" $(1); \
346 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
347 if
[ "$(SLIM)" = "y" ]; then \
348 echo
"# TCONFIG_EMF is not set" >>$(1); \
350 echo
"TCONFIG_EMF=y" >>$(1); \
353 echo
"# TCONFIG_EMF is not set" >>$(1); \
355 sed
-i
"/TCONFIG_JFFSV1/d" $(1); \
356 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
357 if
[ "$(JFFSv1)" = "y" ]; then \
358 echo
"TCONFIG_JFFSV1=y" >>$(1); \
360 echo
"# TCONFIG_JFFSV1 is not set" >>$(1); \
363 echo
"TCONFIG_JFFSV1=y" >>$(1); \
365 if
[ "$(USB)" = "USB" ]; then \
366 sed
-i
"/TCONFIG_USB is not set/d" $(1); \
367 echo
"TCONFIG_USB=y" >>$(1); \
368 if
[ "$(USBEXTRAS)" = "y" ]; then \
369 sed
-i
"/TCONFIG_USB_EXTRAS/d" $(1); \
370 echo
"TCONFIG_USB_EXTRAS=y" >>$(1); \
372 if
[ "$(NTFS)" = "y" ]; then \
373 sed
-i
"/TCONFIG_NTFS/d" $(1); \
374 echo
"TCONFIG_NTFS=y" >>$(1); \
376 if
[ "$(MEDIASRV)" = "y" ]; then \
377 sed
-i
"/TCONFIG_MEDIA_SERVER/d" $(1); \
378 echo
"TCONFIG_MEDIA_SERVER=y" >>$(1); \
381 sed
-i
"/TCONFIG_USB=y/d" $(1); \
382 echo
"# TCONFIG_USB is not set" >>$(1); \
384 if
[ "$(NO_SAMBA)" = "y" ]; then \
385 sed
-i
"/TCONFIG_SAMBASRV/d" $(1); \
386 echo
"# TCONFIG_SAMBASRV is not set" >>$(1); \
388 if
[ "$(NO_ZEBRA)" = "y" ]; then \
389 sed
-i
"/TCONFIG_ZEBRA/d" $(1); \
390 echo
"# TCONFIG_ZEBRA is not set" >>$(1); \
392 if
[ "$(NO_JFFS)" = "y" ]; then \
393 sed
-i
"/TCONFIG_JFFS2/d" $(1); \
394 echo
"# TCONFIG_JFFS2 is not set" >>$(1); \
395 sed
-i
"/TCONFIG_JFFSV1/d" $(1); \
396 echo
"# TCONFIG_JFFSV1 is not set" >>$(1); \
398 if
[ "$(NO_CIFS)" = "y" ]; then \
399 sed
-i
"/TCONFIG_CIFS/d" $(1); \
400 echo
"# TCONFIG_CIFS is not set" >>$(1); \
402 if
[ "$(NO_FTP)" = "y" ]; then \
403 sed
-i
"/TCONFIG_FTP/d" $(1); \
404 echo
"# TCONFIG_FTP is not set" >>$(1); \
406 if
[ "$(NO_SSH)" = "y" ]; then \
407 sed
-i
"/TCONFIG_SSH/d" $(1); \
408 echo
"# TCONFIG_SSH is not set" >>$(1); \
410 if
[ "$(NO_HTTPS)" = "y" ]; then \
411 sed
-i
"/TCONFIG_HTTPS/d" $(1); \
412 echo
"# TCONFIG_HTTPS is not set" >>$(1); \
414 if
[ "$(NO_XXTP)" = "y" ]; then \
415 sed
-i
"/TCONFIG_L2TP/d" $(1); \
416 echo
"# TCONFIG_L2TP is not set" >>$(1); \
417 sed
-i
"/TCONFIG_PPTP/d" $(1); \
418 echo
"# TCONFIG_PPTP is not set" >>$(1); \
420 if
[ "$(NO_LIBOPT)" = "y" ]; then \
421 sed
-i
"/TCONFIG_OPTIMIZE_SHARED_LIBS/d" $(1); \
422 echo
"# TCONFIG_OPTIMIZE_SHARED_LIBS is not set" >>$(1); \
424 if
[ "$(EBTABLES)" = "y" ]; then \
425 sed
-i
"/TCONFIG_EBTABLES/d" $(1); \
426 echo
"TCONFIG_EBTABLES=y" >>$(1); \
428 if
[ "$(IPV6SUPP)" = "y" ]; then \
429 sed
-i
"/TCONFIG_IPV6/d" $(1); \
430 echo
"TCONFIG_IPV6=y" >>$(1); \
432 if
[ "$(NOCAT)" = "y" ]; then \
433 sed
-i
"/TCONFIG_NOCAT/d" $(1); \
434 echo
"TCONFIG_NOCAT=y" >>$(1); \
436 if
[ "$(OPENVPN)" = "y" ]; then \
437 sed
-i
"/TCONFIG_LZO/d" $(1); \
438 echo
"TCONFIG_LZO=y" >>$(1); \
439 sed
-i
"/TCONFIG_OPENVPN/d" $(1); \
440 echo
"TCONFIG_OPENVPN=y" >>$(1); \
441 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
442 sed
-i
"/TCONFIG_FTP_SSL/d" $(1); \
443 echo
"TCONFIG_FTP_SSL=y" >>$(1); \
446 if
[ "$(HFS)" = "y" ]; then \
447 sed
-i
"/TCONFIG_HFS/d" $(1); \
448 echo
"TCONFIG_HFS=y" >>$(1); \
450 if
[ "$(SNMP)" = "y" ]; then \
451 sed
-i
"/TCONFIG_SNMP/d" $(1); \
452 echo
"TCONFIG_SNMP=y" >>$(1); \
454 if
[ "$(USERPPTP)" = "y" ]; then \
455 sed
-i
"/TCONFIG_USERPPTP/d" $(1); \
456 echo
"TCONFIG_USERPPTP=y" >>$(1); \
458 if
[ "$(VLAN)" = "y" ]; then \
459 sed
-i
"/TCONFIG_VLAN/d" $(1); \
460 echo
"TCONFIG_VLAN=y" >>$(1); \
462 if
[ "$(PPTPD)" = "y" ]; then \
463 sed
-i
"/TCONFIG_PPTPD/d" $(1); \
464 echo
"TCONFIG_PPTPD=y" >>$(1); \
466 if
[ "$(NVRAM_64K)" = "y" ]; then \
467 sed
-i
"/TCONFIG_NVRAM_64K/d" $(1); \
468 echo
"TCONFIG_NVRAM_64K=y" >>$(1); \
470 if
[ "$(TCPDUMP)" = "y" ]; then \
471 sed
-i
"/TCONFIG_TCPDUMP/d" $(1); \
472 echo
"TCONFIG_TCPDUMP=y" >>$(1); \
477 define BusyboxOptions
479 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
480 sed
-i
"/CONFIG_FEATURE_2_4_MODULES/d" $(1); \
481 echo
"# CONFIG_FEATURE_2_4_MODULES is not set" >>$(1); \
482 sed
-i
"/CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT/d" $(1); \
483 echo
"CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y" >>$(1); \
484 sed
-i
"/CONFIG_FEATURE_DEVFS/d" $(1); \
485 echo
"# CONFIG_FEATURE_DEVFS is not set" >>$(1); \
486 sed
-i
"/CONFIG_MKNOD/d" $(1); \
487 echo
"CONFIG_MKNOD=y" >>$(1); \
488 sed
-i
"/CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE/d" $(1); \
489 echo
"CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=512" >>$(1); \
491 if
[ "$(NO_CIFS)" = "y" ]; then \
492 sed
-i
"/CONFIG_FEATURE_MOUNT_CIFS/d" $(1); \
493 echo
"# CONFIG_FEATURE_MOUNT_CIFS is not set" >>$(1); \
495 if
[ "$(BBEXTRAS)" = "y" ]; then \
496 sed
-i
"/CONFIG_SENDMAIL/d" $(1); \
497 echo
"CONFIG_SENDMAIL=y" >>$(1); \
498 sed
-i
"/CONFIG_FEATURE_SORT_BIG/d" $(1); \
499 echo
"CONFIG_FEATURE_SORT_BIG=y" >>$(1); \
500 sed
-i
"/CONFIG_FTPPUT/d" $(1); \
501 echo
"CONFIG_FTPPUT=y" >>$(1); \
502 sed
-i
"/CONFIG_FTPGET/d" $(1); \
503 echo
"CONFIG_FTPGET=y" >>$(1); \
504 sed
-i
"/CONFIG_CLEAR/d" $(1); \
505 echo
"CONFIG_CLEAR=y" >>$(1); \
506 sed
-i
"/CONFIG_NICE/d" $(1); \
507 echo
"CONFIG_NICE=y" >>$(1); \
508 sed
-i
"/CONFIG_SETCONSOLE/d" $(1); \
509 echo
"CONFIG_SETCONSOLE=y" >>$(1); \
510 sed
-i
"/CONFIG_MKFIFO/d" $(1); \
511 echo
"CONFIG_MKFIFO=y" >>$(1); \
513 if
[ "$(USB)" = "USB" ]; then \
514 if
[ "$(USBEXTRAS)" = "y" ]; then \
515 sed
-i
"/CONFIG_E2FSCK/d" $(1); \
516 echo
"CONFIG_E2FSCK=y" >>$(1); \
517 sed
-i
"/CONFIG_MKE2FS/d" $(1); \
518 echo
"CONFIG_MKE2FS=y" >>$(1); \
519 sed
-i
"/CONFIG_FDISK/d" $(1); \
520 echo
"CONFIG_FDISK=y" >>$(1); \
521 sed
-i
"/CONFIG_FEATURE_FDISK_WRITABLE/d" $(1); \
522 echo
"CONFIG_FEATURE_FDISK_WRITABLE=y" >>$(1); \
523 sed
-i
"/CONFIG_MKFS_VFAT/d" $(1); \
524 echo
"CONFIG_MKFS_VFAT=y" >>$(1); \
525 sed
-i
"/CONFIG_MKSWAP/d" $(1); \
526 echo
"CONFIG_MKSWAP=y" >>$(1); \
527 sed
-i
"/CONFIG_FLOCK/d" $(1); \
528 echo
"CONFIG_FLOCK=y" >>$(1); \
529 sed
-i
"/CONFIG_FSYNC/d" $(1); \
530 echo
"CONFIG_FSYNC=y" >>$(1); \
531 sed
-i
"/CONFIG_TUNE2FS/d" $(1); \
532 echo
"CONFIG_TUNE2FS=y" >>$(1); \
533 sed
-i
"/CONFIG_E2LABEL/d" $(1); \
534 echo
"CONFIG_E2LABEL=y" >>$(1); \
535 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
536 sed
-i
"/CONFIG_LSUSB/d" $(1); \
537 echo
"CONFIG_LSUSB=y" >>$(1); \
538 sed
-i
"/CONFIG_FEATURE_WGET_STATUSBAR/d" $(1); \
539 echo
"CONFIG_FEATURE_WGET_STATUSBAR=y" >>$(1); \
540 sed
-i
"/CONFIG_FEATURE_VERBOSE_USAGE/d" $(1); \
541 echo
"CONFIG_FEATURE_VERBOSE_USAGE=y" >>$(1); \
545 sed
-i
"/CONFIG_FEATURE_MOUNT_LOOP/d" $(1); \
546 echo
"# CONFIG_FEATURE_MOUNT_LOOP is not set" >>$(1); \
547 sed
-i
"/CONFIG_FEATURE_DEVFS/d" $(1); \
548 echo
"# CONFIG_FEATURE_DEVFS is not set" >>$(1); \
549 sed
-i
"/CONFIG_FEATURE_MOUNT_LABEL/d" $(1); \
550 echo
"# CONFIG_FEATURE_MOUNT_LABEL is not set" >>$(1); \
551 sed
-i
"/CONFIG_FEATURE_MOUNT_FSTAB/d" $(1); \
552 echo
"# CONFIG_FEATURE_MOUNT_FSTAB is not set" >>$(1); \
553 sed
-i
"/CONFIG_VOLUMEID/d" $(1); \
554 echo
"# CONFIG_VOLUMEID is not set" >>$(1); \
555 sed
-i
"/CONFIG_BLKID/d" $(1); \
556 echo
"# CONFIG_BLKID is not set" >>$(1); \
557 sed
-i
"/CONFIG_SWAPONOFF/d" $(1); \
558 echo
"# CONFIG_SWAPONOFF is not set" >>$(1); \
559 sed
-i
"/CONFIG_CHROOT/d" $(1); \
560 echo
"# CONFIG_CHROOT is not set" >>$(1); \
561 sed
-i
"/CONFIG_PIVOT_ROOT/d" $(1); \
562 echo
"# CONFIG_PIVOT_ROOT is not set" >>$(1); \
563 sed
-i
"/CONFIG_TRUE/d" $(1); \
564 echo
"# CONFIG_TRUE is not set" >>$(1); \
566 if
[ "$(IPV6SUPP)" = "y" ]; then \
567 sed
-i
"/CONFIG_FEATURE_IPV6/d" $(1); \
568 echo
"CONFIG_FEATURE_IPV6=y" >>$(1); \
569 sed
-i
"/CONFIG_PING6/d" $(1); \
570 echo
"CONFIG_PING6=y" >>$(1); \
571 sed
-i
"/CONFIG_TRACEROUTE6/d" $(1); \
572 echo
"CONFIG_TRACEROUTE6=y" >>$(1); \
573 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
574 sed
-i
"/CONFIG_FEATURE_UDHCP_RFC5969/d" $(1); \
575 echo
"CONFIG_FEATURE_UDHCP_RFC5969=y" >>$(1); \
578 if
[ "$(SLIM)" = "y" ]; then \
579 sed
-i
"/CONFIG_AWK/d" $(1); \
580 echo
"# CONFIG_AWK is not set" >>$(1); \
581 sed
-i
"/CONFIG_BASENAME/d" $(1); \
582 echo
"# CONFIG_BASENAME is not set" >>$(1); \
583 sed
-i
"/CONFIG_FEATURE_DEVFS/d" $(1); \
584 echo
"# CONFIG_FEATURE_DEVFS is not set" >>$(1); \
585 sed
-i
"/CONFIG_BLKID/d" $(1); \
586 echo
"# CONFIG_BLKID is not set" >>$(1); \
587 sed
-i
"/CONFIG_TELNET=y/d" $(1); \
588 echo
"# CONFIG_TELNET is not set" >>$(1); \
589 sed
-i
"/CONFIG_ARPING/d" $(1); \
590 echo
"# CONFIG_ARPING is not set" >>$(1); \
591 sed
-i
"/CONFIG_FEATURE_LS_COLOR/d" $(1); \
592 echo
"# CONFIG_FEATURE_LS_COLOR is not set" >>$(1); \
593 sed
-i
"/CONFIG_CHOWN/d" $(1); \
594 echo
"# CONFIG_CHOWN is not set" >>$(1); \
596 sed
-i
"/CONFIG_FEATURE_LS_COLOR/d" $(1); \
597 echo
"CONFIG_FEATURE_LS_COLOR=y" >>$(1); \
598 sed
-i
"/CONFIG_FEATURE_LS_COLOR_IS_DEFAULT/d" $(1); \
599 echo
"CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y" >>$(1); \
606 sed
-i
"/CONFIG_NVRAM_SIZE/d" $(1); \
607 echo
"CONFIG_NVRAM_SIZE="$(NVRAM_SIZE
) >>$(1); \
608 sed
-i
"/CONFIG_CC_OPTIMIZE_FOR_SIZE/d" $(1); \
609 if
[ "$(KERN_SIZE_OPT)" = "y" ]; then \
610 echo
"CONFIG_CC_OPTIMIZE_FOR_SIZE=y" >>$(1); \
612 echo
"# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set" >>$(1); \
614 if
[ "$(CONFIG_LINUX26)" = "y" ] && [ "$(MIPS32)" = "r2" ]; then \
615 sed
-i
"/CONFIG_CPU_MIPS32_R1/d" $(1); \
616 echo
"# CONFIG_CPU_MIPS32_R1 is not set" >>$(1); \
617 sed
-i
"/CONFIG_CPU_MIPS32_R2/d" $(1); \
618 echo
"CONFIG_CPU_MIPS32_R2=y" >>$(1); \
619 sed
-i
"/CONFIG_CPU_MIPSR1/d" $(1); \
620 echo
"CONFIG_CPU_MIPSR2=y" >>$(1); \
621 if
[ "$(WNR3500LV2)" = "y" ]; then \
622 sed
-i
"/CONFIG_MTD_NFLASH/d" $(1); \
623 echo
"CONFIG_MTD_NFLASH=y" >>$(1); \
626 if
[ "$(USB)" = "" ]; then \
627 sed
-i
"/CONFIG_EFI_PARTITION/d" $(1); \
628 echo
"# CONFIG_EFI_PARTITION is not set" >>$(1); \
630 if
[ "$(IPV6SUPP)" = "y" ]; then \
631 sed
-i
"/CONFIG_IPV6 is not set/d" $(1); \
632 echo
"CONFIG_IPV6=y" >>$(1); \
633 sed
-i
"/CONFIG_IP6_NF_IPTABLES/d" $(1); \
634 echo
"CONFIG_IP6_NF_IPTABLES=y" >>$(1); \
635 sed
-i
"/CONFIG_IP6_NF_MATCH_RT/d" $(1); \
636 echo
"CONFIG_IP6_NF_MATCH_RT=y" >>$(1); \
637 sed
-i
"/CONFIG_IP6_NF_FILTER/d" $(1); \
638 echo
"CONFIG_IP6_NF_FILTER=m" >>$(1); \
639 sed
-i
"/CONFIG_IP6_NF_TARGET_LOG/d" $(1); \
640 echo
"CONFIG_IP6_NF_TARGET_LOG=m" >>$(1); \
641 sed
-i
"/CONFIG_IP6_NF_TARGET_REJECT/d" $(1); \
642 echo
"CONFIG_IP6_NF_TARGET_REJECT=m" >>$(1); \
643 sed
-i
"/CONFIG_IP6_NF_MANGLE/d" $(1); \
644 echo
"CONFIG_IP6_NF_MANGLE=m" >>$(1); \
645 if
[ "$(CONFIG_LINUX26)" = "y" ]; then \
646 sed
-i
"/CONFIG_NF_CONNTRACK_IPV6/d" $(1); \
647 echo
"CONFIG_NF_CONNTRACK_IPV6=m" >>$(1); \
648 sed
-i
"/CONFIG_NETFILTER_XT_MATCH_HL/d" $(1); \
649 echo
"CONFIG_NETFILTER_XT_MATCH_HL=m" >>$(1); \
650 sed
-i
"/CONFIG_IPV6_ROUTER_PREF/d" $(1); \
651 echo
"CONFIG_IPV6_ROUTER_PREF=y" >>$(1); \
652 sed
-i
"/CONFIG_IPV6_SIT/d" $(1); \
653 echo
"CONFIG_IPV6_SIT=m" >>$(1); \
654 sed
-i
"/CONFIG_IPV6_SIT_6RD/d" $(1); \
655 echo
"CONFIG_IPV6_SIT_6RD=y" >>$(1); \
656 sed
-i
"/CONFIG_IPV6_MULTIPLE_TABLES/d" $(1); \
657 echo
"CONFIG_IPV6_MULTIPLE_TABLES=y" >>$(1); \
658 sed
-i
"/CONFIG_IP6_NF_RAW/d" $(1); \
659 echo
"CONFIG_IP6_NF_RAW=m" >>$(1); \
660 sed
-i
"/CONFIG_IPV6_OPTIMISTIC_DAD/d" $(1); \
661 echo
"CONFIG_IPV6_OPTIMISTIC_DAD=y" >>$(1); \
662 sed
-i
"/CONFIG_IPV6_MROUTE/d" $(1); \
663 echo
"CONFIG_IPV6_MROUTE=y" >>$(1); \
664 sed
-i
"/CONFIG_IP6_NF_TARGET_ROUTE/d" $(1); \
665 echo
"CONFIG_IP6_NF_TARGET_ROUTE=m" >>$(1); \
667 sed
-i
"/CONFIG_IP6_NF_CONNTRACK/d" $(1); \
668 echo
"CONFIG_IP6_NF_CONNTRACK=m" >>$(1); \
669 sed
-i
"/CONFIG_IP6_NF_MATCH_HL/d" $(1); \
670 echo
"CONFIG_IP6_NF_MATCH_HL=m" >>$(1); \
671 sed
-i
"/CONFIG_IP6_NF_FTP/d" $(1); \
672 echo
"CONFIG_IP6_NF_FTP=m" >>$(1); \
673 sed
-i
"/CONFIG_IP6_NF_MATCH_LIMIT/d" $(1); \
674 echo
"CONFIG_IP6_NF_MATCH_LIMIT=m" >>$(1); \
675 sed
-i
"/CONFIG_IP6_NF_MATCH_CONDITION/d" $(1); \
676 echo
"CONFIG_IP6_NF_MATCH_CONDITION=m" >>$(1); \
677 sed
-i
"/CONFIG_IP6_NF_MATCH_MAC/d" $(1); \
678 echo
"CONFIG_IP6_NF_MATCH_MAC=m" >>$(1); \
679 sed
-i
"/CONFIG_IP6_NF_MATCH_MULTIPORT/d" $(1); \
680 echo
"CONFIG_IP6_NF_MATCH_MULTIPORT=m" >>$(1); \
681 sed
-i
"/CONFIG_IP6_NF_MATCH_MARK/d" $(1); \
682 echo
"CONFIG_IP6_NF_MATCH_MARK=m" >>$(1); \
683 sed
-i
"/CONFIG_IP6_NF_MATCH_LENGTH/d" $(1); \
684 echo
"CONFIG_IP6_NF_MATCH_LENGTH=m" >>$(1); \
685 sed
-i
"/CONFIG_IP6_NF_MATCH_STATE/d" $(1); \
686 echo
"CONFIG_IP6_NF_MATCH_STATE=m" >>$(1); \
687 sed
-i
"/CONFIG_IP6_NF_TARGET_MARK/d" $(1); \
688 echo
"CONFIG_IP6_NF_TARGET_MARK=m" >>$(1); \
689 sed
-i
"/CONFIG_IP6_NF_TARGET_TCPMSS/d" $(1); \
690 echo
"CONFIG_IP6_NF_TARGET_TCPMSS=m" >>$(1); \
691 sed
-i
"/CONFIG_IP6_NF_TARGET_ROUTE/d" $(1); \
692 echo
"CONFIG_IP6_NF_TARGET_ROUTE=m" >>$(1); \
695 sed
-i
"/CONFIG_BCM57XX/d" $(1); \
696 if
[ "$(BCM57)" = "y" ]; then \
697 echo
"CONFIG_BCM57XX=m" >>$(1); \
699 echo
"# CONFIG_BCM57XX is not set" >>$(1); \
701 if
[ "$(CONFIG_LINUX26)" = "y" ] && [ "$(EBTABLES)" = "y" ]; then \
702 sed
-i
"/CONFIG_BRIDGE_NF_EBTABLES/d" $(1); \
703 echo
"CONFIG_BRIDGE_NF_EBTABLES=m" >>$(1); \
704 if
[ "$(IPV6SUPP)" = "y" ]; then \
705 sed
-i
"/CONFIG_BRIDGE_EBT_IP6/d" $(1); \
706 echo
"CONFIG_BRIDGE_EBT_IP6=m" >>$(1); \
709 sed
-i
"/CONFIG_NVRAM_64K/d" $(1); \
710 if
[ "$(NVRAM_64K)" = "y" ]; then \
711 echo
"CONFIG_NVRAM_64K=y" >>$(1); \
713 echo
"# CONFIG_NVRAM_64K is not set" >>$(1); \
721 @echo
$@
" is not a valid target!"
724 @cp router
/config_base router
/config_
$(lowercase_B
)
725 @cp router
/busybox
/config_base router
/busybox
/config_
$(lowercase_B
)
726 @cp
$(LINUXDIR
)/config_base
$(LINUXDIR
)/config_
$(lowercase_B
)
728 $(call RouterOptions
, router
/config_
$(lowercase_B
))
729 $(call KernelConfig
, $(LINUXDIR
)/config_
$(lowercase_B
))
730 $(call BusyboxOptions
, router
/busybox
/config_
$(lowercase_B
))
732 @
$(MAKE
) setprofile N
=$(TPROFILE
) B
=$(B
) DESC
="$(BUILD_DESC)" USB
="$(USB)" MIPS32
="${MIPS32}" V1
="${V1}" V2
="${V2}"
735 ## Make the "normal" build
737 @
$(MAKE
) bin B
=A BUILD_DESC
="Std" USB
="USB" VLAN
="$(VLAN)" SNMP
=y
739 ## Make the "normal but without SSH" build
741 @
$(MAKE
) bin NO_SSH
=y B
=B BUILD_DESC
="No SSH" USB
="USB" VLAN
="$(VLAN)" SNMP
=y
743 ## Make the "normal but without CIFS" build
745 @
$(MAKE
) bin NO_CIFS
=y B
=C BUILD_DESC
="No CIFS" USB
="USB" VLAN
="$(VLAN)" SNMP
=y
747 ## Make the "normal but without SAMBA" (Lite) build
749 ifeq ($(CONFIG_LINUX26
),y
)
750 @
$(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)"
752 @
$(MAKE
) bin NO_SAMBA
=y SLIM
=y B
=D BUILD_DESC
="Lite" USB
="USB" VLAN
="$(VLAN)" SNMP
="$(SNMP)"
755 ## Make the "normal (with NTFS support) + VPN" build
757 ifeq ($(CONFIG_LINUX26
),y
)
758 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y PPTPD
=y NTFS
=y BBEXTRAS
=y USBEXTRAS
=y EBTABLES
=y NO_LIBOPT
=y MEDIASRV
=y IPV6SUPP
=y B
=E BUILD_DESC
="$(VPN)" USB
="USB" VLAN
="$(VLAN)" SNMP
=y TCPDUMP
="$(TCPDUMP)"
760 # @$(MAKE) bin OPENVPN=y USERPPTP=y PPTPD=y NTFS=y B=E BUILD_DESC="$(VPN)" USB="USB" VLAN="$(VLAN)"
761 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y PPTPD
=y BBEXTRAS
=y USBEXTRAS
=y NTFS
=y B
=E BUILD_DESC
="$(VPN)" USB
="USB" SNMP
=y VLAN
="$(VLAN)" TCPDUMP
="$(TCPDUMP)"
764 ## Make the "Mini: no USB, no CIFS, no Zebra" build - targeted for Netgear routers
766 @
$(MAKE
) bin JFFSv1
=y NO_CIFS
=y NO_SSH
=y NO_ZEBRA
=y SLIM
=y B
=F BUILD_DESC
="Mini" USB
="" VLAN
="$(VLAN)"
768 ## Make the "Tiny: no JFFS, no USB, no CIFS, no Zebra" build - targeted for cheapskate routers
770 @
$(MAKE
) bin NO_CIFS
=y NO_SSH
=y NO_JFFS
=y NO_ZEBRA
=y SLIM
=y B
=FS BUILD_DESC
="Tiny" USB
="" VLAN
="$(VLAN)"
772 ## Make the "No USB with IPv6, no Zebra" build - for 4MB routers
774 @
$(MAKE
) bin JFFSv1
=y NO_CIFS
=y NO_SSH
=y NO_ZEBRA
=y IPV6SUPP
=y B
=I BUILD_DESC
="MiniIPv6" USB
="" VLAN
="$(VLAN)"
776 ## Make the "No USB with IPv6, no Zebra, with VPN" build - for 4MB routers
777 ifeq ($(CONFIG_LINUX26
),y
)
779 @
$(MAKE
) bin JFFSv1
=y NO_CIFS
=y NO_SSH
=y NO_XXTP
=y SLIM
=y NO_SAMBA
=y NO_ZEBRA
=y IPV6SUPP
=y OPENVPN
=y USERPPTP
=y NO_LIBOPT
=y B
=J BUILD_DESC
="MiniIPv6-VPN" USB
="" VLAN
="$(VLAN)" SNMP
="$(SNMP)"
782 ## Make the "normal with Extras and NTFS" build
784 ifeq ($(CONFIG_LINUX26
),y
)
785 @
$(MAKE
) bin NTFS
=y BBEXTRAS
=y USBEXTRAS
=y EBTABLES
=y NO_LIBOPT
=y MEDIASRV
=y IPV6SUPP
=y B
=M BUILD_DESC
="Ext" USB
="USB" VLAN
="$(VLAN)" SNMP
=y USERPPTP
=y PPTPD
=y TCPDUMP
="$(TCPDUMP)"
787 @
$(MAKE
) bin NTFS
=y BBEXTRAS
=y USBEXTRAS
=y B
=M BUILD_DESC
="Ext" USB
="USB" VLAN
="$(VLAN)" SNMP
=y USERPPTP
=y PPTPD
=y TCPDUMP
="$(TCPDUMP)"
791 ## Make the "normal (with NTFS support) + VPN + NOCAT" build
793 ifeq ($(CONFIG_LINUX26
),y
)
794 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y PPTPD
=y NTFS
=y BBEXTRAS
=y USBEXTRAS
=y EBTABLES
=y NO_LIBOPT
=y MEDIASRV
=y IPV6SUPP
=y B
=NC BUILD_DESC
="$(VPN)" USB
="USB" SNMP
=y VLAN
="$(VLAN)" NOCAT
=y TCPDUMP
="$(TCPDUMP)" BUILD_DESC
+="-$(NC)"
796 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y PPTPD
=y NTFS
=y B
=NC BUILD_DESC
="$(VPN)" USB
="USB" VLAN
="$(VLAN)" NOCAT
=y TCPDUMP
="$(TCPDUMP)" BUILD_DESC
+=" $(NC)"
800 ## Make the "Mini: no USB, + NOCAT" build - for 4MB routers
802 @
$(MAKE
) bin JFFSv1
=y NOCAT
=y B
=NCM BUILD_DESC
="Mini-NOCAT" USB
="" VLAN
="$(VLAN)"
805 ## Make the "normal" build + NOCAT
807 @
$(MAKE
) bin NOCAT
=y B
=NCS BUILD_DESC
="Std-NOCAT" USB
="USB" SNMP
=y VLAN
="$(VLAN)" TCPDUMP
="$(TCPDUMP)"
810 ## Make the "No USB" build
812 ifeq ($(CONFIG_LINUX26
),y
)
813 @
$(MAKE
) bin JFFSv1
=y
$(if
$(filter r2
, $(MIPS32
)),,BCM57
=y
) B
=S BUILD_DESC
="Std" USB
="" VLAN
="$(VLAN)" TCPDUMP
="$(TCPDUMP)"
815 @
$(MAKE
) bin BBEXTRAS
=y BCM57
=y B
=S BUILD_DESC
="Std" USB
="" VLAN
="$(VLAN)" TCPDUMP
="$(TCPDUMP)"
819 ## Make the "No USB with Extras" build (K26 only, for 8MB flash)
820 ifeq ($(CONFIG_LINUX26
),y
)
822 @
$(MAKE
) bin B
=T USB
="" BBEXTRAS
=y EBTABLES
=y NO_LIBOPT
=y
$(if
$(filter r2
, $(MIPS32
)),,BCM57
=y
) IPV6SUPP
=y BUILD_DESC
="Std" SNMP
=y VLAN
="$(VLAN)"
823 ## Make the "No USB with OpenVPN and Extras" build (K26 only, for 8MB flash)
825 @
$(MAKE
) bin B
=U USB
="" BBEXTRAS
=y EBTABLES
=y NO_LIBOPT
=y
$(if
$(filter r2
, $(MIPS32
)),,BCM57
=y
) IPV6SUPP
=y OPENVPN
=y USERPPTP
=y BUILD_DESC
="$(VPN)" SNMP
=y VLAN
="$(VLAN)"
828 ## Make the "VPN with no USB support" build
830 ifeq ($(CONFIG_LINUX26
),y
)
831 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y PPTPD
=y NO_JFFS
=y BCM57
=y B
=V BUILD_DESC
="$(VPN)" USB
="" VLAN
="$(VLAN)" TCPDUMP
="$(TCPDUMP)" TCPDUMP
="$(TCPDUMP)"
833 @
$(MAKE
) bin OPENVPN
=y PPTPD
=y BBEXTRAS
=y B
=V BUILD_DESC
="$(VPN)" USB
="" SNMP
=y VLAN
="$(VLAN)" TCPDUMP
="$(TCPDUMP)" TCPDUMP
="$(TCPDUMP)"
836 ## Make the "Small VPN with no USB support" build
838 ifeq ($(CONFIG_LINUX26
),y
)
839 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y PPTPD
=y NO_JFFS
=y NO_CIFS
=y B
=VS BUILD_DESC
="SmallVPN" USB
=""
841 @
$(MAKE
) bin OPENVPN
=y USERPPTP
=y PPTPD
=y NO_JFFS
=y NO_CIFS
=y BCM57
=y B
=VS BUILD_DESC
="SmallVPN" USB
=""
845 ## Make Mips32r2 builds
866 @
$(MAKE
) f MIPS32
=r2 BELKIN
=y
869 @
$(MAKE
) fs MIPS32
=r2
884 @
$(MAKE
) nc MIPS32
=r2
902 @
$(MAKE
) vs MIPS32
=r2
904 #Linksys E-Series with 60K Nvram Builds
907 @
$(MAKE
) r2a NVRAM_SIZE
=60 LINKSYS_E
=y
910 @
$(MAKE
) r2b NVRAM_SIZE
=60 LINKSYS_E
=y
913 @
$(MAKE
) r2c NVRAM_SIZE
=60 LINKSYS_E
=y
916 @
$(MAKE
) r2e NVRAM_SIZE
=60 LINKSYS_E
=y
919 @
$(MAKE
) r2m NVRAM_SIZE
=60 LINKSYS_E
=y
922 @
$(MAKE
) r2n NVRAM_SIZE
=60 LINKSYS_E
=y
925 @
$(MAKE
) r2nc NVRAM_SIZE
=60 LINKSYS_E
=y
928 @
$(MAKE
) r2o NVRAM_SIZE
=60 LINKSYS_E
=y
931 @
$(MAKE
) r2r NVRAM_SIZE
=60 LINKSYS_E
=y
934 @
$(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"
937 @
$(MAKE
) r2v NVRAM_SIZE
=60 LINKSYS_E
=y
940 #Linksys E-Series with 64K Nvram Builds
943 @
$(MAKE
) r2a NVRAM_SIZE
=64 LINKSYS_E_64
=y
946 @
$(MAKE
) r2b NVRAM_SIZE
=64 LINKSYS_E_64
=y
949 @
$(MAKE
) r2c NVRAM_SIZE
=64 LINKSYS_E_64
=y
952 @
$(MAKE
) r2e NVRAM_SIZE
=64 LINKSYS_E_64
=y
955 @
$(MAKE
) r2m NVRAM_SIZE
=64 LINKSYS_E_64
=y
958 @
$(MAKE
) r2n NVRAM_SIZE
=64 LINKSYS_E_64
=y
961 @
$(MAKE
) r2nc NVRAM_SIZE
=64 LINKSYS_E_64
=y
964 @
$(MAKE
) r2o NVRAM_SIZE
=64 LINKSYS_E_64
=y
967 @
$(MAKE
) r2r NVRAM_SIZE
=64 LINKSYS_E_64
=y
970 @
$(MAKE
) bin MIPS32
=r2 B
=S USB
="" NVRAM_SIZE
=64 LINKSYS_E_64
=y BBEXTRAS
=y EBTABLES
=y NO_LIBOPT
=y IPV6SUPP
=y BUILD_DESC
="Std"
973 @
$(MAKE
) r2v NVRAM_SIZE
=64 LINKSYS_E_64
=y
976 #Linksys E-Series with 4MB Flash
979 @
$(MAKE
) r2i NVRAM_SIZE
=32 LINKSYS_E1000v2
=y
982 @
$(MAKE
) r2f NVRAM_SIZE
=32 LINKSYS_E1000v2
=y
985 @
$(MAKE
) r2i NVRAM_SIZE
=64 LINKSYS_E1200v1
=y
988 @
$(MAKE
) r2f NVRAM_SIZE
=64 LINKSYS_E1200v1
=y
991 #Builds for WNR3500L v2
994 @
$(MAKE
) e MIPS32
=r2 WNR3500LV2
=y NO_JFFS
=y
998 echo
'#ifndef TOMATO_PROFILE' > router
/shared
/tomato_profile.h
999 echo
'#define TOMATO_$(N) 1' >> router
/shared
/tomato_profile.h
1000 echo
'#define PROFILE_G 1' >> router
/shared
/tomato_profile.h
1001 echo
'#define PROFILE_N 2' >> router
/shared
/tomato_profile.h
1002 echo
'#define TOMATO_PROFILE PROFILE_$(N)' >> router
/shared
/tomato_profile.h
1003 echo
'#define TOMATO_PROFILE_NAME "$(N)"' >> router
/shared
/tomato_profile.h
1004 echo
'#define TOMATO_BUILD_NAME "$(B)"' >> router
/shared
/tomato_profile.h
1005 echo
'#define TOMATO_BUILD_DESC "$(EXTRA_PREDESC)$(DESC)$(EXTRA_POSTDESC)"' >> router
/shared
/tomato_profile.h
1006 echo
'#ifndef CONFIG_NVRAM_SIZE' >> router
/shared
/tomato_profile.h
1007 echo
'#define CONFIG_NVRAM_SIZE $(NVRAM_SIZE)' >> router
/shared
/tomato_profile.h
1008 echo
'#endif' >> router
/shared
/tomato_profile.h
1009 echo
'#endif' >> router
/shared
/tomato_profile.h
1011 echo
'TOMATO_$(N) = 1' > tomato_profile.mak
1012 echo
'PROFILE_G = 1' >> tomato_profile.mak
1013 echo
'PROFILE_N = 2' >> tomato_profile.mak
1014 echo
'TOMATO_PROFILE = $$(PROFILE_$(N))' >> tomato_profile.mak
1015 echo
'TOMATO_PROFILE_NAME = "$(N)"' >> tomato_profile.mak
1016 echo
'TOMATO_BUILD = "$(B)"' >> tomato_profile.mak
1017 echo
'TOMATO_BUILD_NAME = "$(B)"' >> tomato_profile.mak
1018 echo
'TOMATO_BUILD_DESC = "$(EXTRA_PREDESC)$(DESC)$(EXTRA_POSTDESC)"' >> tomato_profile.mak
1019 echo
'TOMATO_PROFILE_L = $(lowercase_N)' >> tomato_profile.mak
1020 echo
'TOMATO_PROFILE_U = $(uppercase_N)' >> tomato_profile.mak
1021 echo
'TOMATO_BUILD_USB = "$(USB)"' >> tomato_profile.mak
1022 echo
'TOMATO_BUILD_MIPS32 = "${MIPS32}"' >> tomato_profile.mak
1023 echo
'TOMATO_BUILD_V1 = "${V1}"' >> tomato_profile.mak
1024 echo
'TOMATO_BUILD_V2 = "${V2}"' >> tomato_profile.mak
1026 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)) $(EXTRA_64KCFLAG)' >> tomato_profile.mak
1028 # Note that changes to variables in tomato_profile.mak don't
1029 # get propogated to this invocation of make!
1031 @echo
"Using $(N) profile, $(B) build config."
1035 rm -f config_current
; \
1036 ln
-s config_
$(lowercase_B
) config_current
; \
1037 cp
-f config_current .config
1039 @cd router
/busybox
&& \
1040 rm -f config_current
; \
1041 ln
-s config_
$(lowercase_B
) config_current
; \
1042 cp config_current .config
1045 rm -f config_current
; \
1046 ln
-s config_
$(lowercase_B
) config_current
; \
1047 cp config_current .config
1049 @
$(MAKE
) -C router oldconfig
1052 @echo
"a A build (standard)"
1053 @echo
"b B build (standard minus SSH)"
1054 @echo
"c C build (standard minus CIFS)"
1055 @echo
"d D build (standard minus Samba server)"
1056 @echo
"m M build (standard plus extra utilities and NTFS support)"
1057 @echo
"nc NC build (standard plus VPN, extra utilities, NTFS support and NOCAT)"
1058 @echo
"ncm NCS build (no USB support, NOCAT)"
1059 @echo
"ncs NCS build (std + NOCAT)"
1060 @echo
"m Ext - (standard plus extra utilities and NTFS support)"
1062 ifeq ($(CONFIG_LINUX26
),y
)
1063 @echo
"e E build (standard plus VPN, extra utilities and NTFS support)"
1064 @echo
"i I build (IPv6 with no USB support minus CIFS and RIPv1/2)"
1066 @echo
"e E build (standard plus VPN and NTFS support)"
1068 @echo
"s S build (no USB support)"
1069 @echo
"f F build (no USB support minus CIFS and RIPv1/2)"
1070 @echo
"fs FS build (no USB support minus CIFS, JFFS, Zebra and RIPv1/2)"
1071 @echo
"v V build (VPN with no USB support)"
1072 @echo
"vs VS build (Small VPN with no USB support)"
1074 ifeq ($(CONFIG_LINUX26
),y
)
1075 @echo
"r2a MIPS Release 2 A build (standard)"
1076 @echo
"r2b MIPS Release 2 B build (standard minus SSH)"
1077 @echo
"r2c MIPS Release 2 C build (standard minus CIFS)"
1078 @echo
"r2d MIPS Release 2 D build (standard minus Samba server)"
1079 @echo
"r2e MIPS Release 2 E build (standard plus VPN and extras)"
1080 @echo
"r2f MIPS Release 2 F build (no USB support minus CIFS, RIPv1/2)"
1081 @echo
"r2fs MIPS Release 2 FS build (no USB support minus JFFS, CIFS, RIPv1/2, Zebra)"
1082 @echo
"r2i MIPS Release 2 I build (IPv6 with no USB support minus CIFS and RIPv1/2)"
1083 @echo
"r2m MIPS Release 2 M build (standard plus extras)"
1084 @echo
"r2nc MIPS Release 2 NC build (standard plus VPN, extras and NOCAT)"
1085 @echo
"r2ncm MIPS Release 2 NCM build (no USB support, plus NOCAT)"
1086 @echo
"r2ncs MIPS Release 2 NCS build (standard plus NOCAT)"
1087 @echo
"r2s MIPS Release 2 S build (no USB support)"
1088 @echo
"r2t MIPS Release 2 T build (no USB support with extras)"
1089 @echo
"r2u MIPS Release 2 U build (no USB support plus VPN with extras)"
1090 @echo
"r2v MIPS Release 2 V build (VPN with no USB support)"
1091 @echo
"r2vs MIPS Release 2 VS build (Small VPN with no USB support)"
1093 @echo
" Linksys E-Series with 60k Nvram"
1094 @echo
"n60m Linksys E-series build (60KB NVRAM, standard plus extras)"
1095 @echo
"n60e Linksys E-series build (60KB NVRAM, standard plus VPN and extras)"
1096 @echo
"n60nc Linksys E-series build (60KB NVRAM, standard plus extras, plus VPN, plus NOCAT)"
1097 @echo
"n60s Linksys E-series build (60KB NVRAM, no USB support)"
1098 @echo
"n60v Linksys E-series build (60KB NVRAM, VPN with no USB support)"
1100 @echo
" Linksys E-Series with 64k Nvram/8MB Flash(E900/E1200v2/E1500)"
1101 @echo
"n64m Linksys E-series build (64KB NVRAM, standard plus extras)"
1102 @echo
"n64e Linksys E-series build (64KB NVRAM, standard plus VPN and extras)"
1103 @echo
"n64nc Linksys E-series build (64KB NVRAM, standard plus extras, plus VPN, plus NOCAT)"
1104 @echo
"n64s Linksys E-series build (64KB NVRAM, no USB support)"
1105 @echo
"n64v Linksys E-series build (64KB NVRAM, VPN with no USB support)"
1107 @echo
" Linksys E-Series with 4MB Flash(E1000v2/v2.1/E1200v1)"
1108 @echo
"e1000v2i Linksys E1000v2-v2.1/Cisco M10v2 MiniIPv6"
1109 @echo
"e1000v2f Linksys E1000v2-v2.1/Cisco M10v2 Mini"
1110 @echo
"e1200v1i Linksys E1200v1 MiniIPv6"
1111 @echo
"e1200v1f Linksys E1200v1 Mini"
1113 @echo
" Netgear WNR3500L v2 builds (128MB Flash)"
1114 @echo
"v2e Netgear WNR3500Lv2 build"
1117 @echo
"..etc.. other build configs"
1118 @echo
"clean -C router clean"
1119 @echo
"cleanimage rm -rf image"
1120 @echo
"cleantools clean btools, mksquashfs"
1121 @echo
"cleankernel -C Linux distclean (but preserves .config)"
1122 @echo
"distclean distclean of Linux & busybox (but preserve .configs)"
1123 @echo
"prepk -C Linux oldconfig dep"
1125 .PHONY
: all clean distclean cleanimage cleantools cleankernel prepk what setprofile help
1126 .PHONY
: a b c d m Makefile allversions tomato_profile.mak