1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need help: Learn to compile Tomato

Discussion in 'Tomato Firmware' started by leshan, May 4, 2013.

  1. leshan

    leshan Network Guru Member

    I'm learning to compile Tomato firmware. Can anyone teach me how to add words after the Version 1.28 which is on top left of the web GUI right under the big Tomato? Like shibby added 'by shibby' there. The web GUI source call method 'version()'. I think this method just retrun '1.28'. How do we modify method 'version()' to display more information?
    Thanks.
     
  2. RMerlin

    RMerlin Network Guru Member

    Code:
    root@ubuntu-dev:~/tomato/release# grep -r "by shibby" *
    src/router/www/Makefile:sed -e "s,<div class='version'>Version <% version(); %></div>,<div class='version'>Version <% version(); %> by shibby</div>," $$F > $$F.tmp; \
    
    Looks like the www Makefile does an in-place replacement of the content of the webpage when copying them to the target directory.
     
  3. leshan

    leshan Network Guru Member

    Thank you very much
     
  4. leshan

    leshan Network Guru Member

    I got the following error when I tried to compile Tomato RAF 9013, help please. Thanks.


    /usr/bin/ld: LzmaAlone.o: file class ELFCLASS64 incompatible with ELFCLASS32
    /usr/bin/ld: final link failed: File in wrong format
    collect2: error: ld returned 1 exit status
    make[7]: *** [lzma] Error 1
    make[7]: Leaving directory `/tomato/release/src/lzma/CPP/7zip/Compress/LZMA_Alone'
    make[6]: *** [vmlinuz] Error 2
    make[6]: Leaving directory `/tomato/release/src-rt/linux/linux-2.6/arch/mips/brcm-boards/bcm947xx/compressed'
    make[5]: *** [kernel] Error 2
    make[5]: Leaving directory `/tomato/release/src/router'
    make[4]: *** [all] Error 2
    make[4]: Leaving directory `/tomato/release/src-rt'
    make[3]: *** [bin] Error 2
    make[3]: Leaving directory `/tomato/release/src-rt'
    make[2]: *** [m] Error 2
    make[2]: Leaving directory `/tomato/release/src-rt'
    make[1]: *** [r2m] Error 2
    make[1]: Leaving directory `/tomato/release/src-rt'
    make: *** [n60m] Error 2
     
  5. Victek

    Victek Network Guru Member

    add to your OS:

    sudo apt-get install libc6-i386 lib32z-dev
     
  6. leshan

    leshan Network Guru Member

    @Victek. Thank you for your reply. I'm using linux mint 32bit OS. Which linux do you recommend for compiling your RAF source code?
    I had the same error when I tried to compile 9013 and 9013 R1.0. But I had no problem to compile shibby RT-N branch from git.
    What's your K26 RT-N branch name or we need to download your source code from your website?
    Thanks again.
     
  7. Victek

    Victek Network Guru Member

  8. leshan

    leshan Network Guru Member

    @Victek. I'd like to report to you that I compiled successfully using Linux Mint 64bit with default dash.
    I got the same error if I compile with Linux Mint 32bit using dash or bash.

    If I want to compile a firmware with VLAN, do I have to manually change VLAN="($VLAN)" to VLAN=y in the Makefile or there's a better way define the value of "($VLAN)"?
    Thanks.
     
  9. Victek

    Victek Network Guru Member

    Tomato RAF 9013 needs bash I know..other Tomato's may be not. Yes you have to declare VLAN=y in the make example: make V1=9000 V2=LESHAN VLAN=y (and version you want to compile.. for instance) r2nc for RT-N16 or n60nc for E4200...
     
  10. leshan

    leshan Network Guru Member

    @Victek Thank you for you quick reply. I reconfigured my default shell to bash. After google, looks like a lot complaint about ubuntu/mint change default shell to dash.
     
  11. Victek

    Victek Network Guru Member

    Now you know why you must use bash then. Welcome to the real world, (as one of my colleagues said).
     

Share This Page