Home
Support

Knowledge Base

BSPs and drivers
Community resources
Product documentation
Questions?
Contact us

Explicitly Controlling the Device Name for Block Devices
 
________________________________________________________________________

Applicable Environment
________________________________________________________________________
  • Topic: Explicitly Controlling the Device Name for Block Devices
  • SDP: 6.4.0
  • Target: Any supported target
________________________________________________________________________

Solution
________________________________________________________________________

There is not a simple way of controlling the 'minor device number' (0, 1, ...) for a particular block device as this is based entirely upon the devb- driver start-up sequence.
You can however use the 'disk name=XXX' option to the cam-disk.so library to explicitly set the 'major device' string for a particular device to give it a unique and hardware specific prefix name.

For example if you were to have a system with multiple SD card devices (say one on the left and one on the right), you could use a command similar to the below command to explicitly give them a 'major device' string of "sd_left" and "sd_right".

devb-mmcsd blk cache=1M disk name=sd_left mmcsd vid=0x0001
devb-mmcsd blk cache=1M disk name=sd_right mmcsd vid=0x0002

The raw devices would then show up as:
/dev/sd_left0
/dev/sd_right0
respectively.

________________________________________________________________________
NOTE: This entry has been validated against the SDP version listed above. Use caution when considering this advice for any other SDP version. For supported releases, please reach out to QNX Technical Support if you have any questions/concerns.
________________________________________________________________________


Related Attachments
 None Found





Please contact us with your questions or concerns.