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

From Compulab Mediawiki
Jump to: navigation, search
(Introduction)
 
Line 107: Line 107:
 
* Write the U-Boot image into the on-board NAND flash:
 
* Write the U-Boot image into the on-board NAND flash:
 
<pre>
 
<pre>
# nand write 80100000 200000 60000;
+
# nand write 80100000 200000 80000;
 
</pre>
 
</pre>
 
* Remove the micro SD card from the micro SD socket.
 
* Remove the micro SD card from the micro SD socket.

Latest revision as of 06:05, 28 September 2016

Introduction

The CompuLab CM-T335 System-on-Module / Computer-on-Module Firmware consists of two components: Secondary Program Loader (SPL) and U-Boot. This article describes the firmware update process for CM-T335 system-on-module product.

Preliminary setup

  • Make sure to power off the CM-T335 evaluation platform.
  • Connect the host PC to the SB-T335 base-board (connector P11) 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-T335 evaluation system. The U-Boot boot-loader will start and you will get a command prompt in the terminal window.
Admolition note.png If the boot settings of your CM-T335 are different than default, you may need to press and hold ^C while turning the CM-T335 on, in order to get command prompt.

Updating Firmware on the micro SD card

The firmware can be updated using a workstation with a micro SD card reader, or using CM-T335 module Linux environment.

  • To update the SPL, just replace it's binary file (MLO) on the micro SD card with the desired version.
  • To update the U-Boot, just replace the U-Boot binary file (u-boot.img) on the micro SD card with the desired version.
  • Plug the micro SD card into the micro SD card socket of the SB-T335.
  • Reset/power on the CM-T335 evaluation system to boot the updated firmware.

Updating Firmware on the NAND flash

CM-T335 firmware can be updated from a micro SD card or using network TFTP download. Both methods are performed from the U-Boot command line and include following common steps:

  1. Loading binary images from the selected media to the CM-T335 DRAM
  2. Flashing images to the on-board NAND flash

Updating from micro SD card

Admolition note.png The partition has to be formatted with either ext2/3/4 or FAT file system.
  • Insert the micro SD card into the micro SD socket (P23) on SB-T335.
  • Start the U-Boot MMC subsystem:
# mmc rescan
  • Check that the storage device is ready:
# ls mmc 0:1
  • Load the SPL binary into memory:
# load mmc 0:1 80a00000 mlo
  • Load the U-Boot binary into memory:
# load mmc 0:1 80100000 u-boot.img

Updating from USB

  • Copy the firmware binary images MLO and u-boot.img from U-Boot package for CM-T335 to the root directory of the first partition on the USB storage device.
Admolition note.png The partition has to be formatted with either ext2/3/4 or FAT file system.
  • Plug the USB storage device into:
    • USB host connector (either P25, P26, P27 or P28) on SB-T335 if the CM-T335 module has U4 configuration or
    • USB OTG connector (P19) on SB-T335 if the CM-T335 module has U1 configuration
  • Start the U-Boot USB subsystem:
# usb start
  • Check that the storage device is ready:
# ls usb 0:1
  • Load the SPL binary into memory:
# load usb 0:1 80a00000 mlo
  • Load the U-Boot binary into memory:
# load usb 0:1 80100000 u-boot.img

Updating from TFTP server

  • Setup a TFTP server
  • Put the firmware binary images MLO and u-boot.img in the root directory of the 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 SPL binary into memory:
# tftp 80a00000 MLO
  • Download the U-Boot binary into memory:
# tftp 80100000 u-boot.img

Flashing images

  • Erase the on-board NAND flash for SPL image:
# nand erase 0 80000
  • Write the SPL image into the on-board NAND flash:
# nand write 80a00000 0 20000;
  • Erase the on-board NAND flash for U-Boot image:
# nand erase 200000 80000 
  • Write the U-Boot image into the on-board NAND flash:
# nand write 80100000 200000 80000;
  • Remove the micro SD card from the micro SD socket.
  • Reset the CM-T335 evaluation platform.

See also