PlatformX Configuration Overview

 

This documentation provides an overview of how the PlatX build configuration system works and the different components involved. It does not, however, attempt to address each individual configuration option presented by the system. The descriptions here assume that a complete PlatX tree already exists, either obtained from CVS or a release image.

 

The configuration system is composed of two parts: options, which are a template of available choices, and the setup, which is a particular set of choices. The configuration options are defined by the master “platx/config/config.in” file and file that it includes. The configuration setup is primarily stored in “platx/.config,” with some specific sub-set stored in “platx/.config.local” or potentially other files. Furthermore, there are a set of pre-defined configurations which can be copied into the “.config” file to set an initial configuration. Various scripts invoked by the top-level makefile aggregate all this together, such as “make menuconfig” – and these configuration values are used throughout the build system by  scripts/Makefiles that source/include the top-level “.config” file.

 

Configuration Management

 

The build configuration of a PlatX system is primarily controlled at the top level by the “menuconfig” target of the main makefile, which can be invoked by a “make menuconfig” command. This will bring up a text menu system, very similar to that used by the Linux kernel configuration. This system allows you to select individual options and presents them in a manageable hierarchy.  The configuration options are defined by the “platx/config/config.in” file, which in turn includes configuration options for any sub modules, as described below.

 

The primary configuration setup is stored in the “.config” file at the platx root. This file can be loaded/saved through the “Configuration Control” menu item from the top-level PlatX menu. By default, any file ending in “.config” at the top-level of any sub- module/directory contains a pre-defined configuration (i.e., anything matching “platx/*/*.config” – like “platx/generic/generic.config”). Alternatively, these configurations can be loaded by typing “make X.config” at the top level, where X is the name of the desired configuration (e.g., “make generic.config”). (Note that a load/save of the main configuration does not effect any local setup, as described below, which are stored in a separate “.config.local” file.)

 

Module Configurations

 

Module configuration options are combined from multiple “platx/X/platx_config.in” files– where X is the name of the sub module/directory. At the head of this file should be a comment of the form “PLATX_MODULE=Y : Z” where Y is a configuration variable name and Z is a descriptive comment – this information is used to construct the top-level components list of the PlatX build menu. Each module – effectively a subdirectory containing a “platx_config.in” file – can be included or not, and, if included, will present its own set of configuration options. The current configuration setup for all these items is kept in the top level “.config” file, as described above.

 

The configuration namespace is global since there is only one master platx “.config” file, so a configuration option defined in two separate sub-modules will either be set or not set for both modules – which may generate a conflict or not depending on the specific use of the configuration option.

 

Local Configuration

 

Part of the configuration setup, called the “local configuration,” is kept separate in a file called “.config.local” that is not altered when the main system configuration is save/loaded. For the most part, these options configure details about how the system is built, and do not effect the actual contents of the resulting build. There are some convenience functions provided in the local options screen for manually saving/loading these modules form the users home directory – if the local setup is changed, it will not automatically be propagated to the user’s other builds. When a new project it brought up and there is no “platx/.config.local” file it will be copied from the “.platx.config.local” file in the user’s home directory, if present. The options for the local configuration are interleaved with the main configuration options.

 

Kernel Configuration

 

The Linux kernel contains its own configuration mechanism that is kept separate from the PlatX configuration, for the most part. In the kernel directory there is a separate “.config” file and the kernel has its own “make menuconfig” operation – these should not be confused with things in the top-level platx directory.

 

There is a set of new options and option overrides, defined in the “platx_config.in” file in the kernel module/directory that should be configured using the PlatX configuration mechanism. Some of these options are new and will enable specific added features of the Linux kernel (such as specific debugging information). There are a couple of options, however, which are overrides to specific kernel options  These options, which end in _OVERRIDE in the “platx_config.in” file, will override the kernel configuration of the same name (without the _OVERRIDE), and can be used to individually control the build of the kernel based on a PlatX configuration file. The setting of these options in the kernel configuration file (“platx/kernel/.config”) will be ignored (unless not defined in the PlatX “.config” file).