Few questions about builds and conditionals, RT-N and Belkin builds

Discussion in 'Tomato Firmware' started by JeffD, Jan 3, 2019.

  1. JeffD

    JeffD Serious Server Member

    Hi, I've recently started messing with some of my old Belkin F7D8301 routers and in the process of working out the VLANs discovered there's Belkin specific firmware located in the RT-N builds. I've had tomato installed for a long time and never known about these builds. It seems these were created by Teaman, but aside from that I'm not clear what's the best builds for these routers. I have run:
    Toastman: tomato-K26USB-1.28.xxxx.2MIPSR2Toastman-RT-VLAN-VPN
    and
    Shibby: tomato-K26USB-1.28.RT-MIPSR2-13x-VPN
    without issues, but as you can see both are RT and not RT-N builds... it seems everyone who has these routers always suggests the RT and not RT-N builds.

    Does anyone know what's different about the RT-N builds?

    It seems the Belkin routers are of a similar enough design to the RT-N routers that the can be grouped together. Looking at the code, conditionals for RTN, Belkin, and a few other builds are wrapped in a CONFIG_BCMWL5 conditional. I looked for common/compatible WL part but I don't see any common parts /features between the products in this list (truth be know, I didn't look any deeper than BCM part numbers). Is this a family of routers with adapters that which use a single BCMWL5 driver?

    So back to the original purpose for looking at the code, I'd like to revert the firmware back to single WAN mode so there's no wasted NVRAM on a second WAN I'll never use. I've tried three different freshtomato builds and the free NVRAM ranges anywhere from less than 10 free bytes to several K. Obviously I'd like several K but I think that was a mini build. What's really doesn't make sense is in the GUI for Number of WAN Ports, there's only one selectable choice,1. The item for 2 is dimmed out, yet there are 46 entries for (840bytes) in the NVRAM for WAN2 settings.

    Is there a document which describes all the build flags?
     
  2. maurer

    maurer Network Guru Member

    JeffD likes this.
  3. JeffD

    JeffD Serious Server Member

    Thanks maurer, Yes, MULTIWAN=n that's exactly what I needed to get some NVRAM back!
    I had got a little overwhelmed when looking at the makefile after looking at wl.mk and having no idea for all the build options. Not everything includes comments. I didn't get as far as the targets in Makefile.
    I was looking for a summary of the build defines. I'm sure I can figure most out with time, was just looking to see if someone has compiled a list of descriptions for each (I may even be in the repo, I don't know where to look).

    It's not clear why with all major tomato builds supporting Belkin RT-N builds but all the places I've seen users list the FW they use it's the basic K26USB builds, and not the Belkin builds. I was using K26USB builds for years with no idea there were other (possibly better) options to use. It sounds like Belkin builds don't get a lot of testing and that may be the key.
     
  4. txnative

    txnative Addicted to LI Member

    Most people my not know simply by it may not be necessary to change to a different build if the build they are using is working for them and to their needs, as the belkin router is only a 10/100 router on may server as either a wap or if you have bandwidth lower than 100 or 75 mbps it'll still meet the challenge. I still own my f7d4302 a put into my network as for testing for freshtomato mips from time to time, but I can't use it as a main router any more, as my isp or isp's don't really have lower bandwidth for it as a main router, but when it did using a build such as the RT build something like 4 mb image was always good for my network back then. Compiling them isn't an issue as to compiling a build for your own needs is optional for anyone if your that savy in linux or computer related to learn something new.
     
  5. JeffD

    JeffD Serious Server Member

    Agreed, I wasn't using the Belkin builds because the K26USB with flash and nvram sizes seemed work fine. I'd like to understand why there was a need for the unique builds. I know the port mapping was incorrect before that was rolled into trunk. The comments on the Belkin RT-N builds usually include "untested" which may make the cautious shy away. I've got Belkin builds on two right now and they seem to be working fine...

    Belkin N600 Play HD (F7D8301) and a couple more are 10/100/1000. The K26USBs I used worked at gigabit speeds fine.

    I do have some netgear nighthawks I will be using since they are much more powerful and the Belkins will just serve as WAPs.
    Thanks
     
  6. JeffD

    JeffD Serious Server Member

    I've been looking around at the build artifacts from freshtomato and I can't figure out how the RT-Nx builds are generated with the src-rt Makefile (actually it's the same makefile for src and src-rt) but I'm unable to generate anything found here:
    https://exotic.se/freshtomato-mips/v2018/2018.5/K26RT-N/
    Anyone have experience with this? I am unable to get a make all to work with Justio's mint VM.
    Silly question, but is this as simple as changing this line to RT-N?
    RT_SUFFIX="_RT"
    to
    RT_SUFFIX="_RT-N"
     
    Last edited: Jan 11, 2019
  7. txnative

    txnative Addicted to LI Member

    Are you trying to compile the k26rt-n build itself or just can compile anything?
     
  8. JeffD

    JeffD Serious Server Member

    I have been able to build things it's just that I'm interested in the RT-N builds.
    I see this in the makefile:
    RT_SUFFIX="_RT"
    and wonder what happens if I change this to:
    RT_SUFFIX="_RT-N"
    or
    RT_SUFFIX="_RT-Nx"
    Would that work? I'm testing now.

    There are also some of the default value in the 'e' builds which I need to disable along with the MULTIWAN and I'm looking through the about in 2018.5 build to see what Pedro disabled.
     
  9. JeffD

    JeffD Serious Server Member

    So the RT-N build I have looks most like the 'e' build and I'm trying decide what to disable in that configuration. I think I can disable these in red to get the footprint below 8MB:

    @$(MAKE) bin USB="USB" B=E NTFS=y EBTABLES=n MULTIWAN=n IPV6SUPP=y USBEXTRAS=y OPENVPN=y PPTPD=y \
    BBEXTRAS=n MEDIASRV=y DNSCRYPT=y BUILD_DESC="$(VPN)"​

    I think BBEXTRAS is busybox, and it doesn't look like that's included in the 2018.5 build I have (BB is not mentioned in the about page)
    EDIT: On further investigation all OPENVPN builds also have PPTPD enabled so i'll leave that as yes. I don't see any mention of EBTABLES in the 2018.5 about page.
     
    Last edited: Jan 11, 2019
  10. txnative

    txnative Addicted to LI Member

    Before compiling any RT-N builds you'll need to revert a patch this information is in his change log, not sure if you noticed it. I wouldn't done the same with changing suffix a bit but it really doesn't matter at least when compiling your own, the Makefile shows what specific letters does, remember how much nvram you have too when compiling your own as well. Multiwan I'm not to sure as you may have noticed in the Makefile there certain items are NO_HTTPS for example, but Multiwan isn't listed so you'll have to tackle that one all yourself. The commits would probably help you to figure out what was disabled.
     
  11. txnative

    txnative Addicted to LI Member

    Well if you compile one yourself then it may not be necessary to add those in the first place.
     
  12. JeffD

    JeffD Serious Server Member

    Thanks, and with years of development it will take a while to understand. I was just hoping that there was some magic build formula for the things which were recently release... I suspect there's something that make that less difficult rather than more. Since Pedro released the RT-N's I thought it would be a different build target, but that's not the case. Or if it is, I haven't been able to decode how. I just haven't dug deep yet. And thanks for the note on NVRAM size, the only sizes I saw called out were 60 and 64MB, everything else defaults to 0 which I'm assuming would equate to 8MB or 4MB but another thing to find time to investigate further...
     
  13. txnative

    txnative Addicted to LI Member

    Actually I am referring to the belkin model if that is your target, the 8MB flash don't over that size as any other models that have a specific ram size. If this interest you keep indulging into the Makefile a bit more, then work your way around other directory, ask questions, have you compile a custom image?
     
  14. pedro311

    pedro311 Networkin' Nut Member

    First you should compile without changing anything, and see if it ends successfully...
     
    kille72 likes this.
  15. JeffD

    JeffD Serious Server Member

    I've been able to build the default r2e build as pedro suggests (here and in readme). Pedro, can you tell me how you generated the Belkin builds in the RT-N folder?

    After building r2e I added the BELKIN=y, to the r2e defines and set MULTIWAN=n in 'E' make command. I got something way to big for the router. I started disabling things as shown above. I was able to get a 6MB bin, but obviously lots was missing.

    I moved to 'V' builds since those are named to match Pedro's releases, if I set RT_SUFFIX to RT-Nx (but suspect this doesn't affect anything except the name).
    I made r2v with BELKIN=y and 'V' command:
    Code:
        @$(MAKE) bin USB="USB" B=V NTFS=y NO_JFFS=y IPV6SUPP=y OPENVPN=y PPTPD=y USBEXTRAS=y MEDIASRV=y BUILD_DESC="IPv6-$(VPN)"
    
    I added USB and USBEXTRAS but haven't tested that, MULTIWAN has been deleted and not just set to n.

    I got a 7.2MB image, but wan2 values are still in the nvram. I did select the erase on upgrade, and then did a manual erase and reboot. Same results. I'm grepping the source for how MULTIWAN gets used, hopefully it's some simple change. (I could remove those values, but they'd just come back later.)

    I am also thinking about trying to use the 'M' build with BELKIN and USB support, but these builds take hours so I think I'll figure out the wan2 nvram thing first.
     
  16. pedro311

    pedro311 Networkin' Nut Member

    See sources, ex.: router/nvram/defaults.c or router/httpd/tomato.c.
    Even if you change MULTIWAN to "n", variables with prefix "wan2" will also be added to the NVRAM.
    Don't change 'E' or 'V' build or whatever - it doesn't matter, except when you are building serial images - it speeds up compilation, that's all.
     
  17. JeffD

    JeffD Serious Server Member

    yeah, I'm walking through all the multiwan references in the source and find that multiwan only affects wan3 and wan4. wan2 is enabled by default everywhere. It looks like these will all need to be manually modified to add the wan2 things into either TCONFIG_MULTIWAN or MULTIWAN conditionals... and there's a lot of them!

    on the v/e edits... these change the build options, no? I'm looking to add/remove from the ones which were defined (ie add USB to V build) or are you saying to modify r2v instead of the v command?
     
  18. JeffD

    JeffD Serious Server Member

    Seems the wan and wan2 configuration is called dualwan in the html files, and I found that only at the end... I would have been willing to wrap all wan2 in DUALWAN if I had seen that first. Instead I moved and modified all multiwan references to include wan2. That was quite a few files, now I need to move those to my build VM. Crap, just realized I made all those changes in master and not Pedro's 2018.5 code.... guess I can do this all over again. (Or I could just put tomato on my netgear and be done with worrying about the nvram. but where's the challenge in that?)
     
  19. JeffD

    JeffD Serious Server Member

    I've forked Pedro's repo and will make changes to my repo which isolates wan2 in a DUALWAN conditional, just need to figure out if I want to nest that within multiwan or keep the two independent. Thinking they should be exclusive.

    Curious how many people really have a need for 3 or 4 WANs to make MULTIWAN=y more or less a default build option?
     
  20. JeffD

    JeffD Serious Server Member

    Another question for those in the know... anyone cloning the repo into windows? There's stuff in the usb_modeswitch.d directory with colons in the names which windows doesn't like. Any way around that outside working in linux?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice