So, I've got a WL-520GU to play with, and I'd like IPv6, Samba file-sharing, USB and media server.
Is it possible to create a MIPSR1 build with no SSH, JFFS, FTP server, slimmed busybox, no USB extras (it'll be replaced by optware - coreutils and util-linux-ng anyway)
Just did a test build with that, and it was 5.0 MB, so, no, not possible. (And that was while also removing L2TP, PPTP, HTTPS, CIFS client, and Zebra.)
The biggest items are the media server (900 KB) and Samba (~800 KB), but removing just one or the other still isn't enough to get the image smaller than 4 MB.
Wes are those builds hard to make? I've been wanting to get a MIPSR2 build with IPv6 support. Even if I lose a lot of stuff I almost don't mind. DD-WRT had support but for whatever reason their beta builds on an Asus N12 results in terrible speed and attempting to tell them about this results in "alot of people have the same problem, consult the forums".
No, not hard at all once you're set up to do builds. For my own tinkering, I've been in the habit of stripping out the thing I know I won't need, just to make some JFFS space for my own experiments. K26 + IPv6 + no-USB fits in 4 MB with hardly any sacrifices… the only things I'd remove from a Std build for that are the Samba server and JFFS.
If you want some JFFS space, I can easily disable something else you're unlikely to use instead, to make some space.
Any advice on where I can start with that? I've built my own builds before using the tutorials to grab right off the git, but I'm only familiar with how to build using the make targets (which, of course, there's no 4MB IPv6 option that I'm aware of).
The 'a'/'b'/'s' options are aliases to more detailed commands. You can see what they do by looking at tomato/release/src-rt/Makefile (near the bottom).
For example, the definition for "make f":
## Make the "Mini: no USB, no CIFS, no Zebra" build - targeted for Netgear routers
f:
@$(MAKE) bin JFFSv1=y NO_CIFS=y NO_ZEBRA=y SLIM=y B=F BUILD_DESC="Mini" USB=""
Most of these options are listed are earlier in the file:
# Options for "make bin" :
# BUILD_DESC (Std|Lite|Ext|...)
# MIPS32 (r2|r1)
# KERN_SIZE_OPT
# USB ("USB"|"")
# JFFSv1 | NO_JFFS
# NO_CIFS, NO_SSH, NO_ZEBRA, NO_SAMBA, NO_LIBOPT
# SAMBA3, OPENVPN, IPV6SUPP, EBTABLES, NTFS, MEDIASRV, BBEXTRAS, USBEXTRAS, BCM57, SLIM
… which are mostly self-explanatory. You can add extra options onto the end of the aliases; for example, all of the "make r2x" commands are just aliases to "make x MIPS32=r2"
These options are used, in turn, to set parameters in the build's config file. You can play with the defaults (i.e., to turn off things for which there's no command options for the Makefile) by editing tomato/release/src/router/config_base. That's how I disable things like L2TP, PPTP, and HTTPS support to save space for myself sometimes — these items have no corresponding parameters in the top-level Makefile.
For a build like I described, for your N12, the easiest thing would be to add "IPV6SUPP=y NO_SAMBA=y NO_JFFS=y" to the end of whatever make command you're already using, eg
make r2s V1=9055pre V2="-RT-ipv6" IPV6SUPP=y NO_SAMBA=y NO_JFFS=y
V1 and V2 aren't important, they just set what is used for certain strings describing the version and build — putting something descriptive helps to keep track.
To others who know more: feel free to correct me if I've made any errors or missed anything here.
What is BCM57, and if I have a WRT54Gv3 (Broadcom BCM4712), do I need it?
How about NO_LIBOPT?
Finally, how would I turn off drivers in the 2.6 kernel I don't need, or are there any that I could turn off? Why is the 2.6 kernel so much larger than the 2.4?
For WRT54Gv3? No, leave those to the default (which is off).
NO_LIBOPT controls an "optimize shared libraries" option. It helps for saving space, and the default is to do this; NO_LIBOPT=y turns that off. The only normal builds where NO_LIBOPT=y is used are ones that are already going to be big (>4 MB) anyway.
BCM57=y causes the is a special driver for Gigabit Ethernet on a certain family of Broadcom chipsets. I'm not clear on exactly when/where it is actually needed, but I can say with certainty that it isn't relevant if your router doesn't support Gigabit ethernet.
RiceCake: Happy to help! :)
PortalCake: *shrug* K26 is just plain bigger in a lot of places. I've never made an effort to measure how/where/why.