Changing where mkifs looks for files
You can change where mkifs looks for files it includes in the OS image.
- Modify the MKIFS_PATH environment variable.
- Add the -r command option to mkifs to modify the search path.
- Modify the search path with the [search] attribute.
- Specify the pathname explicitly.
- Create the contents of the file in line.
Modify MKIFS_PATH
export MKIFS_PATH=newpaths
. For example:
export MKIFS_PATH=/usr/nto/x86_64/bin:/usr/nto/x86_64/sys:/usr/nto/x86_64/dll:/usr/nto/x86_64/lib:/project/bin
This variable determines the default set of host search paths for all files specified in the buildfile. Note that you can augment the search paths for all files with the -r option or for specific files with the [search] attribute (see the next sections).
Add the -r command option to mkifs
mkifs -r /scratch
The mkifs utility would then search the standard paths for storing binaries within /scratch before searching any other host paths. The exact paths searched are based on the target CPU architecture, which you can set through the PROCESSOR environment variable. Suppose you set PROCESSOR to x86_64 and then run mkifs with the -r setting above. This would cause mkifs to search paths such as /scratch/x86_64/sbin (and others within /scratch/x86_64/) before searching those specified in MKIFS_PATH. For more details, see the -r option in the mkifs reference.
Modify the search path
[search=newpaths]
attribute,
you can make mkifs look in paths other than those in MKIFS_PATH,
for a specific set of files listed in the buildfile.
The newpaths component is a colon-separated list of pathnames, which can include environment
variables. For instance, to augment the existing MKIFS_PATH pathnames to also include the
directory /mystuff, you would specify:
[search=${MKIFS_PATH}:/mystuff]
For more information, see the search attribute description in the mkifs entry.
Specify the pathname explicitly
/character (e.g., /release/data1). However, with this instruction, mkifs places the file at the default path in the image (/proc/boot/data1 in our example). To place it elsewhere, you must also specify the target location; for example:
/some_other_location/data1 = /release/data1
See also Location of files on the target
later in this chapter.
Create the contents of a file in line
data1 = {
This is a data file, called data1, contained in the image.
This is a convenient way of associating data files with your programs.
}
}) or a backslash (
\
), then you must escape these characters (see the Inline filessection).