Technical data
8. Documentation for Developers
Files adapted by Configuration
In some situations it is desired to replace original files with configuration-specific files for
inclusion in the archive, i.e. host keys, own firewall scripts, . . . mkfli4l supports this scenario
by checking whether a file can be found in the configuration directory and, if so, including this
one instead in the file list for opt.img resp. rootfs.img.
Another option to add configuration-specific files to an archive is decribed in the section
Extended Checks of the Configuration (Page 308).
Automatically Resolving Dependencies for Kernel Modules
Kernel modules may depend on other kernel modules. Those must be loaded before and
therefore also have to be added to the archive. mkfli4l resolves this dependencies based on
modules.dep and modules.alias (two files generated during the kernel build), automatically
including all required modules in the archives. Thus, for example the following entry
net_drv_% ne2k-pci ne2k-pci.ko
triggers that both 8390.ko and crc32.ko are included in the archive because ne2k_pci depends
on both of them.
The necessary entries from modules.dep and modules.alias are included in the RootFS
and can be used by modprobe for loading the drivers.
8.3.5. Checking Configuration Variables
By the help of check/<PACKAGE>.txt the content of variables can be checked for validity. In
earlier version of the program mkfli4l this check was hard coded there but it was outsourced
to the check files in the course of modularizing fli4l. This file contains a line for each variable in
the config files. These lines consist of four to five columns which have the following functions:
1. Variable: this column specifies the name of the configuration file variable to check. If this
is an array variable, it can appear multiple times with different indices, so instead of the
index number a percent sign (%) is added to the variable name. It is always used as “_%_”
in the middle of a name resp. “_%” at the end of a name. The name may contain more
than one percent sign allowing the use of multidimensional arrays. It is recommended
(but not mandatory) to add some text between the percent signs to avoid weird names
like “FOO_%__%”.
Often the problem occurs that certain variables describe options that are needed only
in some situations. Therefore variables may be marked as optional. Optional variables
are identified by the prefix “+”. They may then exist, but do not have to. Arrays can
also use a “++” prefix. Prefixed with a “+” the array can exist or be entirely absent.
Prefixed with a“++” in addition some elements of the array may be missing.
2. OPT_VARIABLE: This column assigns the variable to a specific OPT. The variable is checked
for validity only if the OPT variable is set to “yes”. If there is no OPT variable a “-”
indicates this. In this case, the variable must be defined in the configuration file, unless
a default value is defined (see below). The name of the OPT variable may be arbitrary
but should start with the prefix “OPT_”.
291










