Creating a temporary directory (/tmp)

You can use your buildfile to create a temporary directory in the RAM /dev/shmem “filesystem”.

To create the /tmp directory in the RAM /dev/shmem “filesystem”, you can include the following instruction in your buildfile to instruct mkifs to create a file (/tmp) that is a link rather than an actual file:

[type=link] /tmp = /dev/shmem

This instruction sets /tmp as a symbolic link in the process manager's pathname table; this symbolic link points to the /dev/shmem directory.

Since the /dev/shmem directory is the location where shared memory objects are stored, this link effectively lets you create files in the RAM “filesystem”. Files created in the /dev/shmem directory are shared memory objects residing in RAM (see /dev/shmem RAM “filesystem” in the QNX SDP User's Guide).

Note:

Place the line with the link attribute ([type=link]) outside the script file and the boot file. For example:

[image=0x1400000]
[virtual=x86,kpi +compress] boot = {
	...
}

[+script] startup-script = {
	...
}

[type=link] /tmp=/dev/shmem