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

tomato-arm7 compilation for R8000

Discussion in 'Tomato Firmware' started by janardhan, Nov 15, 2016.

  1. janardhan

    janardhan Network Newbie Member

    I download tomato arm7 source code from BIT-BUCKET ARM7

    after that i am compiling for R8000...when i am compiling i am getting below ERROR

    CCLD ipset
    ../lib/.libs/libipset.a(session.o): In function `generic_data_attr_cb':
    session.c:(.text.generic_data_attr_cb+0x14): undefined reference to `mnl_attr_get_type'
    session.c:(.text.generic_data_attr_cb+0x24): undefined reference to `mnl_attr_type_valid'
    session.c:(.text.generic_data_attr_cb+0x40): undefined reference to `mnl_attr_validate'
    session.c:(.text.generic_data_attr_cb+0x5c): undefined reference to `mnl_attr_get_payload_len'
    ../lib/.libs/libipset.a(session.o): In function `rawdata2attr.clone.0':
    session.c:(.text.rawdata2attr.clone.0+0x78): undefined reference to `mnl_attr_nest_start'
    session.c:(.text.rawdata2attr.clone.0+0x90): undefined reference to `mnl_attr_put'
    session.c:(.text.rawdata2attr.clone.0+0x9c): undefined reference to `mnl_attr_nest_end'
    session.c:(.text.rawdata2attr.clone.0+0x1f0): undefined reference to `mnl_attr_put'
    ../lib/.libs/libipset.a(session.o): In function `attr2data':
    session.c:(.text.attr2data+0x28): undefined reference to `mnl_attr_get_payload'
    session.c:(.text.attr2data+0x74): undefined reference to `mnl_attr_parse_nested'
    session.c:(.text.attr2data+0x130): undefined reference to `mnl_attr_get_payload'
    ../lib/.libs/libipset.a(session.o): In function `build_send_private_msg':
    session.c:(.text.build_send_private_msg+0x5c): undefined reference to `mnl_attr_put_u8'
    session.c:(.text.build_send_private_msg+0x140): undefined reference to `mnl_attr_put_u8'
    ../lib/.libs/libipset.a(session.o): In function `callback_list':
    session.c:(.text.callback_list+0x294): undefined reference to `mnl_attr_parse_nested'
    session.c:(.text.callback_list+0x60c): undefined reference to `mnl_attr_get_payload'
    session.c:(.text.callback_list+0x650): undefined reference to `mnl_attr_parse_nested'
    session.c:(.text.callback_list+0x884): undefined reference to `mnl_attr_get_payload'
    session.c:(.text.callback_list+0x894): undefined reference to `mnl_attr_get_payload_len'
    session.c:(.text.callback_list+0x8a4): undefined reference to `mnl_attr_ok'
    session.c:(.text.callback_list+0x8f8): undefined reference to `mnl_attr_next'
    ../lib/.libs/libipset.a(session.o): In function `callback_data':
    session.c:(.text.callback_data+0x94): undefined reference to `mnl_attr_parse'
    session.c:(.text.callback_data+0xd8): undefined reference to `mnl_attr_get_u8'
    session.c:(.text.callback_data+0x18c): undefined reference to `mnl_attr_get_u8'
    session.c:(.text.callback_data+0x1a4): undefined reference to `mnl_attr_get_u8'
    session.c:(.text.callback_data+0x268): undefined reference to `mnl_attr_get_str'
    session.c:(.text.callback_data+0x3a4): undefined reference to `mnl_attr_get_str'
    ../lib/.libs/libipset.a(session.o): In function `callback_error':
    session.c:(.text.callback_error+0x14): undefined reference to `mnl_nlmsg_get_payload'
    session.c:(.text.callback_error+0x24): undefined reference to `mnl_nlmsg_size'
    session.c:(.text.callback_error+0x204): undefined reference to `mnl_nlmsg_get_payload'
    session.c:(.text.callback_error+0x2b0): undefined reference to `mnl_attr_parse'
    session.c:(.text.callback_error+0x300): undefined reference to `mnl_attr_get_u32'
    ../lib/.libs/libipset.a(session.o): In function `build_msg':
    session.c:(.text.build_msg+0x64): undefined reference to `mnl_attr_put_u8'
    session.c:(.text.build_msg+0x184): undefined reference to `mnl_attr_put_u8'
    session.c:(.text.build_msg+0x1ac): undefined reference to `mnl_attr_nest_start'
    session.c:(.text.build_msg+0x47c): undefined reference to `mnl_attr_nest_start'
    session.c:(.text.build_msg+0x4c0): undefined reference to `mnl_attr_nest_start'
    session.c:(.text.build_msg+0x534): undefined reference to `mnl_attr_nest_cancel'
    session.c:(.text.build_msg+0x56c): undefined reference to `mnl_attr_nest_end'
    session.c:(.text.build_msg+0x624): undefined reference to `mnl_attr_nest_start'
    session.c:(.text.build_msg+0x664): undefined reference to `mnl_attr_nest_end'
    ../lib/.libs/libipset.a(session.o): In function `ipset_commit':
    session.c:(.text.ipset_commit+0x40): undefined reference to `mnl_attr_nest_end'
    ../lib/.libs/libipset.a(mnl.o): In function `ipset_mnl_query':
    mnl.c:(.text.ipset_mnl_query+0x2c): undefined reference to `mnl_socket_sendto'
    mnl.c:(.text.ipset_mnl_query+0x4c): undefined reference to `mnl_socket_recvfrom'
    mnl.c:(.text.ipset_mnl_query+0x80): undefined reference to `mnl_cb_run2'
    mnl.c:(.text.ipset_mnl_query+0x98): undefined reference to `mnl_socket_recvfrom'
    ../lib/.libs/libipset.a(mnl.o): In function `ipset_mnl_fill_hdr':
    mnl.c:(.text.ipset_mnl_fill_hdr+0x10): undefined reference to `mnl_nlmsg_put_header'
    mnl.c:(.text.ipset_mnl_fill_hdr+0x3c): undefined reference to `mnl_nlmsg_put_extra_header'
    ../lib/.libs/libipset.a(mnl.o): In function `ipset_mnl_fini':
    mnl.c:(.text.ipset_mnl_fini+0x14): undefined reference to `mnl_socket_close'
    ../lib/.libs/libipset.a(mnl.o): In function `ipset_mnl_init':
    mnl.c:(.text.ipset_mnl_init+0x28): undefined reference to `mnl_socket_open'
    mnl.c:(.text.ipset_mnl_init+0x40): undefined reference to `mnl_socket_bind'
    mnl.c:(.text.ipset_mnl_init+0x50): undefined reference to `mnl_socket_get_portid'
    mnl.c:(.text.ipset_mnl_init+0x74): undefined reference to `mnl_socket_close'
    collect2: ld returned 1 exit status
    make[7]: *** [ipset] Error 1
    make[7]: Leaving directory `/home/janardhan/tomato-arm/release/src-rt-6.x.4708/router/ipset/src'
    make[6]: *** [all-recursive] Error 1
    make[6]: Leaving directory `/home/janardhan/tomato-arm/release/src-rt-6.x.4708/router/ipset'
    make[5]: *** [all] Error 2
    make[5]: Leaving directory `/home/janardhan/tomato-arm/release/src-rt-6.x.4708/router/ipset'
    make[4]: *** [ipset] Error 2
    make[4]: Leaving directory `/home/janardhan/tomato-arm/release/src-rt-6.x.4708/router'
    make[3]: *** [all] Error 2
    make[3]: Leaving directory `/home/janardhan/tomato-arm/release/src-rt-6.x.4708'
    make[2]: *** [bin] Error 2
    make[2]: Leaving directory `/home/janardhan/tomato-arm/release/src-rt-6.x.4708'
    make[1]: *** [z] Error 2
    make[1]: Leaving directory `/home/janardhan/tomato-arm/release/src-rt-6.x.4708'
    make: *** [r8000z] Error 2
     
  2. janardhan

    janardhan Network Newbie Member

    the source code i am compiling on ubuntu-14.04
    please anyone can help
     
  3. azdps

    azdps LI Guru Member

    janardhan I'm not sure how to solve the error you are experiencing. I haven't attempted to build the tomato-arm repository you are trying to build. Usually build errors are a result of having the wrong packages installed. Typically not having the right automake versions installed.

    Edit: Are you using the make command from the correct directory. You should probably be using make r8000z from the tomato-arm/release/src-rt-7.x.main/src directory. I could be wrong though.
     
    Last edited: Nov 16, 2016
  4. janardhan

    janardhan Network Newbie Member

    above error not coming now...but its showing below error.

    install libevent/.libs/libevent-2.0.so.5.1.9 /home/janardhan/tomato-arm/release/src-rt-7.x.main/src/router/arm-uclibc/install/libevent/usr/lib/libevent-2.0.so.5
    install: cannot stat ‘libevent/.libs/libevent-2.0.so.5.1.9’: No such file or directory
    make[4]: *** [libevent-install] Error 1
    install libevent/.libs/libevent-2.0.so.5.1.9 /home/janardhan/tomato-arm/release/src-rt-7.x.main/src/router/arm-uclibc/install/libevent/usr/lib/libevent-2.0.so.5
    install: cannot stat ‘libevent/.libs/libevent-2.0.so.5.1.9’: No such file or directory
    make[4]: *** [libevent-install] Error 1


    but src/router/libevent/.libs/libevent-2.0.so.5.1.10 available
     
  5. azdps

    azdps LI Guru Member

    I would try changing the Makefile located at /home/janardhan/tomato-arm/release/src-rt-6.x.4708/router/Makefile.

    In Makefile look for libevent. Change any occurrence of libevent-2.0.so.5.1.9 to libevent-2.0.so.5.1.10. Then try to make again from the appropriate directory.
     
  6. janardhan

    janardhan Network Newbie Member

    Again I am facing problem while compiling tomato-arm7 for Netgear R8000

    make[7]: Entering directory `/home/janardhan/tomato-arm/release/src-rt-6.x.4708/router/ipset/lib'
    CCLD libipset.la
    /usr/bin/ld: .libs/data.o: Relocations in generic ELF (EM: 40)
    /usr/bin/ld: .libs/data.o: Relocations in generic ELF (EM: 40)
    /usr/bin/ld: .libs/data.o: Relocations in generic ELF (EM: 40)
    /usr/bin/ld: .libs/data.o: Relocations in generic ELF (EM: 40)
    /usr/bin/ld: .libs/data.o: Relocations in generic ELF (EM: 40)
    /usr/bin/ld: .libs/data.o: Relocations in generic ELF (EM: 40)
    /usr/bin/ld: .libs/data.o: Relocations in generic ELF (EM: 40)
    /usr/bin/ld: .libs/data.o: Relocations in generic ELF (EM: 40)
    /usr/bin/ld: .libs/data.o: Relocations in generic ELF (EM: 40)
    /usr/bin/ld: .libs/data.o: Relocations in generic ELF (EM: 40)
    /usr/bin/ld: .libs/data.o: Relocations in generic ELF (EM: 40)
    /usr/bin/ld: .libs/data.o: Relocations in generic ELF (EM: 40)
    /usr/bin/ld: .libs/data.o: Relocations in generic ELF (EM: 40)
    .libs/data.o: error adding symbols: File in wrong format
    collect2: error: ld returned 1 exit status
    make[7]: *** [libipset.la] Error 1
    make[7]: Leaving directory `/home/janardhan/tomato-arm/release/src-rt-6.x.4708/router/ipset/lib'
    make[6]: *** [all-recursive] Error 1
    make[6]: Leaving directory `/home/janardhan/tomato-arm/release/src-rt-6.x.4708/router/ipset'
    make[5]: *** [all] Error 2
    make[5]: Leaving directory `/home/janardhan/tomato-arm/release/src-rt-6.x.4708/router/ipset'
    make[4]: *** [ipset] Error 2
    make[4]: Leaving directory `/home/janardhan/tomato-arm/release/src-rt-6.x.4708/router'
    make[3]: *** [all] Error 2
    make[3]: Leaving directory `/home/janardhan/tomato-arm/release/src-rt-7.x.main/src'
    make[2]: *** [bin] Error 2
    make[2]: Leaving directory `/home/janardhan/tomato-arm/release/src-rt-7.x.main/src'
    make[1]: *** [z] Error 2
    make[1]: Leaving directory `/home/janardhan/tomato-arm/release/src-rt-7.x.main/src'
    make: *** [r8000z] Error 2

    I unable to solve above error. can any one help?
     
  7. janardhan

    janardhan Network Newbie Member

    Thank you azdps,above error not coming now.but i am facing another problem

    arm-brcm-linux-uclibcgnueabi-gcc -O3 -Wall -DLINUX26 -DCONFIG_BCMWL5 -DCONFIG_BCMWL6 -DCONFIG_BCMWL6A -DPART_JFFS2_GAP=0UL -pipe -fno-strict-aliasing -DBCMWPA2 -DBCMARM -marm -DCONFIG_NVRAM_SIZE=32 -DLINUX_KERNEL_VERSION=132644 -I/home/tomato/tomato-make/release/src-rt-6.x.4708/router/libncurses/staged/usr/include -ffunction-sections -fdata-sections -Wall -ffunction-sections -fdata-sections -Wl,--gc-sections -L/home/tomato/tomato-make/release/src-rt-6.x.4708/router/libncurses/staged/usr/lib -fPIC -o nano browser.o chars.o color.o cut.o files.o global.o help.o move.o nano.o prompt.o rcfile.o search.o text.o utils.o winio.o -lncurses -ltinfo
    /home/tomato/tomato-make/release/src-rt-6.x.4708/toolchains/hndtools-arm-linux-2.6.36-uclibc-4.5.3/bin/../lib/gcc/arm-brcm-linux-uclibcgnueabi/4.5.3/../../../../arm-brcm-linux-uclibcgnueabi/bin/ld: cannot find -ltinfo
    collect2: ld returned 1 exit status
    make[7]: *** [nano] Error 1
    make[7]: Leaving directory `/home/tomato/tomato-make/release/src-rt-6.x.4708/router/nano/src'
    make[6]: *** [all-recursive] Error 1
    make[6]: Leaving directory `/home/tomato/tomato-make/release/src-rt-6.x.4708/router/nano'
    make[5]: *** [all] Error 2
    make[5]: Leaving directory `/home/tomato/tomato-make/release/src-rt-6.x.4708/router/nano'
    make[4]: *** [nano] Error 2
    make[4]: Leaving directory `/home/tomato/tomato-make/release/src-rt-6.x.4708/router'
    make[3]: *** [all] Error 2
    make[3]: Leaving directory `/home/tomato/tomato-make/release/src-rt-6.x.4708'
    make[2]: *** [bin] Error 2
    make[2]: Leaving directory `/home/tomato/tomato-make/release/src-rt-6.x.4708'
    make[1]: *** [z] Error 2
    make[1]: Leaving directory `/home/tomato/tomato-make/release/src-rt-6.x.4708'
    make: *** [r7000z] Error 2
     
  8. azdps

    azdps LI Guru Member

  9. janardhan

    janardhan Network Newbie Member

    Thank you very much azdps.Its got compiled successfuly.
     
  10. azdps

    azdps LI Guru Member

    Glad I could help. If you get the chance maybe you can explain how you were able to successfully build tomato-arm firmware. Might help someone else who may experience the same problems you encountered.
     
  11. janardhan

    janardhan Network Newbie Member

    Tomato-arm7 firmware compilation for R8000

    Step1: installed docker in ubuntu 14.04


    https://docs.docker.com/engine/installation/linux/ubuntulinux/


    Step2 : Once if docker has installed follow the
    below steps.




    i) Install the Container on your host:
    sudo docker run -d -P
    inetpeople/shibby-arm-dev
    for nowing docker id run below command
    sudo docker ps | grep 22/tcp
    ii) then connect to docker on your system using
    below command.

    sudo docker exec -it dockerid bash


    iii) Run get_shibby.sh to get the ARM sources
    and set your environment. It will download the sources from
    bitbucket and set the build ENV for it.


    cd /bin/ && ./get_shibby.sh




    You will find the sources in:
    cd
    /home/tomato/tomato-arm/release/src-rt-6.x.4708/
    iv) Copy the source for compilation
    cd /bin/ && copy_source_to_compile.sh
    v) Run below commands for toolchain and for
    export's path.
    toolchain
    sudo ln -s
    /home/tomato/tomato-make/release/src-rt- 6.x.4708/toolchains/hndtools-arm-linux-2.6.36-uclibc-4.5.3/
    /opt
    # Set $PATH and reload:
    echo "export
    PATH=$PATH:/opt/hndtools-arm-linux-2.6.36-uclibc- 4.5.3/bin:/sbin/"
    >> ~/.profile && source ~/.profile


    vi) Upadating for new branch shibby-arm7


    git fetch && git checkout shibby-arm7


    vii) Run the below command in
    /home/tomato/tomato-arm/srsrc-rt-7.x.main/src/



    make r8000z V1=AT-ARM V2=2.6.36


    viii) After starting compilation for avoiding
    environment build error's

    add below line's in router/common.mak file.
    export PKG_CONFIG_SYSROOT_DIR := $(STAGEDIR)
    export PKG_CONFIG_PATH :=
    $(STAGEDIR)/usr/lib/pkgconfig:$(STAGEDIR)/etc/lib/pkgconfig
    export PKG_CONFIG_LIBDIR :=
    $(STAGEDIR)/usr/lib/pkgconfig:$(STAGEDIR)/usr/share/pkgconfig


    I followed above steps for compiling tomato-arm for R8000...
    if anyone is trying same thing you follow same steps.any error's you post message to me.
     
  12. janardhan

    janardhan Network Newbie Member

    Hi,azdps .sorry for my delayed response because i was in leave last two days.

    Hi,azdps How to enable NAT64 option in same kernel.

    Can anyone help how to configure LAN port as WAN port in tomato R8000
     
    Last edited by a moderator: Nov 30, 2016
  13. azdps

    azdps LI Guru Member

    I've never attempted this and know very little about NAT64. A basic google search revealed some useful information. Visit the following websites:

    http://www.litech.org/tayga/tomato.html
    http://repo.or.cz/w/tomato/nat64.git

    I don't use multiwan so I have no idea. I'm guessing you would need to remap a LAN port as a WAN port. This leads to your next question.

    Again not sure about this. It's usually assign WAN port as LAN port. Below is another useful link reference this particular question:

    http://www.linksysinfo.org/index.php?threads/how-to-remap-lan-port-to-act-as-wan.35788/
     
  14. janardhan

    janardhan Network Newbie Member

    Hi azdps,I connected static ipv6 connection and airtel 3g modem to my R8000 router.
    after that i enabled WIFI,and i am running NAT64(Wrapsix) .

    Wrapsix available at https://www.wrapsix.org/router.html

    wrapsix configuration i given

    INTERFACE : br0
    PREFIX: fc00::
    IPV4_ADDR: 100.71.36.92[airtel 3g modem ]
    HOST_IPV6_ADDR:fe80::1[ipv6 ]
    HOST_IPV4_ADDR:100.71.36.93
    But NAT64 not working.
     
  15. azdps

    azdps LI Guru Member

    janardhan I would suggest asking your Wrapsix (NAT64) question in a new post. You are off topic from your original build problem questions and have moved on to implementing NAT64. As I previously said, I have no experience with NAT64. Maybe someone else will be able to help you out.
     
  16. bax345

    bax345 New Member Member

    Hello All, I am receiving the following error --similar to janardhan and not sure how to fix. Could anyone help me? I am compiling for e2500v3 (Make e3200)

    /home/karthik/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/bin/ld: /home/karthik/tomato/release/src-rt/router/sqlite/.libs/libsqlite3.a(sqlite3.o): Relocations in generic ELF (EM: 62)
    /home/karthik/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/bin/ld: /home/karthik/tomato/release/src-rt/router/sqlite/.libs/libsqlite3.a(sqlite3.o): Relocations in generic ELF (EM: 62)
    /home/karthik/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/bin/ld: /home/karthik/tomato/release/src-rt/router/sqlite/.libs/libsqlite3.a(sqlite3.o): Relocations in generic ELF (EM: 62)
    /home/karthik/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/bin/ld: /home/karthik/tomato/release/src-rt/router/sqlite/.libs/libsqlite3.a(sqlite3.o): Relocations in generic ELF (EM: 62)
    /home/karthik/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/bin/ld: /home/karthik/tomato/release/src-rt/router/sqlite/.libs/libsqlite3.a(sqlite3.o): Relocations in generic ELF (EM: 62)
    /home/karthik/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/bin/ld: /home/karthik/tomato/release/src-rt/router/sqlite/.libs/libsqlite3.a(sqlite3.o): Relocations in generic ELF (EM: 62)
    /home/karthik/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/bin/ld: /home/karthik/tomato/release/src-rt/router/sqlite/.libs/libsqlite3.a(sqlite3.o): Relocations in generic ELF (EM: 62)
    /home/karthik/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/bin/ld: /home/karthik/tomato/release/src-rt/router/sqlite/.libs/libsqlite3.a(sqlite3.o): Relocations in generic ELF (EM: 62)
    /home/karthik/tomato/release/src-rt/router/sqlite/.libs/libsqlite3.a: could not read symbols: File in wrong format
    collect2: ld returned 1 exit status
    make[6]: *** [minidlna] Error 1
    make[6]: Leaving directory `/home/karthik/tomato/release/src/router/minidlna'
    make[5]: *** [minidlna] Error 2
    make[5]: Leaving directory `/home/karthik/tomato/release/src/router'
    make[4]: *** [all] Error 2
    make[4]: Leaving directory `/home/karthik/tomato/release/src-rt'
    make[3]: *** [bin] Error 2
     

Share This Page