Page 1 of 3 123 LastLast
Results 1 to 15 of 44

Thread: MANUAL: How to compile a firmware for the WL-700g from the GPL 1.0.4.2

  1. #1

    Lightbulb 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
    Last edited by MoD; 07-07-2006 at 17:14.

  2. #2
    Nice manual, but I discovered a small mistake.

    You just have to switch the parameters in your symbolic link commands.

    # ln -sf /opt/brcm/hndtools-mipsel-linux-3.0 /opt/brcm/hndtools-mipsel-linux < enter >
    # ln -sf /opt/brcm/hndtools-mipsel-linux-3.2.3/mipsel-linux/sys-include /opt/brcm/hndtools-mipsel-linux/mipsel-linux/sys-include < enter >

    After that the firmware compiles to the following error:

    Code:
    make[3]: Entering directory `/root/WL700g/nasoc/src/apps/tcp_wrapper'
    mipsel-linux-gcc -O -DFACILITY=LOG_MAIL  -DHOSTS_ACCESS -DPARANOID  -DGETPEERNAME_BUG -DBROKEN_FGETS -DLIBC_CALLS_STRTOK   -DDAEMON_UMASK=022 -DREAL_DAEMON_DIR=\"/usr/sbin\" Gilouche  -DSEVERITY=LOG_INFO         -DRFC931_TIMEOUT=10  -DHOSTS_DENY=\"/etc/hosts.deny\" -DHOSTS_ALLOW=\"/etc/hosts.allow\"   -DBROKEN_SO_LINGER -DSYS_ERRLIST_DEFINED  -Dvsyslog=myvsyslog -DALWAYS_HOSTNAME -c options.c
    mipsel-linux-gcc: Gilouche: No such file or directory
    make[3]: *** [options.o] Error 1
    Hope you can help me

    UPDATE: By editing the cflags in tcp_wrapper I could surround that problem, but I run into new ones :P
    We'll see by when I can help you with the telnetd^^

    One small question at the end:

    By flashing a new firmware, do I lose all shares with all the files in them?

    thx alot.
    Last edited by DaNawq; 07-07-2006 at 14:55.

  3. #3
    Nice manual, but I discovered a small mistake.

    You just have to switch the parameters in your symbolic link commands.

    # ln -sf /opt/brcm/hndtools-mipsel-linux-3.0 /opt/brcm/hndtools-mipsel-linux < enter >
    # ln -sf /opt/brcm/hndtools-mipsel-linux-3.2.3/mipsel-linux/sys-include /opt/brcm/hndtools-mipsel-linux/mipsel-linux/sys-include < enter >

    After that the firmware compiles to the following error:

    Code:
    make[3]: Entering directory `/root/WL700g/nasoc/src/apps/tcp_wrapper'
    mipsel-linux-gcc -O -DFACILITY=LOG_MAIL  -DHOSTS_ACCESS -DPARANOID  -DGETPEERNAME_BUG -DBROKEN_FGETS -DLIBC_CALLS_STRTOK   -DDAEMON_UMASK=022 -DREAL_DAEMON_DIR=\"/usr/sbin\" Gilouche  -DSEVERITY=LOG_INFO         -DRFC931_TIMEOUT=10  -DHOSTS_DENY=\"/etc/hosts.deny\" -DHOSTS_ALLOW=\"/etc/hosts.allow\"   -DBROKEN_SO_LINGER -DSYS_ERRLIST_DEFINED  -Dvsyslog=myvsyslog -DALWAYS_HOSTNAME -c options.c
    mipsel-linux-gcc: Gilouche: No such file or directory
    make[3]: *** [options.o] Error 1
    Hope you can help me

    UPDATE: By editing the cflags in tcp_wrapper I could surround that problem, but I run into new ones :P
    We'll see by when I can help you with the telnetd^^
    1) I fixed symbolic link mistake in the manual. Thanks!
    2) I just rebuilt the enviorment and recompiled without any problems. I dont know what is wrong.

    Now I'm trying to incude telnetd.... for now it seems that make menuconfig doesnt work. makes a mistake at compilation.
    Last edited by MoD; 07-07-2006 at 18:18.

  4. #4
    By flashing a new firmware, do I lose all shares with all the files in them?
    no I don't. all files stay where they are saved. no problems.

    But I don't take any resposibility for your data lost

  5. #5
    I noticed that if you want to enable telnetd, you will need:

    1) launch make menuconfig
    2) load settings from file NASoC_config

    My question is: do I have to select only telnetd and nothing else? like addgroup, passwd or something similar?

    Give me a hint!

    I enabled telnetd and added something like this to services.c:
    int
    start_telnetd(void){
    int ret = 0;
    pid_t pid;
    char *telnetd_argv[] = { "telnetd", NULL };
    ret = _eval(telnetd_argv, NULL, 0, &pid);
    dprintf("done\n");
    return ret;
    }
    and added the function to the function start_services.

    reflashed the firmware, but telnetd is not working
    Last edited by MoD; 07-07-2006 at 21:00.

  6. #6
    After compiling the firmware I even see (in the directory /root/WL700g/nasoc/src/apps/mipsel/target/sbin) that telnetd has been compiled.

    But when I flash and reboot the router, telnetd has not been started

  7. #7
    I do believe there's still something wrong with the firmware update itself.

    When I flash my new image to the router it still keeps all my settings.

    I think only by a complete update (hdd also) it will accept the new changes.

    Still experimenting ;-)

  8. #8
    I'm thinking about two possibilities:

    1) your version. try firmware restoration tool. or reset router after upgrade?!
    2) old busybox that doesnt support telnetd

    I changed busybox from Oleg's firmware. Trying to compile now.

  9. #9
    My version isn't really working yet

    Perhaps I'll connect the harddrive to a normal PC to see weather there are stored some configs or not...
    Last edited by DaNawq; 07-07-2006 at 23:00.

  10. #10
    Quote Originally Posted by DaNawq
    My version isn't really working yet

    Perhaps I'll connect the harddrive to a normal PC to see wether there are stored some configs or not...
    I changed firmware version. At least it appeared on web interface...

  11. #11
    I noticed that WL700gE in web pages use ash shell. Telnetd by default uses whitch one? does that makes sense?

  12. #12
    recompiled with busybox from Oleg's source. The result wasn't succesfull

  13. #13

    telnet to 700ge

    Quote Originally Posted by MoD
    I noticed that WL700gE in web pages use ash shell. Telnetd by default uses whitch one? does that makes sense?
    on the wl700ge, the telnetd is "/bin/utelnetd",you can try to start it. I had telnet to 700ge one month ago using a stupid method.

    1. modify the web started page fils ( /layout/layout.cgi ) from neighbor.
    2. add " /bin/utelnetd &" on the page, need carefully the add location.
    3. reload the web starting page.

    ps.
    1.this method worked on firmware 1.0.4.1, didn't check on better or new
    2.if we can write utelnetd on starting process, will easy to telnet . becase this method will been cleared whe you reboot.

    you can contact with me by IM ( see the userCP).
    my new firmware didn't finish , still have some problem.

  14. #14
    You are right! there is utelnetd in /bin directory. I'll try to use this daemon. but for this daeomn the full syntax is:

    /bin/utelnetd -l /bin/sh -d
    The question is if the parameter -l /bin/sh is important? I'll try to use /bin/utelnetd -d
    Last edited by MoD; 08-07-2006 at 10:40.

  15. #15
    Quote Originally Posted by hmantsao
    1. modify the web started page fils ( /layout/layout.cgi ) from neighbor.
    2. add " /bin/utelnetd &" on the page, need carefully the add location.
    where is that layout.cgi located? I cant find in my router
    what do you mean with
    , need carefully the add location.

Page 1 of 3 123 LastLast

Similar Threads

  1. Firmware upgrading HOWTO
    By Styno in forum WL-500g/WL-500gx Tutorials
    Replies: 6
    Last Post: 30-07-2008, 21:00
  2. twonky media server, network drive with oleg firmware
    By black_bottom in forum WL-HDD Q&A
    Replies: 3
    Last Post: 22-03-2006, 07:15
  3. Download of current GPL source for firmware?
    By LarsAC in forum WL-500g Custom Development
    Replies: 4
    Last Post: 26-02-2006, 15:16
  4. Custom Firmware v1.1.2.7
    By JOCKYW2001 in forum WL-HDD Firmware Releases
    Replies: 59
    Last Post: 11-12-2004, 12:26
  5. Flashing Oleg's Firmware in WL HDD
    By hugo in forum WL-HDD Custom Development
    Replies: 29
    Last Post: 21-10-2004, 14:55

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •