How to copy a file onto the Linux filesystem#

This page discusses potential options for copying files onto an EVM’s Linux filesystem.

This page is NOT intended to be a full tutorial, and there are many ways to copy files that are not covered here! This page is just provided as a resource to get you started.

If you have followup questions about copying files, that is a generic question about Linux. It is not a TI-specific question, so please search for answers online instead of creating an e2e post.

On the other hand, if you have other questions about this academy, TI software, or TI hardware, please feel free to create a thread on the e2e forums!

Plug the SD card into the computer#

Linux computers can directly write to SD cards that have been plugged into the computers.

Terminal commands might look like this:

// plug in the SD card

// search for the SD card
$ lsblk

// mount the SD card if it is not already mounted
$ sudo mount <sd_card> <mount_point>

// check you can see the filesystem
$ sudo ls <mount_point>

// copy the files over
$ sudo cp <path_to_file_location> <path_to_filesystem_on_mountpoint>

// check the file got copied
$ sudo ls <path_to_filesystem_on_mountpoint>

// unmount the SD card before removing it
$ sudo umount <mount_point>

Use SCP to transfer over Ethernet#

SCP from Linux#

Make sure that the Ethernet port on the EVM and the Ethernet port of the computer are on the same subnet (in this example, 192.168.1.x)

On the Linux PC:

~/sdks/mcu_plus_sdk_am64x_09_01_00_41$ make -s -C examples/drivers/ipc/ipc_rpmsg_echo_linux/am64x-evm/system_freertos/
~/sdks/mcu_plus_sdk_am64x_09_01_00_41$ scp examples/drivers/ipc/ipc_rpmsg_echo_linux/am64x-evm/r5fss0-0_freertos/ti-arm-clang/ipc_rpmsg_echo_linux.release.out root@192.168.1.164:~

On the EVM:

root@am64xx-evm:/lib/firmware/ti-ipc/am64xx# mv ~/ipc_rpmsg_echo_linux.release.out ~/ipc_rpmsg_echo_linux_r50_0.out
root@am64xx-evm:/lib/firmware/ti-ipc/am64xx# mv ~/ipc_rpmsg_echo_linux_r50_0.out .
root@am64xx-evm:/lib/firmware/ti-ipc/am64xx# cd ../..
root@am64xx-evm:/lib/firmware# ln -sf /lib/firmware/ti-ipc/am64xx/ipc_rpmsg_echo_linux_r50_0.out am64-main-r5f0_0-fw
root@am64xx-evm:/lib/firmware# reboot -f

SCP from Windows#

Windows 10/11 comes with a built-in scp command line tool that you can use:

PS C:\Users\user_name> scp
usage: scp [-346BCpqrTv] [-c cipher] [-F ssh_config] [-i identity_file]
[-J destination] [-l limit] [-o ssh_option] [-P port]
[-S program] source ... target

Copy files over UART#

Steps to copy a file from a windows PC to a linux EVM that is connected over the uart terminal:

Open command Prompt and type
python -m http.server
Open another instance of command prompt and type
ipconfig
Copy the IP number of the windows machine
open a browser and in url type
<IP number>:<port no>
Copy the path to the binary file shown in browser
In the linux enter the following command and it will get downloaded.
wget <copied path of binary file>

What if I want to flash the filesystem over USB, Ethernet, or UART?#

Refer to