Modify CFE for v0.7 BCM5352/BCM3302 to support v0.8 clkfreq protections?

Discussion in 'Cisco/Linksys Wireless Routers' started by BaxterStockman, Apr 16, 2011.

  1. BaxterStockman

    BaxterStockman Networkin' Nut Member

    Hi all,

    I've been surfing around this page and others to find an answer; no luck as yet.

    This website indicates that WRT54G units with Broadcom BCM5352/BCM3302 v0.8 processors are equipped with a CFE that solves some problems with v0.7 units:

    "1. The CPU/backplane clock frequency [in the v0.8 units] is always a 2:1 ratio, so the second parameter of the clkfreq variable is ignored and can be omitted. The platform may support the same ratios as the BCM3302 0.7, but no other ratios are used or have been experimented yet to date.
    2. If no frequency match is found in the table, the next closest match of less than or equal value is used. Previous CFE versions had a problem that would cause them to just fail.
    3. If a a frequency above the maximum is attempted, the clock is set to its default speed. Previous CFE versions would simply lock up.
    4. The clkfreq variable is reset to 200 on a hard reset of the nvram. Previous CFE versions were reported to not do this."

    Does anyone know (1) if it is possible to modify the CFE of v0.7 units to incorporate at least the second, and hopefully also the third, of these protections, and (2) if so, how to accomplish this? The first protection would also be nice, although according to the link above, the CPU/backplane clock frequency of v0.7 units is not always in a 2:1 ratio (e.g. when the CPU is at 300, the backplane is supposed to be at 120).

    I have already modified the CFEof my unit (a WRT54G v.3) with the line "reset_gpio=6" which, according to means that holding the reset button while powering on the unit resets nvram variables to CFE defaults. This is pretty nice, and in itself avoids much of the hassle inherent in overclocking v0.7 units. However, it would be even better to avoid having to do hard resets, so if anybody knows how to modify the CFE to accomplish these goals, I would really appreciate if you'd share your know-how.

    Thanks very much!
  2. mstombs

    mstombs Network Guru Member

    You must not not mess with CFEs unless you have working JTAG to recover!

    There is Broadcom CFE source around that will can compile custom CFEs, but as I doubt you will find the source for your specific CFE could be 2 steps back for one forward!

    I'm pretty sure Tornado on dd-wrt forums does recompile his own and publishes for specific routers - ie WRT54G-TM and compressed CFEs for a number of 2MB flash devices, but other folk just seem to try CFEs from other similar routers!

    Note that reset_gpio is not always 6, but never more than 7 - it is 6 for my WRT54G-TM as well though! Seems sensible to set - and function is clear in the code, but as the value is stored in nvram not guaranteed to be able to recover from all nvram corruptions - which is where JTAG comes back in handy (erasing the nvram is sure way to get it reset to defaults on next boot, but some routers don't have correct memory ting etc as defaults...!

    In the code I have it appears the closest frequency less than that requested is always used, but we know various routers can be bricked just by requesting a wrong value - so don't know if its fixed or a problem still there?
    nvram var "clkfreq=200" seems a sensible default - are you sure it isn't already set?
  3. Toastman

    Toastman Super Moderator Staff Member Member

    The cfe clock table which was on seems to have been deleted, that page is now devoted to a different subject!
  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