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

Can't install binary into tomato.

Discussion in 'Tomato Firmware' started by lancethepants, Jun 3, 2012.

  1. lancethepants

    lancethepants Network Guru Member

    This is a development question. I'm trying to create a custom build of tomato by integrating the Tinc binary into the firmware. The binary compiles and works fine, but when it gets to the install portion of the makefile, right at the very end, it gives me the error
    Unable to resolve uncompress used by tincd
    I've been able to throw in other binaries just fine, but I'm not sure if Tinc uses some sort of special compression on it's binary when built? I'm guessing there's some issue with when it packages the firmware together using lzma.
    Thanks for any suggestions.
  2. launchpadmcquak

    launchpadmcquak Network Newbie Member

    I'm running into the same problem with the Toastman-RT branch. I was thinking maybe there was some pre-defined size for the .trx file and maybe tincd was running up against it so I went into the Makefile and cut things out. Still, no luck. How'd you get around this?
  3. launchpadmcquak

    launchpadmcquak Network Newbie Member

    Here's what I used to build it:
    tinc: tinc/stamp-h1
      cd tinc && CFLAGS="-Os -Wall $(EXTRACFLAGS) -ffunction-sections -fdata-sections" \
      LDFLAGS="-L/home/runtime/Toastman-RT/Toastman-RT/release/src/router/openssl -L/home/runtime/Toastman-RT/Toastman-RT/release/src/router/lzo/src/.libs -L/home/runtime/Toastman-RT/Toastman-RT/release/src/router/zlib -ffunction-sections -fdata-sections -Wl,--gc-sections" \
      $(CONFIGURE) --prefix="" --sysconfdir=/etc \
      --with-lzo-include="/home/runtime/Toastman-RT/Toastman-RT/release/src/router/lzo/include" \
      --with-openssl="/home/runtime/Toastman-RT/Toastman-RT/release/src/router/openssl" --with-openssl-include="/home/runtime/Toastman-RT/Toastman-RT/release/src/router/openssl/ssl" \
      --with-zlib-include="/home/runtime/Toastman-RT/Toastman-RT/release/src/router/zlib" \
      --disable-uml --disable-vde --disable-tunemu \
      --disable-hardening --disable-curses --disable-readline --enable-zlib --enable-lzo
      touch tinc/stamp-h1
      -$(MAKE) -C tinc clean
      @rm -f tinc/stamp-h1
    tinc-install: tinc
      install -D tinc/src/tincd $(INSTALLDIR)/tinc/usr/sbin/tincd
      $(STRIP) -s $(INSTALLDIR)/tinc/usr/sbin/tincd
      chmod 0750 $(INSTALLDIR)/tinc/usr/sbin/tincd
    At first I tried commenting out the strip and the chmod parts in the install section, but that didn't work. I apologize for the horrendously bad code above, but I'm new to this and used sections from elsewhere in the Makefile as a roadmap.
  4. mstombs

    mstombs Network Guru Member

    A bit late for the original problem, but the error message comes from a library optimization function libfoo called to strip unused modules from libraries for firmware size reduction (this also breaks future dynamic linked exes running using standard functions that were not needed by base firmware -henc optware/entware must have their own full libraries). See for example



    You probably have to add a fixDynDep entry to this for your new binary?

Share This Page