Environment variables
Host-side environment variables can be accessed in a buildfile. All occurrences of ${NAME} will be replaced by the value of the environment variable with the given name. You can set additional variables in the buildfile to define the environment of the processes started on the target at boot time.
- A buildfile line of the form
varname=value progname arguments...
will create a local variable and addvarname=value
only to the environment of that one process. - A buildfile line of the form
varname=value
will create a global variable whose setting will be added the environment of every process started below in the buildfile. - Global variables can be accessed just like regular host environment variables by using
${varname}
.
Note that only environment variables defined in the buildfile will be visible on the target.
The procnto process manager uses the value of its PATH variable to set the _CS_PATH
configuration string. Similarily, it sets the _CS_LIBPATH configuration string to the value of its
LD_LIBRARY_PATH variable. For information about setting environment variables in the script, see
Setting PATH and LD_LIBRARY_PATH
in the QNX OS User's Guide.
The host environment variable MKIFS_PATH is used to control where mkifs
looks for the files it places in the image (see Including files in the image
in this chapter).
You can set it when running mkifs to define primary lookup paths. Additional root directories specified with
the mkifs -r option will append path lists to this variable; another path list rooted in
${QNX_TARGET} will be appended at the very end.
The PROCESSOR, PROCESSOR_BASE, and CPU_BASE environment variables are set by the virtual attribute of the bootstrap file. They are used in constructing the MKIFS_PATH path lists.