3.5.2. Flash via Ethernet
Ethernet is used for peripheral boot and then to flash the files to on board memory using DHCP server and TFTP.
3.5.2.1. Get Tool
3.5.2.1.1. SDK installer
Download and install Processer SDK Installer. For steps refer Download and Install the SDK.
3.5.2.1.2. Clone repository
Clone the sources from here.
git clone https://git.ti.com/git/processor-sdk/uboot-flash-writer.git
git checkout master
3.5.2.2. Important files
Environment variable text files are located at following path.
In SDK installer
<TI_SDK_PATH>/bin/Ethernet_flash/am64xx-evm/
In source repo
tools/Ethernet_flash/bin/am64xx-evm/
3.5.2.3. Requirements on host PC
Set up Ethernet boot. For details of Ethernet boot refer Booting over Ethernet (Ethernet RGMII).
3.5.2.4. Building bootloader binaries for flashing and Ethernet Boot
First you need to override the bootcmd command to send the environment variable text file.
CONFIG_BOOTCOMMAND="dhcp <name of your uEnv.txt file>; env import -t ${loadaddr} $filesize; run user_commands;"
Update CONFIG_BOOTCOMMAND in am64x_evm_a53_defconfig
file as above
It will enable sending uEnv.txt
after Ethernet boot, import the environment
variable and run user_commands after Ethernet boot.
Next build the bootloader binaries for Ethernet boot. For details refer Booting over Ethernet (Ethernet RGMII).
3.5.2.5. Getting ready to flash
Make sure that the bootloader binaries for flashing and Ethernet boot is built for the EVM and place them in the TFTP directory.
Place the files to be flashed to TFTP directory.
Make sure to set up Ethernet boot.
For connection refer Booting over Ethernet (Ethernet RGMII).
3.5.2.6. Environment variable text file for flashing
It will be used to set environment variables in U-Boot for flashing. Create a new
uEnv.txt
file by using existing uEnv files as reference
It assigns U-Boot commands to run the list of commands specified by user to variable
user_commands
. Ex. for transfer to eMMC following commands are assigned to variable
user_commands
.
user_commands=echo Flashing_on_emmc; run command_list;
To add new U-Boot commands, assign them to a variable in text file. For example
example_command1=echo Flash
example_command2=mmc list
Now add the variables to command_list
to run them. By this way you can add or remove
commands as per your choice.
command_list=run example_command1; run example_command2;
Also make sure to replace file names in text files with the actual names of files
to be flashed. Ex. to transfer tiboot3.bin
over TFTP to EVM
#Enter your filename in place of tiboot3.bin
cmd_3=dhcp tiboot3.bin
Flash to eMMC
Use uEnv_ethernet_emmc_am64xx-evm.txt
file as reference located at following path.
In SDK installer
<TI_SDK_PATH>/bin/Ethernet_flash/am62xx-evm/uEnv_ethernet_emmc_am64xx-evm.txt
In source repo
tools/Ethernet_flash/bin/am62xx-evm/uEnv_ethernet_emmc_am64xx-evm.txt
Flash to OSPI NOR
Use uEnv_ethernet_ospi-nor_am64xx-evm.txt
file as reference located at following path.
In SDK installer
<TI_SDK_PATH>/bin/Ethernet_flash/am64xx-evm/uEnv_ethernet_ospi-nor_am64xx-evm.txt
In source repo
tools/Ethernet_flash/bin/am64xx-evm/uEnv_ethernet_ospi-nor_am64xx-evm.txt
Flash to GPMC NAND
Use uEnv_ethernet_gpmc-nand_am64xx-evm.txt
file as reference located at following path.
In SDK installer
<TI_SDK_PATH>/bin/Ethernet_flash/am64xx-evm/uEnv_ethernet_gpmc-nand_am64xx-evm.txt
In source repo
tools/Ethernet_flash/bin/am64xx-evm/uEnv_ethernet_gpmc-nand_am64xx-evm.txt