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

adding additional programs

Discussion in 'HyperWRT Firmware' started by wency, Feb 10, 2005.

  1. wency

    wency Network Guru Member

    Hello - i want to be able to add additional programs to the firmware.
    How can i integrate the vtund support, for example?
    I unpacked the vtund source into:
    ../release/src/router/vtun
    and read carefully to the end of the ...release/src/router/README
    All seems to compile OK, but... vtun seems to be not included.
    Which is the right way to add additional programs?
     
  2. sillygoose

    sillygoose Network Guru Member

    Did you modify the makefiles to add vtun building and installing?
     
  3. wency

    wency Network Guru Member

    Vtund - is it it possible to built-in

    Yes - i did - but i'm not sure if i did this correctly:
    The steps i followed are as follows:

    1. In the file .../release/src/router/config/Config
    i added the following under the 'menu "Base Features" ' row:

    config CONFIG_VTUN
    bool "Vtun Support"
    default y
    help
    ...........................

    2. In the file .../release/src/router/Makefile
    i added the following under the 'Configuration' row:

    obj-$(CONFIG_VTUN) +=vtun

    This is may be where i'm wrong - i can see several aditional options for the other programs under the "Overrides" section. May be i need to place some vtun stuff, but i do not know what exactly :-(((


    3. .../release/src/router/vtun/configure

    4. .../release/src/router/make menuconfig
    Now i'm able to see/activate the "Vtun support" option in the menu.

    5. .../release/src/linux/linux/make dep

    6. .../release/src/make

    This built the bin file without any problems.
    I upgraded the firmware of the device, but i'm unable to see any vtun presence.
     
  4. garyd9

    garyd9 Network Guru Member

    Add a rule similar to the following to release/src/router/Makefile

    vtun-install:
    install -D vtun/vtun $(INSTALLDIR)/vtun/usr/bin/vtun
    $(STRIP) $(INSTALLDIR)/vtun/usr/bin/vtun

    This should be added BEFORE the generic install rules. My favorite place was immediately after the rule for "dnsmasq-install"

    This should result in vtun being copied to:

    release/src/router/mipsel-uclibc/install/vtun/usr/bin

    Now, at this point, there MIGHT be another step (which I haven't encountered yet myself) that you have to take... Try this and see what happens.
     
  5. wency

    wency Network Guru Member

    vtund - a step ahead...

    Hello, grud and thanks for your answer:
    i've just tried your instructions and i was able to compile vtund (i think).

    When i telnet my WRT54 - the vtund executable can be now found under:
    /usr/bin:

    # ls -al /usr/bin/
    lrwxrwxrwx 1 0 0 17 Jan 1 00:00 [ -> ../../bin/busybox
    lrwxrwxrwx 1 0 0 17 Jan 1 00:00 clear -> ../../bin/busybox
    lrwxrwxrwx 1 0 0 17 Jan 1 00:00 cut -> ../../bin/busybox
    lrwxrwxrwx 1 0 0 17 Jan 1 00:00 free -> ../../bin/busybox
    lrwxrwxrwx 1 0 0 17 Jan 1 00:00 killall -> ../../bin/busybox
    lrwxrwxrwx 1 0 0 17 Jan 1 00:00 logger -> ../../bin/busybox
    lrwxrwxrwx 1 0 0 17 Jan 1 00:00 route -> ../../bin/busybox
    lrwxrwxrwx 1 0 0 17 Jan 1 00:00 tail -> ../../bin/busybox
    lrwxrwxrwx 1 0 0 17 Jan 1 00:00 test -> ../../bin/busybox
    lrwxrwxrwx 1 0 0 17 Jan 1 00:00 tty -> ../../bin/busybox
    lrwxrwxrwx 1 0 0 17 Jan 1 00:00 uptime -> ../../bin/busybox
    -rwxr-xr-x 1 0 0 45464 Jan 1 00:00 vtund
    lrwxrwxrwx 1 0 0 17 Jan 1 00:00 wget -> ../../bin/busybox
    lrwxrwxrwx 1 0 0 17 Jan 1 00:00 which -> ../../bin/busybox


    But - when i start it: i receive the following message:

    # /usr/bin/vtund
    vtund: applet not found


    And this is all i can do for now...
     
  6. sillygoose

    sillygoose Network Guru Member

    It sounds like maybe the vtund executable has a dependency that also needs to be installed. I'm not familiar with it, are there any other executables in the source directory after you make it?
     
  7. wency

    wency Network Guru Member

    vtund - a step ahead...

    I also think so, but there are not any executables within
    ../release/src/router/vtun/
    except for vtund...
     
  8. Toril

    Toril Network Guru Member

    I have a book from O'Reilly (Network Security Hacks) and on p202-206 it talks about vtund. According to it, (and it's not an official vtund source), there's 3 parts... the universal tunnel driver in the kernel, the vtund executable and the config file. Seems like you have the last two. You may need to compile tun support into the kernel (which may come with more supporting userspace utilities).

    The only two utils I've compiled, were snmpd (which actually someone did for me) and oidentd. These programs only needed themselves and a config file. I usually tftp them out of another linux machine when booting up. Tunnelling support might prove tricky... what are you trying to do that you might be able to do with an already-exsisting feature of the router? (PPTP for example).
     

Share This Page