How to compile Tomato in Ubuntu 8.10 - steps

Discussion in 'Tomato Firmware' started by SoftCoder, Apr 11, 2009.

  1. SoftCoder

    SoftCoder Addicted to LI Member

  2. bripab007

    bripab007 Network Guru Member

  3. dkirk

    dkirk Network Guru Member

    Kudos for the excellent writeup! You've encouraged me to delve a little deeper.

    For His glory...
  4. The Doctor

    The Doctor LI Guru Member

    Great post! But I need more...How about "How to compile Tomato for x86 hardware - beginners addition"? :biggrin:

  5. mstombs

    mstombs Network Guru Member

    Good post:- I've just upgraded my Linux desktop so this was a useful refresh of something I tried some time ago:-

    Trying not to install things permanently
    and not run as root, you can use this command to link to the toolchain, set the path andmake

    sudo ln -s ~/Code/TomatoSource_1_23/tomato/tools/brcm /opt/brcm
    export PATH=$PATH:/opt/brcm/hndtools-mipsel-uclibc/bin:/opt/brcm/hndtools-mipsel-linux/bin
    I then found that the old uclibc failed to compile so had to edit

    ~/Code/TomatoSource_1_23/tomato/tools-src/uClibc/ldso/util/ldd.c to get past an error

    make[3]: Entering directory `/home/user/Code/TomatoSource_1_23/tomato/tools-src/uClibc/ldso'
    make -C util;
    make[4]: Entering directory `/home/user/Code/TomatoSource_1_23/tomato/tools-src/uClibc/ldso/util'
    ln -fs ../../include/elf.h
    		-DUCLIBC_DEVEL_PREFIX=\""/opt/brcm/hndtools-mipsel-uclibc-0.9.19"\" \
    		-DUCLIBC_BUILD_DIR=\"/home/user/Code/TomatoSource_1_23/tomato/tools-src/uClibc\" \
    		-DUCLIBC_LDSO=\"\" -I . \
    		ldd.c -o ldd 
    ldd.c:96:2: warning: #warning "You really should add a MATCH_MACHINE() macro for your architecture"
    ldd.c: In function 'find_dependancies':
    ldd.c:528: error: 'ELFCLASSM' undeclared (first use in this function)
    ldd.c:528: error: (Each undeclared identifier is reported only once
    ldd.c:528: error: for each function it appears in.)
    ldd.c:529: warning: implicit declaration of function 'MATCH_MACHINE'
    make[4]: *** [ldd] Error 1
    Google found a suitable macro in Busybox...

    /* X86_64  */
     #if defined(__x86_64__)
     #define MATCH_MACHINE(x) (x == EM_X86_64)
    which seemed to work with my Intel CPU and Ubuntu 8.10 AMD64 version. I have compiled other things such as WAG200G and OpenWRT s have already installed various tools and libraries - getlibs has been useful

    and the rest of the build completed to an image the correct size - not yet tested!
  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