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

Help with Cross Compile

Discussion in 'Tomato Firmware' started by Huey, May 18, 2012.

  1. Huey

    Huey Networkin' Nut Member

    Hello all,

    Who wants to help by giving me (if possible: detailed) instructions on cross compiling Optware (ór Entware) for TomatoUSB on an Linksys E4200 (mipsel r2). I would like to compile Forked-daapd and fix Cups if possible.
    I have googled and looked at the NSLU pages and forums, but to be honest: I get lost.
    Not sure if I need buildroot for DDWRT or something else, does it make a difference in compiling for mipsel r1 and r2, and what should I do with the makefiles. Further how do I integrate the forked-daapd git, or can I use the source gz package? I would like to do it with Ubuntu 10.10, but if needed can create another vm environment if needed.
    So pointers in the right directions or url's are very welcome!

    TIA
     
  2. ryzhov_al

    ryzhov_al Networkin' Nut Member

  3. shibby20

    shibby20 Network Guru Member

    set target as ddwrt

    No, but only if you make kernel modules like lirc package.
     
  4. rhester72

    rhester72 Network Guru Member

    Are you sure? I believe r2 includes opcodes not available on r1.

    Rodney
     
  5. shibby20

    shibby20 Network Guru Member

    i`m always compiling packages using nslu2 toolchain and works on R1 and R2. But when i want to make packages with kernel module like lirc, then i have to use kernel source configured for R1 or R2.
     
  6. Huey

    Huey Networkin' Nut Member

    Hi, thanks for your replies.
    Getting somewhere with your links. Followed the first steps (on ubuntu 11.10). Trying to make the toolchain, but still run into trouble. Script gave error on download binutils at first but found another place to get it from. But make toolchain now still gives these errors, which seem not ok?

    make[5]: Leaving directory `/home/user1/openwrt/optware/ddwrt/toolchain/buildroot/toolchain_build_mipsel/binutils-2.17.50.0.8-build/bfd'
    make[4]: *** [info-recursive] Error 1
    make[4]: Leaving directory `/home/user1/openwrt/optware/ddwrt/toolchain/buildroot/toolchain_build_mipsel/binutils-2.17.50.0.8-build/bfd'
    make[3]: *** [all-bfd] Error 2
    make[3]: Leaving directory `/home/user1/openwrt/optware/ddwrt/toolchain/buildroot/toolchain_build_mipsel/binutils-2.17.50.0.8-build'
    make[2]: *** [all] Error 2
    make[2]: Leaving directory `/home/user1/openwrt/optware/ddwrt/toolchain/buildroot/toolchain_build_mipsel/binutils-2.17.50.0.8-build'
    make[1]: *** [/home/user1/openwrt/optware/ddwrt/toolchain/buildroot/toolchain_build_mipsel/binutils-2.17.50.0.8-build/binutils/objdump] Error 2
    make[1]: Leaving directory `/home/user1/openwrt/optware/ddwrt/toolchain/buildroot'
    make: *** [/home/user1/openwrt/optware/ddwrt/toolchain/buildroot/.built] Error 2
     
  7. ryzhov_al

    ryzhov_al Networkin' Nut Member

    Hi!
    Unfortunately, the Optware is quite antique environment and about 1/3 of download links is broken there.
    If you choose it, get used to it:(
     
  8. Huey

    Huey Networkin' Nut Member

    Ok, trying Entware instead. Followed the entware installation instructions. Used ubuntu 11.10.


    The make does not end succesfull either...:
    make[1]: Leaving directory `/home/user1/entware/rtn/packages/iksemel'
    make[1]: Entering directory `/home/user1/entware/rtn/packages/iperf'
    patch -p0 -i ./fix-path.patch
    can't find file to patch at input line 3
    Perhaps you used the wrong -p or --strip option?
    The text leading up to this was:
    --------------------------
    |--- trunk_clean/feeds/packages/net/iperf/Makefile2012-05-06 07:21:44.240991843 +0400
    |+++ trunk/feeds/packages/net/iperf/Makefile2012-05-10 17:21:04.520218861 +0400
    --------------------------
    File to patch:
    Why is it waiting for another patch file? Skipped it for now. How do I know for sure I did not miss something important?
     
  9. ryzhov_al

    ryzhov_al Networkin' Nut Member

    Oops, my bad. Not my exactly, but anyway, thank you for feedback.
     
  10. Huey

    Huey Networkin' Nut Member

    Well, glad to be able to contribute, although not really knowing what goes on :)
     
  11. shibby20

    shibby20 Network Guru Member

    download file manually from nslu2 mirror server (read: http://trac.nslu2-linux.org/optware/wiki ->Missing sources)

    and first of all install all needed packages:
    sudo apt-get install build-essential automake autoconf libtool pkg-config libcurl4-openssl-dev intltool libxml2-dev libgtk2.0-dev libnotify-dev libglib2.0-dev libevent-dev git-core libncurses5 libncurses5-dev bison flex
     
  12. mstombs

    mstombs Network Guru Member

    I think you must mean the dd-wrt optware Broadcom mipsel toolchain, I have a real NSLU2 it has an Intel processor with Big Endian Arm core uses armeb cross compiler! Some binaries are quite transferable between systems, I can use some from Broadcom mipsel Tomato (especially Rodney's static builds) on Ti AR7 adsl mipsel routers and vice versa, and many user space binaries work on both K24 and K26 router firmwares. I do suspect however that less generic better targeted binaries would be preferable for optimum performance.
     
    jondlou likes this.
  13. Huey

    Huey Networkin' Nut Member

    Ok, will give this also a try!
     
  14. Huey

    Huey Networkin' Nut Member

    Can you help with this error as well? Will do a make with V=s as well if it helps.

    make[3] -C feeds/packages/libs/intltool host-compile
    make -r package/compile: build failed. Please re-run make with V=s to see what's going on
    make[1]: *** [package/compile] Error 1
    make[1]: Leaving directory `/media/Entware/openwrt/trunk'
    make: *** [.packages_compiled] Error 2
     
  15. ryzhov_al

    ryzhov_al Networkin' Nut Member

    Hi!
    Type
    Code:
    $ cd ./trunk
    $ make package/compile V=99
    and you will see what's wrong. Please, refer Buildroot reference manual.
     
  16. Huey

    Huey Networkin' Nut Member

    Ok, will do.
     

Share This Page