Difference between revisions of "CL-SOM-iMX7: U-Boot: Firmware Update"

From Compulab Mediawiki
Jump to: navigation, search
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== Introduction ==
 
== Introduction ==
The CL-SOM-iMX7 firmware consists of single U-Boot binary image {{filename|cl-som-imx7-firmware}}.
+
The CL-SOM-iMX7 firmware consists of two components: Secondary Program Loader (SPL) and U-Boot, provided as a single U-Boot binary image {{filename|cl-som-imx7-firmware}}.
 
This article describes the firmware update process for CL-SOM-iMX7 system-on-module product.
 
This article describes the firmware update process for CL-SOM-iMX7 system-on-module product.
  
Line 11: Line 11:
 
</blockquote>
 
</blockquote>
 
* Turn on the CL-SOM-iMX7 evaluation system. The U-Boot boot-loader will start and a command prompt will be displayed.
 
* Turn on the CL-SOM-iMX7 evaluation system. The U-Boot boot-loader will start and a command prompt will be displayed.
*: {{Note|If the boot settings of your CL-SOM-iMX7 are different than the default, you may need to press and hold '''Ctrl-C''' while turning the CL-SOM-iMX7 on, in order to get command prompt.}}
+
*: {{Note|If the boot settings of your CL-SOM-iMX7 are different than the default, you may need to press and hold Ctrl-C while turning the CL-SOM-iMX7 on, in order to get command prompt.}}
  
 
== Updating Firmware on the SPI flash ==
 
== Updating Firmware on the SPI flash ==
CL-SOM-iMX7 firmware can be updated from an SD card, USB storage, or using network TFTP download.  
+
The firmware can be updated from an SD card, USB storage, or using network TFTP download.  
Both methods are performed from the U-Boot command line and include following common steps:
+
All methods are performed from the U-Boot command line and include following common steps:
 
# Loading binary image from the selected media to the CL-SOM-iMX7 DRAM
 
# Loading binary image from the selected media to the CL-SOM-iMX7 DRAM
 
# Flashing image to the on-board SPI flash
 
# Flashing image to the on-board SPI flash
  
 
=== Common preparation steps ===
 
=== Common preparation steps ===
* Reset the U-Boot environment to default state:
+
* Set common parameters:
 
<pre>
 
<pre>
CL-SOM-iMX7 # env default -a
+
CL-SOM-iMX7 # setenv ubootsize 0xa0000; setenv loadaddr 0x80800000
</pre>
 
* Clean up the address space in order to allow the SPI flash burn with a fixed size:
 
<pre>
 
CL-SOM-iMX7 # setenv ubootsize 0x80000; mw.b ${loadaddr} 0 ${ubootsize}
 
 
</pre>
 
</pre>
  
Line 64: Line 60:
 
* Proceed to [[#Flashing images|Flashing images]] section
 
* Proceed to [[#Flashing images|Flashing images]] section
  
=== Updating from TFTP server ===
+
{{:Transclusion: CL-SOM-iMX7: U-Boot: Firmware Update}}
* Setup a TFTP server
 
* Put the firmware binary image {{filename|cl-som-imx7-firmware}} from [http://www.compulab.com/products/computer-on-modules/cl-som-imx7-freescale-i-mx-7-system-on-module/#devres U-Boot package for CL-SOM-iMX7] in the root directory of the TFTP server
 
* Setup U-Boot networking:
 
: for dynamic IP configuration:
 
<pre>
 
CL-SOM-iMX7 # dhcp
 
</pre>
 
: or for static IP configuration:
 
<pre>
 
CL-SOM-iMX7 # setenv ipaddr <ip address>
 
</pre>
 
* Setup the TFTP server ip address:
 
<pre>
 
CL-SOM-iMX7 # setenv serverip <server ip>
 
</pre>
 
* Download the firmware binary into the memory:
 
<pre>
 
CL-SOM-iMX7 # tftpboot ${loadaddr} cl-som-imx7-firmware
 
</pre>
 
* Proceed to [[#Flashing images|Flashing images]] section
 
 
 
=== Flashing images ===
 
* Make U-Boot probe the on-board SPI flash:
 
<pre>
 
CL-SOM-iMX7 # sf probe
 
</pre>
 
* Erase the on-board SPI flash:
 
<pre>
 
CL-SOM-iMX7 # sf erase 0 ${ubootsize}
 
</pre>
 
* Write the firmware image into the on-board SPI flash:
 
<pre>
 
CL-SOM-iMX7 # sf write ${loadaddr} 0x400 ${ubootsize}
 
</pre>
 
* Reset the CL-SOM-iMX7 evaluation platform.
 
  
 
== See also ==
 
== See also ==
Line 105: Line 66:
 
* [[CL-SOM-iMX7: U-Boot: Firmware Overview]]
 
* [[CL-SOM-iMX7: U-Boot: Firmware Overview]]
 
* [[CL-SOM-iMX7: U-Boot: Creating a bootable SD card]]
 
* [[CL-SOM-iMX7: U-Boot: Creating a bootable SD card]]
* [[U-Boot quick reference]]
+
* [[U-Boot: Quick reference]]
 
* [[U-Boot images]]
 
* [[U-Boot images]]
 
* [http://www.denx.de/wiki/U-Boot/Documentation U-Boot documentation]
 
* [http://www.denx.de/wiki/U-Boot/Documentation U-Boot documentation]

Latest revision as of 06:40, 3 December 2017

Introduction

The CL-SOM-iMX7 firmware consists of two components: Secondary Program Loader (SPL) and U-Boot, provided as a single U-Boot binary image cl-som-imx7-firmware. This article describes the firmware update process for CL-SOM-iMX7 system-on-module product.

Preliminary setup

  • Make sure to power off the CL-SOM-iMX7 evaluation platform.
  • Connect the host PC to the SBC-iMX7 base-board (connector P8) via the serial cable supplied with the evaluation kit.
  • Start terminal emulation software on your PC with the following serial port settings:
Baud Rate Data Bits Stop Bits Parity Flow Control
115200 8 1 none none
  • Turn on the CL-SOM-iMX7 evaluation system. The U-Boot boot-loader will start and a command prompt will be displayed.
Admolition note.png If the boot settings of your CL-SOM-iMX7 are different than the default, you may need to press and hold Ctrl-C while turning the CL-SOM-iMX7 on, in order to get command prompt.

Updating Firmware on the SPI flash

The firmware can be updated from an SD card, USB storage, or using network TFTP download. All methods are performed from the U-Boot command line and include following common steps:

  1. Loading binary image from the selected media to the CL-SOM-iMX7 DRAM
  2. Flashing image to the on-board SPI flash

Common preparation steps

  • Set common parameters:
CL-SOM-iMX7 # setenv ubootsize 0xa0000; setenv loadaddr 0x80800000

Updating from SD card

  • Copy the firmware binary image cl-som-imx7-firmware from U-Boot package for CL-SOM-iMX7 to the root directory of the SD card.
  • Insert the MMC/SD card into the SD socket (P9) on the SBC-iMX7.
  • Start the U-Boot MMC subsystem:
CL-SOM-iMX7 # mmc dev 0
CL-SOM-iMX7 # mmc rescan
  • Check that the storage device is ready:
CL-SOM-iMX7 # ls mmc 0
  • Load the firmware binary into the memory:
CL-SOM-iMX7 # load mmc 0 ${loadaddr} cl-som-imx7-firmware

Updating from USB storage

  • Copy the firmware binary image cl-som-imx7-firmware from U-Boot package for CL-SOM-iMX7 to the root directory of the USB storage device.
  • Plug the USB storage to either port on the dual USB host connector P6 of the SBC-iMX7.
  • Start the U-Boot USB subsystem:
CL-SOM-iMX7 # usb start
  • Check that the storage device is ready:
CL-SOM-iMX7 # ls usb 0
  • Load the firmware binary into the memory:
CL-SOM-iMX7 # load usb 0 ${loadaddr} cl-som-imx7-firmware

Updating from TFTP server

  • Setup a TFTP server
  • Put the firmware binary image cl-som-imx7-firmware from U-Boot package for CL-SOM-iMX7 in the root directory of the TFTP server
  • Setup U-Boot networking:
for dynamic IP configuration:
CL-SOM-iMX7 # dhcp
or for static IP configuration:
CL-SOM-iMX7 # setenv ipaddr <ip address>
  • Setup the TFTP server ip address:
CL-SOM-iMX7 # setenv serverip <server ip>
  • Download the firmware binary into the memory:
CL-SOM-iMX7 # tftpboot ${loadaddr} cl-som-imx7-firmware

Flashing images

  • Make U-Boot probe the on-board SPI flash:
CL-SOM-iMX7 # sf probe
  • Erase the on-board SPI flash:
CL-SOM-iMX7 # sf erase 0 ${ubootsize}
  • Write the firmware image into the on-board SPI flash:
CL-SOM-iMX7 # sf write ${loadaddr} 0 ${ubootsize}
  • Reset the CL-SOM-iMX7 evaluation platform.

Default environment

It is recommended to set default environment after updating the U-Boot version:

CL-SOM-iMX7 # env default -a
CL-SOM-iMX7 # saveenv

See also