Upgrade the u-boot, for Windows users

U-boot upgrade for Windows user

If you are a Windows user then follow this guide:

- First be sure that: 
1) the board is connected via Ethernet; 
2) the board is plugged to PC via USB cable; 
The board must be powered with one power supply that provides output at least 2A. 
For connecting it to your computer you may need to use a Y-Cable (USB Micro-B to Standard Male A). 
Arduino Tian

 - Download the u-boot file, you can use these links: 
1) For latest version click here
2) For other version click here.

- Install a TFTP server: 
1) you can use Windows TFTP Utility, download it here
2) Install the tool as administrator. 
TFTPUtil GUI: License 
TFTPUtil GUI: Installation Options 
TFTPUtil GUI: Installation Folder 
TFTPUtil GUI: installation completed 
3) Open Windows TFTP Utility and set it: 
TFTPUtil GUI: application 
select the path of your u-boot file; 
TFTPUtil GUI: root folder 
TFTPUtil GUI: Options 
set the ip address. 
TFTPUtil GUI: server setting 
click OK when you finish the setting; 
TFTPUtil GUI actived 
4)Check that the Server is working.

- Enter in u-boot console: 
1) Open the Arduino IDE 1.7.10 or later, you can download it here
2) Select Tian from Tools>Board menu; 
3) Select COMXX(Arduino Tian - Console Port) from Tools>Port menu, as shown in the below image: 
Port menu 
- Click LNX RST button and type lin when it is requested.

- Now pay attention and follow these steps (please be sure to connect your Ethernet cable):

setenv serverip ‹tftp-server-ip›;
setenv ipaddr ‹linino-board-ip›;

In this example the setting is:

linino>setenv serverip;
linino> setenv ipaddr;

Test the TFTP server doing a ping, in this example:

linino> ping

TFTP server setting 
If the ping is successful, then you continue the guide, else check the network and the tftp server or click here to follow this other guide to realize a connection point to point.   
- Type the below command to transfer the u-boot file:

tftp 0x80060000 u-boot-linino-tian.bin;

u-boot file transfer 
Only If the file was properly downloaded, as shown above, you can proceed erasing the flash and copying the new u-boot.
In case of FAIL, try to understand if the Ethernet connection is present and if the file is in the right position on the TFTP server. 
DON'T type the following command if the tftp failed! 
Erase the old u-boot:

linino> erase 0x9f000000 +0x40000;

Erase old u-boot file 
After follow this command to copy the new u-boot:

linino> cp.b $fileaddr 0x9f000000 $filesize;

Copy the new u-boot file 
Congratulations! The new u-boot is ready! Now type the reset command and check the configuration:

linino> reset

After the Reset command it will show the new u-boot prompt, please type the lin command to enter in u-boot console: 
Reset and enter in u-boot console 
You can check the configuration typing the following command:

linino> printenv

This it should be the output: 
Printenv command 
If the UBoot environment configuration is equal at that shown above, then type the reset command and the procedure is ended, otherwise apply the new default environment following the below steps:

linino> erase 0x9f040000 +0x10000;

Below the output on monitor: 
New default environment 
Now reset:


After the board reboot a message like *** Warning - bad CRC, using default environment will appear on the console. 
Warning bad CRC 
Type the lin command and push the Send button. 
To avoid the warning message give the following command on the UBoot console

linino> saveenv

Below the output shown: 
Saveenv command 
Finally type the reset on the command line:

linino> reset

Now your u-boot is upgraded.