Have a look at the board documenatation (PDF, 1.4MB). Attach the appropriate connectors, for a full fresh install we will need UART (RS232), JTAG and of course power. Please pay attention to the power supply voltage and polarity!
You will also need a properly setup DHCP and TFTP server. The DHCP server should supply the IP address of the TFTP server as "next server" parameter. Copy the following files from a release directory to the root-directory of your tftp server and rename them during that step, e.g.:
For JTAG usage install OpenOCD V0.3.1 or later to your system. The release diretory contains a configuration for OpenOCD and TK71. To use OpenOCD first connect all connectors, copy the openocd configuration file "openocd-tk71.cfg" to the current directory, power-up the board and then run the OpenOCD server:
openocd -f ./openocd-tk71.cfg
In case your bootloader that came pre-installed on the TK71 board is broken you can reinstall it using JTAG. First startup the OpenOCD server as described above and then run the following commands:
# telnet localhost 4444 > tk71_init > load_image [path-to-files/]u-boot > resume 0x60000
At this point after a small moment you should see UBoot starting up on the serial console (UART 115200 baud, 8N1). Interrupt the UBoot auto-boot sequence by pressing any key.
At the UBoot prompt now enter the command:
TK71> run update_uboot
This command will try to get a DHCP lease from your DHCP server and then download the file "/u-boot.kwb" from your TFTP-server, erases the UBoot NAND flash partition and writes the downloaded file to that NAND partition, like this:
...UBoot progress...
UBoot is pre-setup with commands to update all relevant NAND flash partitions:
Some crucial system settings are stored in the UBoot environment. Sometimes it can be necessary to reset the environment.
Before zapping all settings plesae note the ethernet MAC address first:
TK71> printenv
There are two environment variables containing the MAC addresses:
ethaddr eth1addr
We will reuse the contents of those variables as [mac-addr1] and
[mac-addr2].
To erase the environment issue the following command in UBoot:
TK71> nand erase u-boot-env TK71> reset
The second command will reset the board. Upon UBoot startup it will notice the erased environment and fall back to a builtin default environment. This will also reset the ethernet MAC addresses so those need to be reprogrammed:
TK71> setenv ethaddr [mac-addr1] TK71> setenv eth1addr [mac-addr2] TK71> saveenv TK71> reset
Upon UBoot startup the MAC addresses are progrmmed into the SOC MAC address registers so UBoot needs to be reset after changing a MAC address.