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.

J721EXSOMXEVM: Move files to EVM with NFS

Part Number: J721EXSOMXEVM

Tool/software:

Hello!

I'm having difficulties moving files to the EVM. My goal would be to just move a basic helloworld executable to the EVM to make sure that I'm able to copy files to the target and execute them.

I have an Ubuntu 20.04LTS distro on my PC, so I use the tisdk docker container.

So far I've done the following steps:
1. run setup.sh

2. compiled helloworld.c based on the instructions in 1.1.4 GCC ToolChain

3. copied the file into the targetNFS folder in the docker container

4. ran: sudo minicom -S ./bin/setupBoard.minicom interrupting the boot, then enter the commands that can be found in this forum post

After boot and login as root in the target i cannot see the file that I've copied to the targetNFS file structure. Also tried to mount the target filesystem with: sudo mount -f nfs command, however it returns mount.nfs: Connection refused.

So not sure whether I'm messing up something with the workflow, or the eth connection is the bottleneck here.

Thanks a lot.

Regards,

Marton

 
  • Hi Marton,

    If you run the setup.sh script, you should be able to boot from NFS using the script afterwards. The setupBoard.minicom script will send all of the commands that are mentioned in the E2E post.

    Can you try running the minicom script, then turning the board on?

    My second thought would be that the docker container is accessible through a different ip address than what was fed to the setup.sh script.

    Best,
    Jared

  • Hi Jared!

    Retrying the booting with the instructions you gave me shed light on multiple possible issues:


    So first of all after I've attached the docker container I reran the setup.sh. For that I've received the following output:

    -------------------------------------------------------------------------------
    TISDK setup script
    This script will set up your development host for SDK development.
    Parts of this script require administrator priviliges (sudo access).
    -------------------------------------------------------------------------------

    --------------------------------------------------------------------------------
    Verifying Linux host distribution
    Ubuntu 22.04 LTS is being used, continuing..
    --------------------------------------------------------------------------------

    Starting with Ubuntu 12.04 serial devices are only accessible by members of the 'dialout' group.
    A user must be apart of this group to have the proper permissions to access a serial device.

    Are you running this script using sudo? The detected username is 'root'.
    Verify and enter your Linux username below
    [ root ]

    User 'root' is already apart of the 'dialout' group

    Do you wish to install required host packages (Press (Y) to run, (n) to skip)? n
    host packages installation skipped
    Do you wish to run nfs setup (Press (Y) to run, (n) to skip) ? y
    --------------------------------------------------------------------------------
    In which directory do you want to install the target filesystem?(if this directory does not exist it will be created)
    [ /home/tisdk/ti-processor-sdk-linux-adas-j721e-evm-09_02_00_05/targetNFS ]
    --------------------------------------------------------------------------------

    --------------------------------------------------------------------------------
    This step will extract the target filesystem to /home/tisdk/ti-processor-sdk-linux-adas-j721e-evm-09_02_00_05/targetNFS

    Note! This command requires you to have administrator priviliges (sudo access)
    on your host.
    Press return to continue
    /home/tisdk/ti-processor-sdk-linux-adas-j721e-evm-09_02_00_05/targetNFS already exists
    (r) rename existing filesystem (o) overwrite existing filesystem (s) skip filesystem extraction
    [r] s
    Skipping filesystem extraction
    WARNING! Keeping the previous filesystem may cause compatibility problems if you are upgrading the SDK
    --------------------------------------------------------------------------------

    --------------------------------------------------------------------------------
    This step will set up the SDK to install binaries in to:
        /home/tisdk/ti-processor-sdk-linux-adas-j721e-evm-09_02_00_05/targetNFS/home/root/j721e-evm

    The files will be available from /home/root/j721e-evm on the target.

    This setting can be changed later by editing Rules.make and changing the
    ROOTFS_PART variable.

    Press return to continue
    Rules.make edited successfully..
    --------------------------------------------------------------------------------

    --------------------------------------------------------------------------------
    This step will export your target filesystem for NFS access.

    Note! This command requires you to have administrator priviliges (sudo access)
    on your host.
    Press return to continue
    /home/tisdk/ti-processor-sdk-linux-adas-j721e-evm-09_02_00_05/targetNFS already NFS exported, skipping..

     * Stopping NFS kernel daemon                                                                                                                                                                       [ OK ]
     * Unexporting directories for NFS kernel daemon...                                                                                                                                                

    [ OK ]
     * Exporting directories for NFS kernel daemon...                                                                                                                                                          exportfs: /home/tisdk/ti-processor-sdk-linux-adas-j721e-evm-09_02_00_05/targetNFS does not support NFS export
                                                                                                                                                                                                        [fail]
    Failed setup, aborting..
    Failed setup, aborting..
    _____________________________________________________________________________________________________

    That seems a potential fatal error, not sure what I've done wrong here. Also tried the overriding, but that also have me the same failed result.  After that I've tried to bootup the EVM anyway with the minicom script, and not interrupting the bootup:
    _____________________________________________________________________________________________________

    U-Boot SPL 2021.01-g44a87e3ab8 (Mar 23 2022 - 21:34:29 +0000)
    Model: Texas Instruments K3 J721E SoC
    Board: J721EX-PM2-SOM rev A
    SYSFW ABI: 3.1 (firmware rev 0x0016 '22.1.1--v2022.01 (Terrific Llam')
    Trying to boot from MMC2
    Starting ATF on ARM64 core...

    NOTICE: BL31: v2.5(release):08.01.00.006-dirty
    NOTICE: BL31: Built : 21:03:57, Mar 23 2022

    U-Boot SPL 2021.01-g44a87e3ab8 (Mar 23 2022 - 21:04:54 +0000)
    Model: Texas Instruments K3 J721E SoC
    Board: J721EX-PM2-SOM rev A
    SYSFW ABI: 3.1 (firmware rev 0x0016 '22.1.1--v2022.01 (Terrific Llam')
    Detected: J7X-BASE-CPB rev A
    Detected: J7X-VSC8514-ETH rev E2
    Trying to boot from MMC2


    U-Boot 2021.01-g44a87e3ab8 (Mar 23 2022 - 21:04:54 +0000)

    SoC: J721E SR1.1
    Model: Texas Instruments K3 J721E SoC
    Board: J721EX-PM2-SOM rev A
    DRAM: 4 GiB
    Flash: 0 Bytes
    MMC: sdhci@4f80000: 0, sdhci@4fb0000: 1
    In: serial@2800000
    Out: serial@2800000
    Err: serial@2800000
    am65_cpsw_nuss ethernet@46000000: K3 CPSW: nuss_ver: 0x6BA00101 cpsw_ver: 0x6BA80100 ale_ver: 0x00293904 Ports:1 mdio_freq:1000000
    Detected: J7X-BASE-CPB rev A
    Detected: J7X-VSC8514-ETH rev E2
    cdns,sierra serdes@5000000: sierra probed
    Net: eth0: ethernet@46000000port@1
    Hit any key to stop autobo 0
    =>env default -f -a
    ## Resetting to default environment
    =>saveenv
    Saving Environment to FAT... OK
    =>reset
    resetting ...

    U-Boot SPL 2021.01-g44a87e3ab8 (Mar 23 2022 - 21:34:29 +0000)
    Model: Texas Instruments K3 J721E SoC
    Board: J721EX-PM2-SOM rev A
    SYSFW ABI: 3.1 (firmware rev 0x0016 '22.1.1--v2022.01 (Terrific Llam')
    Trying to boot from MMC2
    Starting ATF on ARM64 core...

    NOTICE: BL31: v2.5(release):08.01.00.006-dirty
    NOTICE: BL31: Built : 21:03:57, Mar 23 2022

    U-Boot SPL 2021.01-g44a87e3ab8 (Mar 23 2022 - 21:04:54 +0000)
    Model: Texas Instruments K3 J721E SoC
    Board: J721EX-PM2-SOM rev A
    SYSFW ABI: 3.1 (firmware rev 0x0016 '22.1.1--v2022.01 (Terrific Llam')
    Detected: J7X-BASE-CPB rev A
    Detected: J7X-VSC8514-ETH rev E2
    Trying to boot from MMC2


    U-Boot 2021.01-g44a87e3ab8 (Mar 23 2022 - 21:04:54 +0000)

    SoC: J721E SR1.1
    Model: Texas Instruments K3 J721E SoC
    Board: J721EX-PM2-SOM rev A
    DRAM: 4 GiB
    Flash: 0 Bytes
    MMC: sdhci@4f80000: 0, sdhci@4fb0000: 1
    In: serial@2800000
    Out: serial@2800000
    Err: serial@2800000
    am65_cpsw_nuss ethernet@46000000: K3 CPSW: nuss_ver: 0x6BA00101 cpsw_ver: 0x6BA80100 ale_ver: 0x00293904 Ports:1 mdio_freq:1000000
    Detected: J7X-BASE-CPB rev A
    Detected: J7X-VSC8514-ETH rev E2
    cdns,sierra serdes@5000000: sierra probed
    Net: eth0: ethernet@46000000port@1
    Hit any key to stop autobo 0
    =>setenv serverip 172.17.0.2
    =>setenv nfs_root /home/tisdk/ti-processor-sdk-linux-adas-j721e-evm-09_02_00_05/targetNFS
    =>setenv name_kern Image-j721e-evm.bin
    =>setenv bootcmd 'run envboot; run findfdt; run setup_${kern_boot}; run init_${rootfs_boot}; run boot_rprocs; run get_kern_${kern_boot}; run get_fdt_${kern_boot}; run get_overlay_${kern_boot}; run run_k'
    =>setenv setup_mmc ''
    =>setenv setup_tftp 'setenv autoload no; dhcp'
    =>setenv get_kern_tftp 'tftp ${loadaddr} ${name_kern}'
    =>setenv get_fdt_tftp 'tftp ${fdtaddr} ${name_fdt}'
    =>setenv get_overlay_tftp 'fdt address ${fdtaddr};fdt resize 0x100000;for overlay in ${name_overlays};do;tftp ${dtboaddr} ti/${overlay} && fdt apply ${dtboaddr}; done'
    =>setenv kern_boot tftp
    =>setenv init_net 'run args_all args_net; setenv autoload no; dhcp'
    =>setenv args_net 'setenv bootargs console=${console} ${optargs} rootfstype=nfs root=/dev/nfs rw nfsroot=${serverip}:${nfs_root},${nfs_options} ip=dhcp'
    =>setenv nfs_options 'nolock,v3,tcp,rsize=4096,wsize=4096'
    =>setenv rootfs_boot net
    =>boot
    switch to partitions #0, OK
    mmc1 is current device
    SD/MMC found on device 1
    Failed to load 'boot.scr'
    0 bytes read in 1 ms (0 Bytes/s)
    Loaded env from uEnv.txt
    Importing environment from mmc1 ...
    k3-navss-ringacc ringacc@2b800000: Ring Accelerator probed rings:286, gp-rings[96,20] sci-dev-id:235
    k3-navss-ringacc ringacc@2b800000: dma-ring-reset-quirk: disabled
    am65_cpsw_nuss_port ethernet@46000000port@1: K3 CPSW: rflow_id_base: 2
    am65_cpsw_nuss_port ethernet@46000000port@1: am65_cpsw_start end error
    am65_cpsw_nuss_port ethernet@46000000port@1: K3 CPSW: rflow_id_base: 2
    am65_cpsw_nuss_port ethernet@46000000port@1: am65_cpsw_start end error
    am65_cpsw_nuss_port ethernet@46000000port@1: K3 CPSW: rflow_id_base: 2
    am65_cpsw_nuss_port ethernet@46000000port@1: am65_cpsw_start end error
    am65_cpsw_nuss_port ethernet@46000000port@1: K3 CPSW: rflow_id_base: 2
    am65_cpsw_nuss_port ethernet@46000000port@1: am65_cpsw_start end error
    libfdt fdt_check_header(): FDT_ERR_BADMAGIC
    No FDT memory address configured. Please configure
    the FDT address via "fdt addr <address>" command.
    Aborting!
    Bad Linux ARM64 Image magic!
    _________________________________________________________________________________________________

    Interestingly with interrupting boot and manually adding the commands I've managed to boot the EVM. Tried to ping my IP:


    root@j7-evm:/# ping 172.17.0.1
    PING 172.17.0.1 (172.17.0.1): 56 data bytes
    ping: sendto: Network is unreachable

    during the minicom communication this error also kept popping up on my host PC:




    So maybe the eth is the problem after all? Not so sure.

    Anyway thanks a lot for the assistance.

  • Hi Marton,

    Have you installed the necessary packages for running the nfs server? I assume you have, but figured I'd ask.

    Can you check the ip address of the contianer with ifconfig for me? Also try pinging the container from your host and vice-versa.

    Best,
    Jared

  • Hi jared!

    I'm sorry for being passive for such a long time. In the meanwhile I got an idea, that maybe corporate proxy could be the problem. I retried the whole process with an internal container image, but I'm still facing the same issue. Anyway I did the pinging

    The setup script returns:
    -------------------------------------------------------------------------------
    System has required packages!
    System has required python3 packages!
    --------------------------------------------------------------------------------
    Package verification and installation successfully completed
    __________________________________________________________________________-

    The host IP is: 172.17.0.1,

    the EVM is:     172.17.0.2.

    So that seems to be OK. Also managed to ping the host:

    root@j7-evm:/# ping 172.17.0.1
    PING 172.17.0.1 (172.17.0.1): 56 data bytes
    64 bytes from 172.17.0.1: seq=0 ttl=64 time=0.127 ms
    64 bytes from 172.17.0.1: seq=1 ttl=64 time=0.094 ms
    64 bytes from 172.17.0.1: seq=2 ttl=64 time=0.087 ms
    64 bytes from 172.17.0.1: seq=3 ttl=64 time=0.091 ms
    ^C
    --- 172.17.0.1 ping statistics ---
    4 packets transmitted, 4 packets received, 0% packet loss
    round-trip min/avg/max = 0.087/0.099/0.127 ms
    ___________________________________________________________________________

    And the EVM also:

    root@6ab0d59fdfb5:/opt/ti-processor-sdk-linux-adas-j721e-evm-09_02_00_05# ping 172.17.0.2
    PING 172.17.0.2 (172.17.0.2) 56(84) bytes of data.
    64 bytes from 172.17.0.2: icmp_seq=1 ttl=64 time=0.040 ms
    64 bytes from 172.17.0.2: icmp_seq=2 ttl=64 time=0.048 ms
    64 bytes from 172.17.0.2: icmp_seq=3 ttl=64 time=0.048 ms
    64 bytes from 172.17.0.2: icmp_seq=4 ttl=64 time=0.046 ms
    64 bytes from 172.17.0.2: icmp_seq=5 ttl=64 time=0.047 ms
    64 bytes from 172.17.0.2: icmp_seq=6 ttl=64 time=0.052 ms
    64 bytes from 172.17.0.2: icmp_seq=7 ttl=64 time=0.043 ms
    ___________________________________________________________________________

    So no obvious problem yet, but * Exporting directories for NFS kernel daemon...    part of the script still returns error.

  • Hi Marton,

    Is it possible to set up the NFS server outside of the script?

    Best,
    Jared

  • Hi Jared!

    Unfortunately, If I try manually, I receive the same error:
    sudo service nfs-kernel-server start
     * Exporting directories for NFS kernel daemon...                                                                                                                                                          exportfs: /export/ti-processor-sdk-linux-adas-j721e-evm-09_02_00_05/targetNFS does not support NFS export

    Tried to look into it on Stackoverflow and moved the files from opt to a newly created folder, export and removed encryption with chattr, since nfs cannot export encrypted folders. Still got the same error though.

    The content of /etc/exports:
    /export/ti-processor-sdk-linux-adas-j721e-evm-09_02_00_05/targetNFS *(rw,nohide,insecure,no_subtree_check,async,no_root_squash)

    Any idea?

    Regards,

    Marton

  • Hi Marton,

    Are you starting the container as a privileged container?

    Best,
    Jared

  • Hi Jared!

    Yes, I'm quite sure. 

    From the host side:
    #host $ docker inspect --format='{{.HostConfig.Privileged}}' 6ab0d59fdfb5
    true

    Also I have access to all /dev/* drivers inside the image.

    Regards,

    Marton

  • Hi Marton,

    Is the exported path specified as a volume in the container?

    Also found some documentation here: https://hub.docker.com/r/erichough/nfs-server/

    Best,
    Jared

  • Hi Jared!

    With the corporate image it seems it does not:

    # host docker inspect -f '{{ .Mounts }}' 6ab0d59fdfb5
    []

    Which make sense since I cannot startup the nfs-server, because of rootfs.

    I tried to hack NFS export with the help of the link you've sent me:

    I've copied the targetNFS folder, and export.txt file from the image and started up the erichough/nfs-server.

    For that the volume seems to be OK:

    #host docker inspect -f '{{ .Mounts }}' dcb9c7cbacae
    [{bind  /home/vim1bp/export.txt /etc/exports  ro false rprivate} {bind  /home/vim1bp/ti_targetNFS/targetNFS /targetNFS   true rprivate}]

    However the boardSetup.minicom file does not seem to work on the host itself, so I manually added the commands like the very first time. NFS still does not seem to work.

    Best,

    Marton

  • Hi Marton,

    So to recap, you are now able to get the nfs-server started right?

    Can you verify by executing:

    $ showmount -e localhost

    Also can you verify that you can mount from the host before you try the target?

    mount <container-IP>:/some/export /some/local/path

    Best,
    Jared