Generating device nodes using a device table

Multistrap includes a script to process device tables and generate device nodes in a root filesystem, without needing MAKEDEV. This allows full flexibility over the devices added, allows device nodes that MAKEDEV would not normally create and omits ones that MAKEDEV would create.

multistrap includes a device-table.pl helper script that can work around some of the issues with MAKEDEV. device-table.pl requires a device table file along the lines of the one in the mtd-utils source package.

# Device table entries take the form of:
# <name> <type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>
# where name is the file name, type can be one of:
# f A regular file
# s symlink
# h hardlink
# d Directory
# c Character special device file
# b Block special device file
# p Fifo (named pipe)
# uid is the user id for the target file, gid is the group id for the
# target file. The rest of the entried apply only to device special
# file.

To identify which device nodes would be created, use the MAKEDEV -n option.