Prerequisites:
● A 64 bit linux machine (I have used FC-13).
● This should be compiled as root user.
● The dd-wrt source code for WNDR4500 (can be downloaded from this link).
● Toolchain to compile dd-wrt (may be downloaded from this link).
STEP:1
Execute the following commands ,
# tar -zxvf DDWRT_WNDR4500_Release_06-06-2012.tgz
# cd DDWRT_WNDR4500_Release_06-06-2012
# tar -zxvf dd-wrt.tgz
STEP 2:
Copy Toolchain.tgz.zip in /opt directory and execute following commands ,
# cd /opt
# unzip Toolchain.tgz.zip
# tar -zxvf Toolchain.tgz
STEP 3:
Open “dd-wrt/src/linux/brcm/linux-2.6.23/Makefile” and perform the following modification.
Code (Original) :
ARCH = $(SUBARCH)
CROSS_COMPILE = /xfs/toolchains/toolchain-mipsel_gcc4.1.2/bin/mipsel-linux-uclibc-
#CROSS_COMPILE = mipsel-linux-uclibc-
# Architecture as present in compile.h
UTS_MACHINE := $(ARCH)
Code (After Modification) :
ARCH = $(SUBARCH)
#CROSS_COMPILE = /xfs/toolchains/toolchain-mipsel_gcc4.1.2/bin/mipsel-linux-uclibc-
CROSS_COMPILE = /opt/Toolchain/Kernel/toolchain-mipsel_gcc4.1.2/bin/mipsel-linux-uclibc-
#CROSS_COMPILE = mipsel-linux-uclibc-
# Architecture as present in compile.h
UTS_MACHINE := $(ARCH)
STEP 4:
Export toolchain path using the following command:
# export PATH=/opt/Toolchain/Userspace/toolchain-mipsel_gcc-linaro_uClibc-0.9.32/bin/:$PATH
STEP 5:
Next to compile the code for WNDR4500 execute following commands,
# cd dd-wrt/src/linux/brcm/linux-2.6.23/
# cp .config_WNDR4500 .config
#cd -
# cd dd-wrt/src/router
# cp .config_mega_WNDR4500 .config
# make -f Makefile.brcm26 configure clean all install
STEP 6:
If everything goes fine, the target firmware will be placed in “dd-wrt/src/router/mipsel-uclibc/” with name “dd-wrt.v24-K26_WNDR4500.chk”.
Recent comments