All Boards Compiling RedBoot

Document created by jesseg Employee on Jul 30, 2012Last modified by Jodi Paul on Apr 25, 2013
Version 5Show Document
  • View in full screen mode

In every i.MX BSP you will find a pre-compiled binary to flash on your board, but if you need to recompile, this tutorial will be useful. Redboot source code and pre-built images for many platforms are available on Linux Board Support Package (BSP). As an example, let's compile redboot version 2009_10 that comes with Freescale Linux BSP.

 

  For detailed information about Redboot, check <redboot_folder>/doc

 

Locate the file ecostools.tar.gz and decompress it on /opt directory. (Create this folder if it is not there)

$ cd /opt

$ sudo tar zxvf <redboot_folder>/tools/ecos_config_tools.tar.gz

$ sudo tar zxvf <redboot_folder>/tools/arm-2008q1.tar.gz

This creates /opt/ecostools directory with two subdirectories:

  • arm-2008q1 -- GNU tools for compiling, linking, etc.
  • tools -- mainly to have ecosconfig utility program


Add /opt/arm-2008q1/bin and /opt/tools/bin to your environment PATH variable.

$ export PATH=$PATH:/opt/arm-2008q1/bin:/opt/tools/bin 

 

Generating RedBoot Image


Decompress the ecos-trunk-080727.tar.bz2 base line source code into <redboot_folder>/src. There should be a 'packages' directory under <redboot_folder>/src/ecos if it is done correctly.

$ tar xjvf ecos-trunk-080727.tar.bz2 

Go to ecos subdirectory and apply the patches;

$ cd ecos

$ bunzip2 -c patch-redboot-200910-base.bz2 | patch -p1

The above command assumes the patch file is under the same directory as the <redboot_folder>/src/ecos. Specify the path name for the patch file if necessary.

 

Apply the patch for specific platform. In this case, the used patch is: patch-redboot-200834-mx3.bz2

$ patch-redboot-200910-mx3.bz2 | patch -p1 

Define the ECOS_REPOSITORY. On <redboot_folder>, put the entire (absolute) path to redboot folder. I.e. ~/<redboot_folder>/src/ecos/packages

$ export ECOS_REPOSITORY=<redboot_folder>/src/ecos/packages 

To build redboot (for i.MX31 in this example), create a new folder in order to have a clean build:

$ mkdir new_redboot

$ cd new_redboot

$ ecosconfig new mx31_3stack redboot

$ ecosconfig import $ECOS_REPOSITORY/hal/arm/mx31/3stack/current/misc/redboot_ROMRAM.ecm

$ ecosconfig tree

$ make

This creates the Redboot image (redboot.bin) under install/bin directory. This image can run from either SDRAM or flash.

 

Note:

You can change the board MACH-TYPE at this file: src/ecos/packages/hal/arm/mx27/ads/current/cdl/hal_arm_board.cdl

Attachments

    Outcomes