Rebuilding RedBoot using ecosconfig

To rebuild RedBoot using the ecosconfig tool in a command line environment, create a temporary directory for building RedBoot, name it according to the desired configuration of RedBoot, here RAM:

$ export REDBOOT_CFG=redboot_RAM
$ mkdir /tmp/${REDBOOT_CFG}
$ cd /tmp/${REDBOOT_CFG}

Create the build tree and instate the platform specific configuration files for the chosen platform, here using the AT91SAM9G45-EKES board as an example:

Note: It is assumed that the environment variable ECOS_REPOSITORY points to the eCos/RedBoot source tree.

$ export TARGET=at91sam9g45ek
$ ecosconfig new ${TARGET} redboot
$ ecosconfig tree
$ make etc
Replace the platform name ("at91sam9g45ek") with the appropriate name for the chosen platform. The final command "make etc" copies platform specific configuration files for building RedBoot from the platform HAL subdirectory within the ECOS_REPOSITORY into the install/etc subdirectory, along with other configuration files such as example PEEDI and OpenOCD configuration files.

Then import the appropriate platform RedBoot configuration file, here for RAM configuration:

$ ecosconfig import install/etc/${REDBOOT_CFG}.ecm
$ ecosconfig tree

Note: Older revisions of eCos, or older platforms that have not been updated, may not support the etc make target and so will not have the RedBoot configuration file located in the install/etc subdirectory. For these releases and platforms, please refer to the specific platform HAL documentation for specific instructions on how to build RedBoot. appropriate configuration file.

RedBoot can now be built:

$ make

The resulting RedBoot files will be in the associated install directory, in this example, ./install/bin.

To build for another configuration, simply change the REDBOOT_CFG definition accordingly. For example:

export REDBOOT_CFG=redboot_ROM
mkdir /tmp/${REDBOOT_CFG}
cd /tmp/${REDBOOT_CFG}
ecosconfig new ${TARGET} redboot
ecosconfig import install/etc/${REDBOOT_CFG}.ecm
ecosconfig tree
make

2017-02-09
Documentation license for this page: Open Publication License