This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

virtualbox ubuntu and tftp



Good Afternoon

If got a problem:

I've setup the boot by sd card an can startup the evm.

I'm building the helloworld regarding the "DM814x AM387x EZ 5.02 Software Developers Guide".

I put the helloworld* into the folder regarding the description there:

host $ mkdir ${HOME}/targetfs/home/root/dm814x
host $ cp helloworld ${HOME}/targetfs/home/root/dm814x

At the target I'm entering

root@dm814x-evm:~# /home/root/dm814x/helloworld

and get the answer

-sh: /home/root/dm814x/helloworld: not found

From host and target side I can ping at get the right result.

tftp file transfer is not possible. For these commands I get "tftf timed out."

timeout ist set to 60.
iptables was called with "iptables -F" before. So it should allow data handling in ay way.
 Aswell I switch of the windows firewall.

What is wrong for calling the helloworld?

Many thanks and best regards

Oliver




  • You create directory on host and after boot board you try run application from this directory, I am right?

    If you must run application on your board you must copy it on board or mount directory with application, e.g. on NFS.

  • Hi Oliver,

    Make sure that your copied location (directory) and accessing from the target are same.

    I have some questions here,

    Which file system you are using? NFS/SD/JFFS2?

    Does tftp server is running on your virtual machine (ubuntu)? Do you copy the helloworld application to tftp folder?

    Regards

    AnilKumar

    Please mark this Forum post as answered via the Verify Answer button below if it helps answer your question.  Thanks!

  • Many thanks for your prompt reply. You
    gave me the inspiration not to take a timeout.

    What I basically not understand is the
    way how the target can find the “path” to the folder where the wanted
    application is located. What do I have to mount?

     

    What I did until now is the following:

     

    ./setup.sh

    iptables –F

    windows 7 firewall all to off

     

    File system  nfs.

     

    For the SD-card I was using

    host
    $ sudo ${EZSDK}/bin/mksdboot.sh --device /dev/sdb --sdk ${EZSDK}” as shown in
    the manuals

     

    On host xinet is used:

    host:~$ ps aux | egrep '[xi]netd'

    root      1018 
    0.0  0.0   2492   888
    ?        Ss   07:15  
    0:00 /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive -inetd_compat
    -inetd_ipv6

     

    /etc/default/aftftpd

    #USE_INETD=true

    USE_INETD=false

    OPTIONS="--tftpd-timeout 300 --retry-timeout 5
    --mcast-port 1758 --mcast-addr 239.239.239.0-255 --mcast-ttl 1 --maxthread 100
    --verbose=5 /tftpboot"

     

    at “etc/xinet.d/tftp”

                   
    service tftp

    {

    protocol = udp

    port = 69

    socket_type = dgram

    wait = yes

    user = nobody

    server = /usr/sbin/in.tftpd

    server_args = -s -c /tftpboot

    disable = no

    }

     

    I’m restarting

                   
    /etc/init.d/xinetd restart

     

    /tftpboot is

                   
    drwxrwxrwx   2 nobody root  4096 2012-04-17 15:43 tftpboot/

     

    Test tftp

                   
    echo "Hello, embedded world" > /tftpboot/hello.txt

     

    ll /tftpboot

    drwxrwxrwx  2 nobody root    
    4096 2012-04-18 07:51 ./

    drwxr-xr-x 23 root  
    root     4096 2012-04-18 07:50 ../

    -rw-r--r--  1 nobody owilhelm   22
    2012-04-18 07:51 hello.txt

    -rwxr-xr-x  1 nobody owilhelm 5686 2012-04-17
    14:27 helloworld

                   

    Test tftp

    host:~$ tftp localhost

    tftp> get hello.txt

    Received 23 bytes in 0.0 seconds

    tftp> quit

     

    ~/targetfs

    drwxr-xr-x 18 owilhelm
    owilhelm       4096 2012-04-12 07:22 targetfs/

    drwxrwsrwx  3 owilhelm owilhelm 4096 2011-12-09
    13:52 home/

    drwxrwsrwx  3 owilhelm owilhelm 4096 2012-04-16
    11:39 root/

                   
    drwxrwsrwx 2 owilhelm owilhelm 4096 2012-04-16 11:40 dm814x/

                   
    and at dm814x

                                  
    -rwxrwxrwx 1 owilhelm owilhelm 5686 2012-04-16 11:40 helloworld*

     

    On target via putty or minicom

                   
    Dm814x-evm login: root

                   
    root@ Dm814x-evm:~# /home/root/dm814x/helloworld

                   
    -sh; /home/root/dm814x/helloworld: not found

     

    Many thanks

     

    Oliver

  • Many thanks for your prompt reply. You
    gave me the inspiration not to take a timeout.

    What I basically not understand is the
    way how the target can find the “path” to the folder where the wanted
    application is located. Do I have to mount anything?

     

    What I did until now is the following:

     

    ./setup.sh

    iptables –F

    windows 7 firewall all to off

     

    File system  nfs.

     

    For the SD-card I was using

    host
    $ sudo ${EZSDK}/bin/mksdboot.sh --device /dev/sdb --sdk ${EZSDK}” as shown in
    the manuals

     

    On host xinet is used:

    host:~$ ps aux | egrep '[xi]netd'

    root      1018 
    0.0  0.0   2492   888
    ?        Ss   07:15  
    0:00 /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive -inetd_compat
    -inetd_ipv6

     

    /etc/default/aftftpd

    #USE_INETD=true

    USE_INETD=false

    OPTIONS="--tftpd-timeout 300 --retry-timeout 5
    --mcast-port 1758 --mcast-addr 239.239.239.0-255 --mcast-ttl 1 --maxthread 100
    --verbose=5 /tftpboot"

     

    at “etc/xinet.d/tftp”

                   
    service tftp

    {

    protocol = udp

    port = 69

    socket_type = dgram

    wait = yes

    user = nobody

    server = /usr/sbin/in.tftpd

    server_args = -s -c /tftpboot

    disable = no

    }

     

    I’m restarting

                   
    /etc/init.d/xinetd restart

     

    /tftpboot is

                   
    drwxrwxrwx   2 nobody root  4096 2012-04-17 15:43 tftpboot/

     

    Test tftp

                   
    echo "Hello, embedded world" > /tftpboot/hello.txt

     

    ll /tftpboot

    drwxrwxrwx  2 nobody root    
    4096 2012-04-18 07:51 ./

    drwxr-xr-x 23 root  
    root     4096 2012-04-18 07:50 ../

    -rw-r--r--  1 nobody owilhelm   22
    2012-04-18 07:51 hello.txt

    -rwxr-xr-x  1 nobody owilhelm 5686 2012-04-17
    14:27 helloworld

                   

    Test tftp

    host:~$ tftp localhost

    tftp> get hello.txt

    Received 23 bytes in 0.0 seconds

    tftp> quit

     

    ~/targetfs

    drwxr-xr-x 18 owilhelm
    owilhelm       4096 2012-04-12 07:22 targetfs/

    drwxrwsrwx  3 owilhelm owilhelm 4096 2011-12-09
    13:52 home/

    drwxrwsrwx  3 owilhelm owilhelm 4096 2012-04-16
    11:39 root/

                   
    drwxrwsrwx 2 owilhelm owilhelm 4096 2012-04-16 11:40 dm814x/

                   
    and at dm814x

                                  
    -rwxrwxrwx 1 owilhelm owilhelm 5686 2012-04-16 11:40 helloworld*

     

    On target via putty or minicom

                   
    Dm814x-evm login: root

                   
    root@ Dm814x-evm:~# /home/root/dm814x/helloworld

                   
    -sh; /home/root/dm814x/helloworld: not found

     

    Many thanks

     

    Oliver

  • Hi Oliver,

    -rwxrwxrwx 1 owilhelm owilhelm 5686 2012-04-16 11:40 helloworld*

    Why the file is helloworld* instead of helloworld?

    Can you do tftp from target?

    $ tftp -g <tftp server ip> -r hello.txt

    and

    $ tftp -g <tftp server ip> -r helloworld

    Regards

    AnilKumar

    Please mark this Forum post as answered via the Verify Answer button below if it helps answer your question.  Thanks!

  • Hello Anil

    Thanks for your answer.

    This command I've tried on target yesterday, too.

    I do "ifconfig eth0 192.168.0.154 netmask 255.255.255.0" on target

    The exact command I've set on target is "tftp -g 192.168.0.154 -r hello.txt". The ip is the what I get with windows command ipconfig at the host.

    For that I get "tftp: timeout".

    Regards

    Oliver

  • Hi Oliver,

    Can you answer to my first question in my previous post?

    ipaddress should be get from ubuntu not from windows, because your tftp server is running on ubuntu not on windows.

    Another way is you can install tftp server in windows and you can tftp from there.

    I think you missed out the Network bridge connection in virtualbox.

    Regards

    AnilKumar

    Please mark this Forum post as answered via the Verify Answer button below if it helps answer your question.  Thanks!

  • Hello Anil

    helloworld is "helloworld*" after make. I'm just using the examples out of the manual "DM814x AM387x EZ 5.02 Software Developers Guide"

    Regards

    Oliver

  • Hi Oliver,

    Can you try building with static keyword?

    linux-host$ arm-arago-linux-gnueabi-gcc -static -o helloworld helloworld.c

    Regards

    AnilKumar

    Please mark this Forum post as answered via the Verify Answer button below if it helps answer your question.  Thanks!

  • Hi Anil

    nothing changed. The file is just 10 times larger.

    I've changed the network ip of ubuntu to 192.168.0.155 with netmask 255.255.255.0.

    by using command tftp -g 192.168.0.155 -r helloworld I get tftp timeout

    Regards

    Oliver

  • Hi Oliver,

    Can try these commands in you host machine (ubuntu)? You should call these from any where except /tftpboot

    linux-host$ sudo tftp 192.168.0.155

    tftp > bin

    tftp > get helloworld

    tftp > quit

    linux-host$

    Regards

    AnilKumar

  • Hi Anil

    the server works:

    host$ sudo tftp 192.168.0.155

    tftp> bin

    tftp> get helloworld

    Received 5686 bytes in 0.1 seconds

    tftp> quit

    Regards

    Oliver

  • Hello

    When I was following the intrduction of "DM814x AM387x EZ5.02Software Developers Guide" and starting setup.sh and using the outputs at the end of script I could start communication with the eval board.

    Oliver

  • Hello

    I got same problem.

    How did you fix it???

    chshin@chshin-desktop:~$ sudo tftp 192.168.0.189
    [sudo] password for chshin:
    tftp> bin
    tftp> get helloworld
    Received 5686 bytes in 0.0 seconds
    tftp> quit

  • Hi Shin,

    Have you followed the exact steps specified in "DM814x AM387x EZ5.02Software Developers Guide"?

    Can you try this command on board?

    $ tftp -g <tftp server ip> -r helloworld

    Regards

    AnilKumar

    Please mark this Forum post as answered via the Verify Answer button below if it helps answer your question.  Thanks!

  • Hi Anil

     I Followed the steps.

    I got next messages.

    root@dm814x-evm:~# tftp -g < tftp 192.168.0.189 > -r helloworld
    -sh: can't open tftp: no such file

  • Hi Shin,

    You have to try this command

    $ tftp -g 192.168.0.189 -r helloworld

    Regards

    AnilKumar

    Please mark this Forum post as answered via the Verify Answer button below if it helps answer your question.  Thanks!

  • Hi Anil,

    I tried again.

    I got following response.

    root@dm814x-evm:~# tftp -g 192.168.0.189 -r helloworld
    tftp: sendto: Network is unreachable

    How can i connect network?

  • Additional information is Followed :::::

    root@dm814x-evm:~# tftp -g 192.168.0.189 -r helloworld
    tftp: sendto: Network is unreachable
    root@dm814x-evm:~# ifconfig
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

  • Hi Shin,

    Your ethernet port is not up.

    Have you connected ethernet cable to the board? If yes, can you try this command

    $ ifconfig eth0 up

    And provide the ifconfig details.

    Regards

    AnilKumar

    Please mark this Forum post as answered via the Verify Answer button below if it helps answer your question.  Thanks!

  • Hi Anil

    I got following response

    root@dm814x-evm:~# ifconfig eth0 up
    ifconfig: SIOCGIFFLAGS: No such device

    thanks

  • Hi Shin,

    [root@arago /]# ifconfig eth0 up
    [  809.479064]
    [  809.479064] CPSW phy found : id is : 0x4dd074
    [  809.486785] PHY 0:01 not found
    [root@arago /]#
    [root@arago /]#
    [root@arago /]#
    [root@arago /]# [  812.474517] PHY: 0:00 - Link is Up - 100/Full

    which filesystem you are using? Have you modify the kernel config?

    Regards

    AnilKumar

    Please mark this Forum post as answered via the Verify Answer button below if it helps answer your question.  Thanks!

  • Anil said:

    Hi Shin,

    [root@arago /]# ifconfig eth0 up
    [  809.479064]
    [  809.479064] CPSW phy found : id is : 0x4dd074
    [  809.486785] PHY 0:01 not found
    [root@arago /]#
    [root@arago /]#
    [root@arago /]#
    [root@arago /]# [  812.474517] PHY: 0:00 - Link is Up - 100/Full

    which filesystem you are using? Have you modify the kernel config?

    Regards

    AnilKumar

    Please mark this Forum post as answered via the Verify Answer button below if it helps answer your question.  Thanks!

     
    Hi Shin and Anil,
     
    I came across this thread because I have the same issue when sending command
    tftp 146.252.42.80 -g -r a.txt
    I got "tftp: sendto: Network is unreachable"
     
    I'm sending the command from EVM which has ethnet connection and my host is running tftpserver.
     
    Is there any solution available?
     
    THanks
     
    Michelle