CM-T3517: Building Firmware Images

From Compulab Mediawiki
Revision as of 08:07, 19 November 2015 by Grinberg (talk | contribs) (Getting X-Loader sources)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Overview

CM-T3517 firmware consists of two components: X-Loader and U-Boot.
X-Loader is the bootstrap utility invoked by the CPU internal boot ROM code of the OMAP3 SoC. X-Loader performs minimal hardware initializations and loads U-Boot.
U-Boot initializes hardware modules necessary for system boot and loads the operating system.

Building Firmware images for CM-T3517

Cross-Compiler

There are several options for cross-compilation toolchain setup. You can either compile your cross-compiler or use an already built cross-compiler. The cross-compiler should support the ARM embedded-application binary interface ("EABI")

  • Pre-built toolchain (recommended):
  • Tools for creating cross-compilers:
    • Crosstool-ng: Builds a cross-compiler from source. Non-distribution specific.
    • Crossdev: Gentoo's cross-compiler builder. Needs Gentoo.

Getting the sources

Getting X-Loader sources

X-Loader source code is included in the Compulab U-Boot package as a tar.gz archive and can be found in the x-loader folder. We assume that you have created /home/development/cm-t3517/x-loader directory for CM-T3517 X-Loader development.

cd /home/development/cm-t3517/x-loader
tar xvf /path/to/x-loader-cm-t3x-3.tar.bz2
mv x-loader x-loader-cm-t3x
cd x-loader-cm-t3x

Getting U-Boot sources

There are two ways to get U-Boot sources that can be used as a baseline for CM-T3517 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/cm-t3517/u-boot directory for CM-T3517 U-Boot development.

Snapshot download
  • Download v2015.07 snapshot with your web browser.
  • Extract the downloaded archive u-boot-33711bd.tar.gz
cd /home/development/cm-t3517/u-boot
tar xvf /path/to/downloaded/u-boot-33711bd.tar.gz
mv u-boot u-boot-cm-t3517
This will create /home/development/cm-t3517/u-boot/u-boot-cm-t3517 directory containing U-Boot source code tree.
  • Apply the CM-T3517 patch
cd /home/development/cm-t3517/u-boot/u-boot-cm-t3517
patch -p1 < /path/to/cm-t3517-u-boot/u-boot/u-boot-2015.07-cm-t3517-2.patch
Git clone
  • Install git version control system.
  • Create a clone of U-Boot tree
cd /home/development/cm-t3517/u-boot
git clone git://git.denx.de/u-boot.git u-boot-cm-t3517
  • Create a branch for CM-T3517 development. The CM-T3517 patches are generated vs. v2015.07 tag (33711bdd4a4dce942fb5ae85a68899a8357bdd94 commit) in the U-Boot tree. It is recommended to use exactly the same baseline to avoid merge conflicts.
git checkout -b cm-t3517-dev v2015.07
  • Apply the CM-T3517 patch
cd /home/development/cm-t3517/u-boot/u-boot-cm-t3517
git apply /path/to/cm-t3517-u-boot/u-boot/u-boot-2015.07-cm-t3517-2.patch

Building the firmware images

Building X-Loader images

export ARCH=arm
export CROSS_COMPILE=arm-none-linux-eabi-
make mrproper
make cm-t3x_config
make

In the example above, CM-T3517 firmware X-Loader image (x-load.bin) will be created in /home/development/cm-t3517/x-loader/x-loader-cm-t3x.

Building U-Boot images

export ARCH=arm
export CROSS_COMPILE=arm-none-linux-eabi-
make cm_t3517_config
make

In the example above, CM-T3517 firmware U-Boot image (u-boot.bin) will be created in /home/development/cm-t3517/u-boot/u-boot-cm-t3517.

See also