Generating a build tree is a non-trivial operation and
should not be attempted manually. Instead, eCos is shipped
with a tool called ecosconfig that should
be used to create a build tree.
Usually ecosconfig will be
run inside the build tree itself. If you are creating a new build
tree then typically you will create a new empty directory using
the mkdir command, cd into
that directory, and then invoke ecosconfig to
create a configuration. By default, the configuration is stored
in a file ecos.ecc in the current
directory. The configuration may be modified by editing this file directly. ecosconfig itself
deals with a number of coarse-grained configuration options such
as the target platform and the packages that should be used.
The ecosconfig tool is also
used subsequently to generate a build tree for a configuration.
Once a build tree exists, it is possible to run ecosconfig again
inside the same build tree. This will be necessary if your wish
to change some of the configuration options.
ecosconfig does not generate
the top-level directory of the build tree; you must do this
yourself.
The available command line qualifiers for
ecosconfig are as follows. Multiple
qualifiers may be used on the command line:
--help
Provides basic usage guidelines for the
available commands and qualifiers.
--config=<file>
Specifies an eCos configuration save file for
use by the tool. By default, the file
ecos.ecc in the
current directory is used. Developers may prefer to
use a common location for all their eCos
configurations rather than keep the configuration
information in the base of the build tree.
--prefix=<dir>
Specifies an alternative location for the
install tree. By default, the install tree resides
inside the install
directory in the build tree. Developers may prefer
to locate the build tree in a temporary file
hierarchy but keep the install tree in a more
permanent location.
--srcdir=<dir>
Specifies the location of the component
repository. By default, the tool uses the location
specified in the
ECOS_REPOSITORY
environment variable. Developers may prefer to use
of this qualifier if they are working with more than
one repository.
--no-resolve
Disables the implicit resolution of conflicts
while manipulating the configuration data.
developers may prefer to resolve conflicts by
editing the eCos configuration save file
manually.
--ignore-errors, -i
By default, ecosconfig will exit with an error code if the current
configuration contains any conflicts, and it is not possible to
generate or update a build tree for such configurations. This
qualifier causes ecosconfig to ignore such problems, and hence it is
possible to generate a build tree even if there are still
conflicts. Of course, there are no guarantees that the resulting
system will actually do anything.
--verbose, -v
Display more information.
--quiet, -q
Display less information.
The --config, --prefix and
--srcdir qualifiers can also be written with two arguments,
for example:
ecosconfig --srcdir <dir> ...
This simplifies filename completion with some shells.
The available commands for
ecosconfig are as
follows:
list
Lists the available packages, targets and
templates as installed in the eCos repository.
Aliases and package versions are also
reported.
new <target> [<template> [<version>]]
Creates a new eCos configuration for
the specified target hardware and saves it. A
software template may also be specified. By default,
the template named ‘default’ is used. If
the template version is not specified, the latest
version is used.
target <target>
Changes the target hardware selection
for the eCos configuration. This has the effect of
unloading packages supporting the target selected
previously and loading the packages which support
the new hardware. This command will be used
typically when switching between a simulator and
real hardware.
template <template> [<version>]
Changes the template selection for the eCos
configuration. This has the effect of unloading
packages specified by the template selected
previously and loading the packages specified by the
new template. By default, the latest version of the
specified template is used.
remove <packages>
Removes the specified packages from the eCos
configuration. This command will be used typically
when the template on which a configuration is based
contains packages which are not required.
add <packages>
Adds the specified packages to the eCos configuration. This
command will be used typically when the template on which a
configuration is based does not contain all the packages which are
required.For example, add-on packages provided by third parties will
not be known to the standard templates, so they will have to be added
explicitly.
version <version> <packages>
Selects the specified version of a
number of packages in the eCos configuration. By
default, the most recent version of each package is
used. This command will be used typically when an
older version of a package is required.
check
Presents the following information
concerning the current configuration:
the selected target hardware
the selected template
additional packages
removed packages
the selected version of packages
where this is not the most recent
version
conflicts in the current configuration
resolve
Resolves conflicts identified in the
current eCos configuration by invoking an inference
capability. Resolved conflicts are reported, but not
all conflicts may be resolvable. This command will
be used typically following manual editing of the
configuration.
export <file>
Exports a minimal eCos configuration
save file with the specified name. This file
contains only those options which do not have their
default value. Such files are used typically to
transfer option values from one configuration to
another.
import <file>
Imports a minimal eCos configuration
save file with the specified name. The values of
those options specified in the file are applied to
the current configuration.
tree
Generates a build tree based on the current eCos
configuration. This command will be used typically
just before building eCos.Normally a build tree can
only be generated if if the configuration has no unresolved
conflicts, but --ignore-errors can be used to override
this.