eCosTM User’s Guide
Prev | Chapter 7. Manual configuration | Next

# Coarse-grained configuration

Coarse-grained configuration of an eCos system means making changes that require pkgconf.tcl to be run again in an existing build tree. These changes include:

1. switching to a different target architecture

2. changing the target platform

3. changing the start-up from RAM to ROM, or from ROM to RAM

4. disabling or enabling a package

5. changing the version of a package

Whenever pkgconf.tcl generates or updates a build tree it leaves a file `pkgconf.sav` at the top level of the build tree. The next time that pkgconf.tcl is run it is only necessary to specify what should change relative to the last time.

Suppose that the build tree was first created using the following command line:

    $ tclsh BASE_DIR/pkgconf.tcl --target=mn10300 --platform=stdeval1

To change the target architecture to PowerPC, the following command would be needed:

    $ tclsh BASE_DIR/pkgconf.tcl --target=powerpc

This will select the default platform for the PowerPC architecture, which is a Cogent board. To switch to the PowerPC simulator instead:

    $ tclsh BASE_DIR/pkgconf.tcl --platform=sim

It is not necessary to specify the PowerPC architecture again since this has not changed. Next, to switch back to the Cogent board but use the non-default ROM start-up:

    $ tclsh BASE_DIR/pkgconf.tcl --platform=cogent --startup=rom

As the target architecture or platform changes, hardware-related packages such as the HAL packages and device drivers will be added to and removed from the configuration as appropriate.

To remove any package from the current configuration, use the `--disable` argument:

    $ tclsh BASE_DIR/pkgconf.tcl --disable-uitron

You can disable multiple packages using multiple `--disable` arguments, for example:

    $ tclsh BASE_DIR/pkgconf.tcl --disable-uitron --disable-libm

If this turns out to have been a mistake then you can reenable one or more packages with the `--enable` argument:

    $ tclsh BASE_DIR/pkgconf.tcl --enable-libm

When a package is disabled, pkgconf.tcl will clean up the build and install trees to some extent. In particular, it will make sure that there is no trace of the disabled packages left in the target library, and that all of the disabled package’s header files are removed from the install tree. If any part of the application still tried to use a disabled package then this will result in an appropriate error message. However, when a package is disabled, pkgconf.tcl will not delete any files in the build tree that you may have edited; in particular it will not delete the header files that are used for fine-grained configuration.

Changing the desired version for a package is also straightforward.

    $ tclsh BASE_DIR/pkgconf.tcl --kernel-version=ss19981130

The output from pkgconf.tcl contains full information about the target, platform, start-up, and all the packages that are in the system. To find out what is in a build tree without changing the current settings, run pkgconf.tcl without passing any additional arguments:

    $ tclsh BASE_DIR/pkgconf.tcl

If a build tree is changed so often that it cannot easily be restored to a sensible state by incremental changes, use the special argument `--defaults`. This tells pkgconf.tcl to ignore the current state of the build tree completely and use default settings for everything. However, there is no default setting for the target architecture so this must be specified explicitly:

    $ tclsh BASE_DIR/pkgconf.tcl --defaults --target=mn10300

Using `--defaults` is not quite as drastic as deleting the entire contents of the build tree. In particular, it will not delete the fine-grained configuration header files in the build tree, since you may have edited these and it would be annoying if the configuration system deleted them.

Prev | Home | Next
Packages | Up | Fine-grained Configuration