HOW-TO: Compile a firmware for the WL-700g from the GPL 1.0.4.2
Prerequisites
- A computer with a running Linux Distribution with ash shell.
- Basic knowledge of standard unix commands / usage
- Some experience with compiling software with configure && make && make install would be an advantage
- Non-dialup internet connection
My own setup is a Fedore Core 4 running on an Pentium 4. I am working with root acount.
Setting up the software
If it dosn't exist create the directory /opt.
# mkdir /opt < enter >
Download the Asus GPL sources for getting the Asus toolchain (we need mipsel-linux 3.0, so we are not downloading the lates firmware source) :
# cd /opt < enter >
# wget http://files.wl500g.info/asus/wl500g...1.8.1.9.tar.gz < enter >
# tar xvfz GPL_1.8.1.9.tar.gz < enter >
# cp -R /opt/broadcom/opt/brcm /opt < enter >
Change mipsel-linux to version 3.0:
# ln -sf /opt/brcm/hndtools-mipsel-linux-3.0 /opt/brcm/hndtools-mipsel-linux < enter >
Create a symbolik link from /opt/brcm/hndtools-mipsel-linux-3.2.3/mipsel-linux/sys-include to /opt/brcm/hndtools-mipsel-linux/mipsel-linux/sys-include
# ln -sf /opt/brcm/hndtools-mipsel-linux-3.2.3/mipsel-linux/sys-include /opt/brcm/hndtools-mipsel-linux/mipsel-linux/sys-include < enter >
Copy a file stdio.h from /opt/brcm/hndtools-mipsel-linux-3.2.3/lib/gcc-lib/mipsel-linux/3.2.3/include to /opt/brcm/hndtools-mipsel-linux/lib/gcc-lib/mipsel-linux/3.0/include:
# cp /opt/brcm/hndtools-mipsel-linux-3.2.3/lib/gcc-lib/mipsel-linux/3.2.3/include/stdio.h /opt/brcm/hndtools-mipsel-linux/lib/gcc-lib/mipsel-linux/3.0/include/stdio.h < enter >
Add toolchain path to your PATH:
# export PATH=$PATH:/opt/brcm/hndtools-mipsel-uclibc/bin:/opt/brcm/hndtools-mipsel-linux/bin < enter >
Set up GPL code
Go to the /root directory and download the GPL source code:
# cd /root < enter >
# wget http://files.wl500g.info/asus/wl700g...gE_1042tar.zip < enter >
Unzip GPL_WL700gE_1.0.4.2.tar.gz from GPL_WL700gE_1042tar.zip:
# unzip -u GPL_WL700gE_1042tar.zip < enter >
Extract the source:
# tar xvfz GPL_WL700gE_1.0.4.2.tar.gz < enter >
Make a change in 3 files by adding a path to executable mkcramfs (replace mkcramfs to /opt/broadcom/src/linux/linux/scripts/cramfs/mkcramfs):
/root/WL700g/nasoc/src/apps/Makefile
/root/WL700g/nasoc/src/apps/pivot_root/Makefile
/root/WL700g/nasoc/src/apps/mfgtest_root/Makefile
Compile the firmware
Go to the directory /root/WL700g/nasoc/src/apps and type:
# make rebuild