6.9. Creating devices (Makedev-1.7)

Estimated build time:           0.1 SBU
Estimated required disk space:  50 KB

6.9.1. Contents of MAKEDEV

The MAKEDEV script creates the static device nodes which usually reside in the /dev directory. Detailed information about device nodes may be found in the Documentation/devices.txt file under the Linux kernel source tree.

Installed script: MAKEDEV

6.9.2.

6.9.3. MAKEDEV Installation Dependencies

Make depends on: Bash, Coreutils.

6.9.4.

6.9.5. Creating devices

Note that unpacking the MAKEDEV-1.7.bz2 file doesn't create a directory for you to cd into, as the file contains only a shell script.

Install the MAKEDEV script:

bzcat MAKEDEV-1.7.bz2 > /dev/MAKEDEV
chmod 754 /dev/MAKEDEV

Run the script to create the device files:

cd /dev
./MAKEDEV -v generic-nopty

The meaning of the arguments:

If it turns out that some special device zzz that you need is missing, try running ./MAKEDEV -v zzz. Alternatively, you may create devices via the mknod program. Please refer to its man and info pages if you need more information.

Additionally, if you were unable to mount the devpts filesystem earlier in the "Mounting the proc and devpts file systems" section, now is the time to try the alternatives. If your kernel supports the devfs file system, run the following command to mount devfs:

mount -t devfs devfs /dev

This will mount the devfs file system over the top of the new static /dev structure. This poses no problems, as the device nodes created are still present, they are just hidden by the new devfs filesystem.

If this still doesn't work, the only option left is to use the MAKEDEV script to create the ptyXX and ttyXX range of files that would otherwise not be needed. Ensure you are still in the /dev directory then run ./MAKEDEV -v pty. The downside of this is, we are creating an extra 512 device special files which will not be needed when we finally boot into the finished LFS system.

Hosting by: Hurra Communications Ltd.
Generated: 2007-01-26 17:57:39