Sockets and partitions
The QNX OS supports both raw partitions and flash filesystem partitions.
Sockets
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.
- raw partitions
- flash filesystem partitions
Raw partitions
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.
Flash filesystem partitions
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 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.
Creating a flash filesystem partition
- Start the flash filesystem driver.
- Erase the entire flash medium.
- Format the partition.
- Slay the flash filesystem driver.
- Restart the flash filesystem driver.
- Start the flash system driver:
devf-ram -s0x0,32M
You should now see an fs0p0 entry under /dev.
- To prepare the area for the partition, erase the entire flash:
flashctl -p/dev/fs0 -ev
- Format the partition:
flashctl -p/dev/fs0p0 -f
- Slay the flash filesystem driver:
slay devf-ram
- Finally, restart the driver:
devf-ram &
Entry | Description |
---|---|
/dev/fs0p0 | OS image (32 MB) |
/dev/fs0p1 | Flash filesystem partition (32 MB) |