Difference between revisions of "CM-T3x: U-Boot: Firmware Update"

From Compulab Mediawiki
Jump to: navigation, search
(Introduction)
(NAND firmware update for CM-T3x)
 
(One intermediate revision by the same user not shown)
Line 21: Line 21:
  
 
== NAND firmware update for CM-T3x ==
 
== NAND firmware update for CM-T3x ==
CM-T3x firmware can be updated from an MMC/SD card or using network TFTP download.
+
CM-T3x firmware can be updated from an MMC/SD card, USB storage, or using network TFTP download.
 
Both methods are performed from the U-Boot command line.
 
Both methods are performed from the U-Boot command line.
 
The U-Boot bootloader can be installed and updated independently without updating the existing X-Loader.
 
The U-Boot bootloader can be installed and updated independently without updating the existing X-Loader.
Line 50: Line 50:
 
<pre>
 
<pre>
 
# fatload mmc 0 80a00000 x-load.bin.ift
 
# fatload mmc 0 80a00000 x-load.bin.ift
 +
</pre>
 +
* Proceed to the [[CM-T3x: U-Boot: Firmware Update#Flashing X-Loader|Flashing X-Loader]] section
 +
 +
==== USB storage ====
 +
* Copy {{filename|x-load.bin.ift}} from [[CM-T3x:_U-Boot:_Firmware_Update#U-Boot packages|U-Boot package for CM-T3x]] to the root directory of the USB storage device.
 +
* Plug the USB storage device into the USB host connector (P17) on SB-T35.
 +
* Start the U-Boot USB subsystem:
 +
<pre>
 +
# usb start
 +
</pre>
 +
* Check that the storage device is ready and contains the X-Loader binary:
 +
<pre>
 +
# fatls usb 0
 +
</pre>
 +
* Load the X-Loader into memory:
 +
<pre>
 +
# fatload usb 0 80a00000 x-load.bin.ift
 
</pre>
 
</pre>
 
* Proceed to the [[CM-T3x: U-Boot: Firmware Update#Flashing X-Loader|Flashing X-Loader]] section
 
* Proceed to the [[CM-T3x: U-Boot: Firmware Update#Flashing X-Loader|Flashing X-Loader]] section
Line 117: Line 134:
 
<pre>
 
<pre>
 
# fatload mmc 0 80a00000 u-boot.bin
 
# fatload mmc 0 80a00000 u-boot.bin
 +
</pre>
 +
* Proceed to [[CM-T3x:_U-Boot:_Firmware_Update#Flashing U-Boot|Flashing U-Boot]] section
 +
 +
==== USB storage ====
 +
* Copy {{filename|u-boot.bin}} from [[CM-T3x:_U-Boot:_Firmware_Update#U-Boot packages|U-Boot package for CM-T3x]] to the root directory of the USB storage device.
 +
* Plug the USB storage device into the USB host connector (P17) on SB-T35.
 +
* Start the U-Boot USB subsystem:
 +
<pre>
 +
# usb start
 +
</pre>
 +
* Check that your storage device is ready and contains the U-Boot binary:
 +
<pre>
 +
# fatls usb 0
 +
</pre>
 +
* Load the U-Boot into the CM-T3x RAM:
 +
<pre>
 +
# fatload usb 0 80a00000 u-boot.bin
 
</pre>
 
</pre>
 
* Proceed to [[CM-T3x:_U-Boot:_Firmware_Update#Flashing U-Boot|Flashing U-Boot]] section
 
* Proceed to [[CM-T3x:_U-Boot:_Firmware_Update#Flashing U-Boot|Flashing U-Boot]] section

Latest revision as of 14:15, 29 June 2014

Admolition warning.png Failure in CM-T3x firmware update may prevent proper boot from on-board NAND flash. It is recommended to create a bootable MMC/SD card before updating CM-T3x firmware

Introduction

CM-T3x Firmware consists of two components: X-Loader and U-Boot. This article describes the firmware update process for CM-T3x system-on-module product line. The CM-T3x product line includes the following modules:

Preliminary setup

  • Make sure to power off the CM-T3x evaluation platform
  • Connect the host PC to the SB-T35 base-board (connector P12) via the serial cable supplied with the evaluation kit.
  • Start terminal emulation software on your PC. Set baud rate to 115200 bps, 8 bit per frame, 1 stop bit, no parity, no flow control.
  • Turn on the CM-T3x evaluation system. The U-Boot boot-loader will start and you will get a command prompt.
Admolition note.png If the boot settings of your CM-T3x are different than default, you may need to press and hold ^C while turning the CM-T3x on, in order to get command prompt.

SD-Card Firmware Update for CM-T3x

The firmware can be updated using a workstation with an SD card reader, or using CM-T3x module Linux environment. To update the X-Loader, just replace the X-Loader binary file (MLO) on the MMC/SD card with the newer version. To update the U-Boot, just replace the U-Boot binary file (u-boot.bin) on the MMC/SD card with the newer version.

NAND firmware update for CM-T3x

CM-T3x firmware can be updated from an MMC/SD card, USB storage, or using network TFTP download. Both methods are performed from the U-Boot command line. The U-Boot bootloader can be installed and updated independently without updating the existing X-Loader. In newer versions of U-Boot, X-Loader can also be updated independantly and without updating U-Boot. If only U-Boot update is necessary, please continue to CM-T3x U-Boot Update section.

CM-T3x X-Loader Update

Admolition warning.png Older U-Boot versions can only install X-Loader to completely erased NAND flash! The procedure for older U-Boot versions erases the entire NAND flash!

MMC/SD card

  • Copy x-load.bin.ift from U-Boot package for CM-T3x to the root directory of the MMC/SD card.
  • Insert the MMC/SD card into the SD socket (P13) on SB-T35.
  • Start the U-Boot MMC subsystem:

On older versions of U-Boot:

# mmc init

On newer versions of U-Boot:

# mmc rescan
  • Check that the storage device is ready and contains the X-Loader binary:
# fatls mmc 0
  • Load the X-Loader into memory:
# fatload mmc 0 80a00000 x-load.bin.ift

USB storage

  • Copy x-load.bin.ift from U-Boot package for CM-T3x to the root directory of the USB storage device.
  • Plug the USB storage device into the USB host connector (P17) on SB-T35.
  • Start the U-Boot USB subsystem:
# usb start
  • Check that the storage device is ready and contains the X-Loader binary:
# fatls usb 0
  • Load the X-Loader into memory:
# fatload usb 0 80a00000 x-load.bin.ift

TFTP download

  • Setup TFTP server
  • Put the X-Loader binary in the root directory of TFTP server
  • Setup U-Boot networking:
for dynamic IP configuration:
# dhcp
or for static IP configuration:
# setenv ipaddr <ip address>
# setenv serverip <server ip>
  • Download the X-Loader to the CM-T3x RAM:
# tftp 80a00000 x-load.bin.ift

Flashing X-Loader

Admolition warning.png Do not reset or power off the CM-T3x during the update process! Doing so may result in nand flash corruption!
  • Select NAND ECC type:
# nandecc hw
  • Erase the on-board NAND flash:

On older versions of U-Boot (Note that the below command will erase the whole NAND flash data):

# nand erase
# nand scrub

On newer versions of U-Boot:

# nand erase 0 20000
# nand scrub 0 20000
  • Write the X-Loader image into the on-board NAND flash:
# nand write 80a00000 0 20000;


Admolition important.png On older U-Boot versions it is essential to install U-Boot immediately after X-Loader update

CM-T3x U-Boot Update

MMC/SD card

  • Copy u-boot.bin from U-Boot package for CM-T3x to the root directory of the MMC/SD card.
  • Insert the MMC/SD card into the SD socket (P13) on SB-T35.
  • Start the U-Boot MMC subsystem and scan for available storage devices:
On older U-Boot versions:
# mmc init
On newer U-Boot versions:
# mmc rescan
  • Check that your storage device is ready and contains the U-Boot binary:
# fatls mmc 0
  • Load the U-Boot into the CM-T3x RAM:
# fatload mmc 0 80a00000 u-boot.bin

USB storage

  • Copy u-boot.bin from U-Boot package for CM-T3x to the root directory of the USB storage device.
  • Plug the USB storage device into the USB host connector (P17) on SB-T35.
  • Start the U-Boot USB subsystem:
# usb start
  • Check that your storage device is ready and contains the U-Boot binary:
# fatls usb 0
  • Load the U-Boot into the CM-T3x RAM:
# fatload usb 0 80a00000 u-boot.bin

TFTP download

  • Setup TFTP server
  • Put the U-Boot binary in the root directory of TFTP server
  • Setup U-Boot networking:
for dynamic IP configuration:
# dhcp
or for static IP configuration:
# setenv ipaddr <ip address>
# setenv serverip <server ip>
  • Download the U-Boot to the CM-T3x RAM:
# tftp 80a00000 u-boot.bin

Flashing U-Boot

Admolition warning.png Do not reset or power off the CM-T3x during the update process! Doing so may result in nand flash corruption!
  • Flash the U-Boot onto the on-board NAND flash:
# nandecc sw
# nand erase 80000 60000
# nand write 80a00000 80000 60000
  • Reset the CM-T3x evaluation platform

U-Boot packages

U-Boot packages can be found by the following links:

See also