Difference between revisions of "IOT-GATE-iMX7 and SBC-IOT-iMX7: U-Boot: Building Images"

From Compulab Mediawiki
Jump to: navigation, search
(New page: {{:Transclusion: CL-SOM-iMX7: U-Boot: Building Images}} Category:U-Boot Category:IOT-GATE-iMX7 Category:SBC-IOT-iMX7)
 
 
Line 1: Line 1:
 +
== Overview ==
 +
The CompuLab device IOT-GATE-iMX7/SBC-IOT-iMX7 firmware consists of two components: Secondary Program Loader (SPL) and U-Boot.
 +
Both components are based on [http://www.denx.de/wiki/U-Boot/WebHome U-Boot] source code.<br>
 +
SPL is the bootstrap utility invoked by the CPU internal boot ROM code of the i.MX7 SoC.
 +
U-Boot initializes hardware modules necessary for system boot and loads the operating system.<br>
 +
The latest U-Boot package is available at the [http://www.compulab.com/products/computer-on-modules/cl-som-imx7-freescale-i-mx-7-system-on-module/#devres CL-SOM-iMX7 Resources] web page.
 +
 +
== Building Firmware images for IOT-GATE-iMX7/SBC-IOT-iMX7 ==
 +
=== Getting U-Boot sources ===
 +
There are two ways to get U-Boot sources that can be used as a baseline for the IOT-GATE-iMX7/SBC-IOT-iMX7 U-Boot.
 +
You can create a copy of "Das U-Boot" source tree or download a snapshot and extract it.<br>
 +
We assume that you have created {{filename|/home/development/cl-som-imx7/u-boot}} directory for the IOT-GATE-iMX7/SBC-IOT-iMX7 B-Boot development.
 +
 
{{:Transclusion: CL-SOM-iMX7: U-Boot: Building Images}}
 
{{:Transclusion: CL-SOM-iMX7: U-Boot: Building Images}}
 +
* You can now install the {{filename|cl-som-imx7-firmware}} file into an SD card or IOT-GATE-iMX7/SBC-IOT-iMX7 SPI flash.
 +
 +
== See also ==
 +
 +
* [[IOT-GATE-iMX7 and SBC-IOT-iMX7: U-Boot: Firmware Update|Firmware Update]]
 +
* [[IOT-GATE-iMX7 and SBC-IOT-iMX7: U-Boot: Creating a bootable SD card|Creating a bootable SD card]]
 +
* [[U-Boot: Quick reference]]
 +
* [[U-Boot images]]
 +
* [http://www.denx.de/wiki/U-Boot/Documentation U-Boot documentation]
  
 
[[Category:U-Boot]]
 
[[Category:U-Boot]]
 
[[Category:IOT-GATE-iMX7]]
 
[[Category:IOT-GATE-iMX7]]
 
[[Category:SBC-IOT-iMX7]]
 
[[Category:SBC-IOT-iMX7]]

Latest revision as of 16:28, 26 October 2017

Overview

The CompuLab device IOT-GATE-iMX7/SBC-IOT-iMX7 firmware consists of two components: Secondary Program Loader (SPL) and U-Boot. Both components are based on U-Boot source code.
SPL is the bootstrap utility invoked by the CPU internal boot ROM code of the i.MX7 SoC. U-Boot initializes hardware modules necessary for system boot and loads the operating system.
The latest U-Boot package is available at the CL-SOM-iMX7 Resources web page.

Building Firmware images for IOT-GATE-iMX7/SBC-IOT-iMX7

Getting U-Boot sources

There are two ways to get U-Boot sources that can be used as a baseline for the IOT-GATE-iMX7/SBC-IOT-iMX7 U-Boot. You can create a copy of "Das U-Boot" source tree or download a snapshot and extract it.
We assume that you have created /home/development/cl-som-imx7/u-boot directory for the IOT-GATE-iMX7/SBC-IOT-iMX7 B-Boot development.

Git clone

  • Install git version control system.
  • Create a clone of U-Boot tree
cd /home/development/cl-som-imx7/u-boot
git clone https://github.com/compulab/u-boot.git -b v2017.07-cl-som-imx7-1.9 u-boot-cl-som-imx7
cd u-boot-cl-som-imx7
  • Create a branch for CL-SOM-iMX7 development
git checkout -b cl-som-imx7-1.9-devel

Building the firmware images

  • First, compile U-Boot. The following commands create the u-boot.imx binary (along with other image types):
export ARCH=arm
export CROSS_COMPILE=arm-none-linux-eabi-
make mrproper
make cl-som-imx7_defconfig && make
  • Merge the SPL and U-Boot images into one firmware image:
dd if=/dev/zero count=640 bs=1K | tr '\000' '\377' > cl-som-imx7-firmware
dd if=SPL of=cl-som-imx7-firmware bs=1K seek=1 conv=notrunc
dd if=u-boot.img of=cl-som-imx7-firmware bs=1K seek=64 conv=notrunc
  • You can now install the cl-som-imx7-firmware file into an SD card or IOT-GATE-iMX7/SBC-IOT-iMX7 SPI flash.

See also