Help compiling firmware...

Discussion in 'Tomato Firmware' started by mikester, Feb 4, 2007.

  1. mikester

    mikester Network Guru Member

    First off good stuff on the Tomato firmware - by far the best one I've used yet. Stable, clean, nice!

    I want to modify/add some web pages to the /www directory to allow me to add FAP monitoring for my ISP. I am also interested in adding useage per user in the BWM. Now going down the road of building the firmware and keep getting unresolvable errors when trying to make the firmware...can anybody offer some pointers?

    What I've done:

    My system SUSE 10.1 - "installed everything"...
    downloaded and extracted WRT54GL_v4.30.9_US.tgz to
    downloaded TomatoSource_1_04.7z, followed instructions as per README.TXT

    made a symbolic link

    /opt/brcm -> /tomato/tools/brcm/

    added to my users .bashrc

    export PATH=$PATH:/opt/brcm/hndtools-mipsel-uclibc/bin
    export PATH=$PATH:/opt/brcm/hndtools-mipsel-linux/bin

    ran make in

    and get an error...

    make -f Makefile.ssl CC='mipsel-uclibc-gcc' PLATFORM='linux-mipsel' CFLAG='-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall' SDIRS='md2 md4 md5 sha mdc2 hmac ripemd des rc2 rc4 rc5 idea bf cast bn rsa dsa dh dso buffer bio stack lhash rand err objects evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp' INSTALLTOP='/usr/local/ssl' PEX_LIBS='' EX_LIBS='' BN_ASM='bn_asm.o' DES_ENC='des_enc.o fcrypt_b.o' BF_ENC='bf_enc.o' CAST_ENC='c_enc.o' RC4_ENC='rc4_enc.o' RC5_ENC='rc5_enc.o' SHA1_ASM_OBJ='' MD5_ASM_OBJ='' RMD160_ASM_OBJ='' AR='ar r' PROCESSOR='' PERL='perl' RANLIB='mipsel-uclibc-ranlib' EXE_EXT='' all )
    making all in apps...
    make[3]: Entering directory `/tomato/release/src/router/openssl/apps'
    make[3]: Nothing to be done for `all'.
    make[3]: Leaving directory `/tomato/release/src/router/openssl/apps'
    make[2]: Leaving directory `/tomato/release/src/router/openssl'
    [ ! -d hsiab ] || make -C hsiab
    make -C httpd
    make: *** httpd: No such file or directory. Stop.
    make: Entering an unknown directorymake: Leaving an unknown directorymake[1]: *** [httpd] Error 2
    make[1]: Leaving directory `/tomato/release/src/router'
    make: *** [all] Error 2

    Any help?
  2. roadkill

    roadkill Super Moderator Staff Member Member

    from README:

    * Remove the following:

    et et.4702 wl rts tools .model

    busybox cron dnsmasq httpd iproute2 iptables ipupdate lib libnet libpcap
    mipsel-uclibc misc nas netconf ntpclient nvram others rc ses shared
    traceroute udhcpd upnp utils www
  3. mikester

    mikester Network Guru Member

    are you saying to rename the /tomato directory to /Tomato?
  4. roadkill

    roadkill Super Moderator Staff Member Member

    and remove all those files from the original source tree...
    replace them with the ones from the source archive.
  5. mikester

    mikester Network Guru Member

    Phew...finally got it working somehow - on my 4th try of deleting all the directories and trying again, it finally compiled!

    BTW, the tomato.tar source had the files listed under /tomato not /Tomato. I got it working under the /tomato directory

    A couple of comments:
    The tomato source README.TXT file says
    * Run make from tomato/src/.

    which should probably read
    * Run make from tomato/release/src/
  6. roadkill

    roadkill Super Moderator Staff Member Member

    I have a few questions I'm looking into modifying it too...
    what did you added? did you flashed it yet? how long did you worked on it?

    did you modified the interface in anyway cause I looked at it
    because of the way it's built I think it'll take quit a while to modify it...
  7. mikester

    mikester Network Guru Member

    Hi there Roadkill,

    Yes I've flashed it and it worked! (amaaazing) Right now I have two WRT54GL's in AP+WDS mode - slick. The main one is running Tomato 1.04 and controlling internet access with QOS. The second one is for development and is hard connected to my SUSE box only.

    I farted around all weekend trying to get Tomato to compile without error. I am guessing one of my problems might have been that I was using a slightly older Linksys firmware (4.30.7? vs 4.30.9).

    Right now I am adding some .asp scripts in the /www directory to allow me to parse/display FAP data from my SAT ISP modem.

    I really like the Tomato firmware beacause it's "clean" and does pretty much everything I want. Why spend big $$$ on a managed switch that doesn't have all the features I want when I can have fun hacking my WRT...

    My personal wish list is generally minor and I would like to add the following (in order):
    * parse FAP data from SAT modem and display on Tomato screens
    * add a 'quick link' on the bottom of 'bwm-realtime.asp' to 'qos-detailed.asp'
    * graph and chart useage by IP/MAC
    * allow non root read only access to useage data
    * add 'BLOCKED' message to webpages that are dropped due to my 'keyword list' blocking
    * attempt port mirroring
    * expand the data logged in 'qos-detailed.asp' to view more packet header detail
    * take a good look into adding USB and SD card support - remote IP based I/O would be real sweet
  8. roadkill

    roadkill Super Moderator Staff Member Member

    source code modifying

    could you consider posting the modifications so we can get moving on adding a few other features?
    * all graphs on one page
    * more technical view of iptables filters
    * preview of the table to be added and allow change parameters
    * SD card support

  9. mikester

    mikester Network Guru Member

    Can do
  10. PaulH225

    PaulH225 Network Guru Member

    I was trying to add OpenVPN (with compression) to tomato, but I ran out of time when I got to the point of adding the asp pages. I've got it as far as having the openvpn executable compile as an option, building and copying to the target image. I haven't tested whether it flashes ok cos I'm a little wary of bricking my LAN's only route to the net (gf would kill me!).

    Do you have any tips on writing the asp pages? And maybe modifying the httpd for the cgi?
  11. azeari

    azeari LI Guru Member

    try running it on vmware for testing instead of flashing to e router
  12. roadkill

    roadkill Super Moderator Staff Member Member

    Bochs Virtual Machine is a virtual machine with MIPS support you can run the firmware on it with a serial console ;)
  13. azeari

    azeari LI Guru Member

    oh and as for the httpd, i believe u can use batbox's busybox instead. i'm not entirely sure but it might have cgi support. or you could try ripping off the ipkg packages i guess
  14. MarioT

    MarioT LI Guru Member

    In case someone else gets weird errors while compiling the source on Ubuntu 6.10, here the answer:

    (that "might" also apply to other distributions... )

    Since the 6.10 release, they chose to use "dash" instead of the "bash" shell. Supposed to be faster and fancier, but has some incompatibilities like not supporting "echo -e" in makefiles.

    To switch back to the bash shell, I had to use the command:
    sudo ln -sf /bin/bash /bin/sh

    Then everything compiled as expected.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice