The QNX Neutrino RTOS supports both raw partitions and flash filesystem partitions.
QNX flash filesystem drivers support one or more logical flash drives. Each logical flash drive is called a socket. A socket consists of a contiguous and homogeneous region of flash memory. For example, in a system containing two different types of flash device at different addresses, where one flash device is used for the boot image and the other for the flash filesystem, each flash device would appear in a different socket.
Each socket may be divided into one or more partitions. Two types of partitions are supported:
A raw partition in a socket is any partition that doesn't contain a flash filesystem. The flash filesystem driver doesn't recognize any filesystem types other than the flash filesystem. A raw partition may contain an image filesystem or some application-specific data.
The flash filesystem uses a raw mountpoint to provide access to any partitions on the flash that aren't flash filesystem partitions. Note that the flash filesystem partitions are available as raw partitions as well.
A QNX flash filesystem partition contains the POSIX-like flash filesystem, which uses a QNX-proprietary format to store the filesystem data on the flash devices. This format isn't compatible with either the Microsoft FFS2 or PCMCIA FTL specification.
The QNX flash filesystem allows files and directories to be freely created and deleted. It recovers space from deleted files using a reclaim mechanism similar to garbage collection.
The flash filesystem supports all the standard POSIX utilities such as ls, mkdir, rm, ln, mv, and cp. There are also some QNX Neutrino utilities for managing the flash filesystem:
The QNX flash filesystem supports all the standard POSIX I/O functions such as open(), close(), read(), and write(). The devctl() function supports special actitivies such as erasing.
To create a flash filesystem partition for any BSP:
For example, for a board than can be booted from flash:
devf-generic -s0x0,32M
You should now see an fs0p0 entry under /dev.
flashctl -p/dev/fs0 -ev
flashctl -p/dev/fs0p0 -f
slay devf-generic
devf-generic &
You should now see the following entries:
Entry | Description |
---|---|
/dev/fs0p0 | OS image (32 MB) |
/dev/fs0p1 | Flash filesystem partition (32 MB) |