You create special files using mknod(1M) on the ChorusOS system. Generally, you create the special files you need at boot time by including commands in the system initialization file, sysadm.ini(4CC).
Unlike earlier releases that used special device driver files created on the host, the ChorusOS 4.0 product only lets you create special files on the target.
Previous releases allowed you to create special files on the host because no /dev directory was available at boot time. As the ChorusOS 4.0 product mounts a /dev directory at boot time, it is no longer necessary to create special files on the host.
To create special files at boot time using the sysadm.ini(4CC) file embedded in the system image, follow the procedure below:
Change to the directory containing sysadm.ini:
host% cd build_dir/conf |
Include commands of the following form in sysadm.ini using the C_INIT(1M) built-in command mknod(1M):
mknod /dev/name [b|c] maj_nbr min_nbr
where name follows the pattern described above in "2.3.2 Naming Conventions for Special Files", b represents a buffered (block) device, c represents a character (raw) device, maj_nbr is the major number of the device and min_nbr is the minor number of the partition on the device. The following table lists memory devices by major number:
Major Number |
Device |
Mode |
---|---|---|
3 |
ISA/IDE disk |
character (raw) |
4 |
ISA/IDE disk |
block (buffered) |
7 |
Flash device |
character (raw) |
8 |
Flash device |
block (buffered) |
9 |
SCSI disk |
character (raw) |
10 |
SCSI disk |
block (buffered) |
13 |
RAM disk |
character (raw) |
14 |
RAM disk |
block (buffered) |
Note that RAM disk devices used for memory banks conventionally have major numbers 11 and 12 and are used internally by the system to make the contents of the memory banks, including the system image, available for use at boot time.
Build the system image to include modifications to sysadm.ini:
host% cd .. host% make system_image_name |
To create special files manually on a running ChorusOS target system:
Run commands on the target of the type:
host% rsh target mknod /dev/name [b|c] maj_nbr min_nbr |
Where name follows the pattern described above in "2.3.2 Naming Conventions for Special Files", b represents a buffered (block) device, c represents a character (raw) device, maj_nbr is the major number of the device and min_nbr is the minor number of the partition on the device.