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.

Linux/EVMK2H: Couldn't Connect through SFTP Server.

Part Number: EVMK2H

Tool/software: Linux

Hi, 

I updated my SDK and flashed the already included images into my board. However i cannot connect through the SFTP server anymore. I do get assigned to an IP address, I am using WINSCP to connect to the SFTP Server, when i do try to connect, WINSCP responds me with "The server rejected SFTP connection, but it listens for FTP connections". 

and when i try FTP it responds me with

No connection could be made because the target machine actively refused it.

It worked perfectly fine with the previous linux kernel, I have been using it for months. Any ideas what might be wrong? 

Best Regards

Sheraz javaid

  • Hi,

    I've notified the team. Their feedback will be posted here.

    Best Regards,
    Yordan
  • Hi Yordon,
    I am waiting for the response, However i believe a file is missing from the /boot directory of the board, can i somehow transfer it to the board, without using the ftp server or USB? As USB on my board isn't working. Is there any way to transfer files to the /boot directory using UART maybe?

    Best Regards
    Sheraz Javaid
  • Hi, Sheraz,

    you can tftp a file to a memory location in u-boot, but I have not tried to write from a memory location to a file in flash file system /boot. You may need to google it.

    Could you try using boot=net to boot the board using images from tftp server and file system on NFS server? Then, change the kernel image to the new one and see if it boots fine, and may be debug using NFS file system. Once verified, you may need to rebuild the image to flash to the board.

    Rex
  • Hi Rex,

    I am new to all this, i need some more guidance to check what you suggested, is there a wiki guide maybe?

    what i think the issue is, i have a file missing, as per the log below,

    2 GiB

    NAND:  512 MiB

    Net:

    Warning: netcp@2000000 using MAC address from ROM

    eth0: netcp@2000000

    Warning: netcp@slave-1 (eth1) using random MAC address - 0a:64:48:dd:e8:1e

    , eth1: netcp@slave-1

    Warning: netcp@slave-2 (eth2) using random MAC address - 3e:4c:30:d5:a8:3a

    , eth2: netcp@slave-2

    Warning: netcp@slave-3 (eth3) using random MAC address - 92:0b:06:2f:09:01

    , eth3: netcp@slave-3

    Hit any key to stop autoboot:  0

    ubi0: attaching mtd1

    ubi0: scanning is finished

    ubi0: attached mtd1 (name "mtd=2", size 510 MiB)

    ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes

    ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048

    ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096

    ubi0: good PEBs: 4078, bad PEBs: 6, corrupted PEBs: 0

    ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128

    ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 1219849320

    ubi0: available PEBs: 0, total reserved PEBs: 4078, PEBs reserved for bad PEB handling: 74

    Loading file '/boot/skern-k2hk.bin' to addr 0x87000000...

    Done

    K2_BM_15.07-53-ge1f885a SoC:k2hk built:17:59:36, Jun 28 2017

    ## installed monitor @ 0xc5f0000, freq [200000000], status 207552512

    Loading file '/boot/zImage' to addr 0x82000000...

    Done

    Loading file '/boot/k2-fw-initrd.cpio.gz' to addr 0x88080000...

    ** File not found /boot/k2-fw-initrd.cpio.gz **

    Loading file '/boot/keystone-k2hk-evm.dtb' to addr 0x88000000...

    Done

    ## Flattened Device Tree blob at 88000000

      Booting using the fdt blob at 0x88000000

      Loading Ramdisk to 8fcc9000, end 8ffff340 ... OK

      Loading Device Tree to 8fcbb000, end 8fcc880b ... OK

    Starting kernel ...

    [    0.000000] Booting Linux on physical CPU 0x0

    Now, i dont know what does the file do, thus i am not sure whether this is the issue or not, what do you think? If it is the issue we are looking for, how can i resolve it?

    Best Regards

    Sheraz Javaid

  • Sheraz,

    That file is the firmware for the ethernet phy. You won't have ethernet connection without it. You should be able to find it in board-support/prebuit-images folder or in boot directory after you untar the tisdk-server-rootfs tarball.

    Rex
  • Hi Rex,
    My question still remains the same. How do i transfer this file to the /boot directory of my board? As i mentioned earlier my USB isn't functional, and i cant transfer files through the FTP server.

    Best Regards
    Sheraz Javaid
  • Hi, Sheraz,

    Did you ever boot it once successfully or you try the image the first time and lost the ethernet connection? You may have to back out and restart with a good image.

    Rex

  • Hi Rex,

    I tried the image first time. I do get assigned an IP address, ping works fine, still i am not able to establish SFTP or FTP server. I got the USB working, thus i was able to place the k2-fw-initrd.cpio.gz in the /boot directory and rebooted, it now loads during boot up. However i am still not able to establish a FTP connection. What do you think?

  • Sheraz,

    If you can ping, it should work. Are you using ftp or sftp? ftp won't work but sftp will.

    Rex
  • I can ping, and it still doesn't work. FTP and SFTP, none of them works. when i do try to connect through SFTP,
    WINSCP responds me with

    "The server rejected SFTP connection, but it listens for FTP connections".

    and when i try FTP it responds me with

    No connection could be made because the target machine actively refused it.
  • Sheraz,

    I am not sure why it doesn't work for you. You may want to check the sftp configuration. I don't see the issue on my system. Below are the capture of the logs from my Linux host and EVM console.

    Linux Host:
    uda:~/work$ sftp root@158.218.109.189
    Connected to 158.218.109.189.
    sftp> lls
    tmp
    uart2
    uart.diff
    sftp> put uart.diff
    Uploading uart.diff to /home/root/uart.diff
    uart.diff 100% 969 1.0KB/s 00:00
    sftp> exit


    [ OK ] Started Print notice about GPLv3 packages.

    _____ _____ _ _
    | _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
    | | _| .'| . | . | | __| _| . | | | -_| _| _|
    |__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
    |___| |___|

    Arago Project http://arago-project.org k2hk-evm ttyS0

    Arago 2016.12 k2hk-evm ttyS0

    k2hk-evm login: [ 31.805271] keystone-rapidio 2900000.rapidio: RIO port register timeout, port mask 0x1 not ready
    root
    root@k2hk-evm:~# ifconfig
    eth0 Link encap:Ethernet HWaddr B4:99:4C:9F:7F:F9
    inet addr:158.218.109.189 Bcast:158.218.109.255 Mask:255.255.255.0
    inet6 addr: fe80::b699:4cff:fe9f:7ff9%132688/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:53813 errors:0 dropped:68 overruns:0 frame:0
    TX packets:46580 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:58489959 (55.7 MiB) TX bytes:6918024 (6.5 MiB)

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1%132688/128 Scope:Host
    UP LOOPBACK RUNNING MTU:65536 Metric:1
    RX packets:174 errors:0 dropped:0 overruns:0 frame:0
    TX packets:174 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1
    RX bytes:13220 (12.9 KiB) TX bytes:13220 (12.9 KiB)

    root@k2hk-evm:~# ls
    uart.diff
    root@k2hk-evm:~# ls -l
    -rw-r--r-- 1 root root 969 Sep 21 2017 uart.diff
    root@k2hk-evm:~#