Environment variables

Updated: April 19, 2023

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.

For environment variables set in the buildfile:

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 Neutrino 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.

Note: The variables described here (especially MKIFS_PATH) are meaningful only on the host system. They should not be set explicitly in the buildfile, because they should not appear on the target.