OUR NETWORK:TiVo Community TechLore Explore3DTV DVRplayground Dijit Community See all... About UsAdvertiseContact Us

 
Learn about scoring Forum's Raw Score: 235707.0
February 20, 2012 11:00 PM

Categories: WNR3500Lv2 Open Source Router

Rating (0 votes)
  • 1
  • 2
  • 3
  • 4
  • 5
Rate This!

Member Avatar

Subhra

Member
Joined: 02/09/2011

Hi all,
    I have seen that many people are facing problems in building DDWRT firmware for WNR3500Lv2. I have been able to build it. Here I am sharing the steps I followed to perform the same.

[NOTE:- This method requires to have both 32-bit and 64-bit machine.]

    Step 1: Download toolchain to compile ddwrt.


    Step 2: Perform the following modification in "toolchain-mipsel_gcc4.1.2/mipsel-linux-uclibc/sys-include/regex.h" file in toolchain.

Original Code :-
-----------------

#if !defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE && defined VMS
/* VMS doesn't have `size_t' in , even though POSIX says it
   should be there.  */
# include <stddef.h>
#endif


Modified Code :-
----------------


#if !defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE && defined VMS
/* VMS doesn't have `size_t' in , even though POSIX says it
   should be there.  */
# include <stddef.h>
#endif

# include <stddef.h>

    Step 3: Download "DD-WRT Source Code (Used in WNR3500Lv2 Firmware Build)" from this link and untar it using following command,
        $ tar -zxvf dd-wrt.tgz

    Step 4: Download the "DD-WRT for WNR3500Lv2 Initial Release 1.0" from this link.

    Step 5: Untar "DDWRT_WNR3500Lv2_Final_Release_09-12-2011.tgz" using following command,

            $ unzip DDWRT_WNR3500Lv2_Final_Release_09-12-2011.tgz.zip
            $ tar -zxvf DDWRT_WNR3500Lv2_Final_Release_09-12-2011.tgz
        Go to DDWRT_WNR3500Lv2_Final_Release_09-12-2011 using following command,
            $ cd DDWRT_WNR3500Lv2_Final_Release_09-12-2011
        Make DD-WRT source code ready for Netgear WNR3500Lv2 using the following command,
            $ sh ddwrt_build_wnr3500lv2.sh
        
    Step 6: Perform the following modification the "dd-wrt/src/router/rules/pppoe.mk" file

    Original Code:-
    ---------------
        pppoe pppoe-%:
            @true
    Modifed Code:-
    ---------------
        pppoe-%:
            @true


    Step 7: Perform the follwoing modifiaction the "dd-wrt/src/router/busybox/Makefile" file

Line 421:-

    Original Code:-
    ----------------------
    config %config: scripts_basic outputmakefile FORCE          
       $(Q)mkdir -p include


    Modifed Code:-
    ---------------------
    %config: scripts_basic outputmakefile FORCE  
    $(Q)mkdir -p include

Line 1273:-

    Original Code:-
    ---------------------
    / %/: prepare scripts FORCE        
    $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \

    Modified Code:-
    ----------------------
    %/: prepare scripts FORCE        
    $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \


    Step 8: Export toolchain path.
    Step 9: Go to "dd-wrt/src/router".
    Step 10: Use the following command to compile the source code,
        "make -f Makefile.wnr3500lv2 configure all install"
[Note: This step should be performed in a 64-bit machine. I have used Fedora Core 15 for this purpose.]

    Step 11: After successful compilation download following utility and use these series of commands,
[Note: These steps should be performed in a 32-bit machine. I have used Fedora Core 14 for this purpose.]
        
        $ tar -zxvf DD-WRT_Image_Creation.tgz
    
        $ cd DD-WRT_Image_Creation
    
        $ sh ddwrt_image.sh

    If everything goes well you should find the firmware ("ddwrt-wnr3500lv2.chk") in same ("DD-WRT_Image_Creation") directory.

Discussion:    Add a Comment | Comments 1-5 of 5 | Latest Comment

February 20, 2012 11:38 PM

Thanks Subhra for preparing such a nice document. However I have following comment on this article.
Step 1. It would be better if you specify the path from where toolchain is available.
I think step 6 and 7 are required only when we use Fedora Core 14 or higher version of Fedora Core 14.
Step 8: It would be nice if you can give example.
Step 9: Clean may not be necessary for first compilation but it is necessary for next time compilation. So the command would be
"make -f Makefile.wnr3500lv2 configure clean all install"

February 20, 2012 11:54 PM

@Tathagata: Thank you for pointing out the shortcoming of this document.

Step 1:

Toolchain can be downloaded from this link.

Step 8:

Use the following command to export your toolchain path.

export PATH=/TOOLCAHIN_BASE_PATH/toolchain-mipsel_gcc4.1.2/bin:$PATH

In my case I have downloaded the toolchain in "/opt" so for me the command was ,

export PATH=/opt/toolchain-mipsel_gcc4.1.2/bin:$PATH

Step 10:-

For compiling first time use the command,

"make -f Makefile.wnr3500lv2 configure all install"

and for further compilation use following command,

"make -f Makefile.wnr3500lv2 configure clean all install"

February 22, 2012 11:41 AM

Hi,

Fisrt, thank you for your post. I would like to know which is differences between DDWRT_WNR3500Lv2_Final_Release_09-12-2011 and the firmware that I can make with your post and code source ?
And, for the Linux distribution, can I use Debian 6 (32 and 64) ?
Thank you

February 22, 2012 11:31 PM

The sample firmware supplied with the "DDWRT_WNR3500Lv2_Final_Release_09-12-2011" and the firmware generated by the above procedure would be same.

Theoretically Debian may be used for the compilation provided all basic development tools are installed. But I personally never did the same.

April 13, 2012 1:09 AM

New dd-wrt for WNR3500Lv2 is released. It needs just one 64 bit machine to compile the firmware. You will find this build here.

Discussion:    Add a Comment | Back to Top | Comments 1-5 of 5 | Latest Comment

Add Your Reply

(will not be displayed)

Email me when comments are added to this thread

 
 

Please log in or register to participate in this community!

Log In

Remember

Not a member? Sign up!

Did you forget your password?

You can also log in using OpenID.

close this window
close this window