[BusyBox] off topic: 'device table support' for mkcramfs?
Geoffrey Espin
espin at idiom.com
Fri May 3 13:09:03 UTC 2002
On Fri, May 03, 2002 at 08:50:09PM +0200, Jonas Holmberg wrote:
> I didn't think of that. It seems like a good idea to use both
> implementations and the ability to convert between them. It was probably
Can't see the advantage to both, but both flags could certainly co-exist.
> not that easy for Erik to implement device tables in mkfs.jff2 since he
> had to rewrite it and I know that it was simple to add metafiles-support
I didn't study it previous to rewrite... but I suspect mkfs.jffs2
needed an overhaul, and no doubt is much better for Erik's TLC.
> I haven't examined the device_tables in a long time. Does it do all the
> include-, ignore-, userid- and groupid-stuff yet? In that case it
> shouldn't be any problem using it for us I think (we have to write a
Well "ignore-" happens by default with device_table.
I'm no expert, but the other capabilities appear to be there.
Geoff
--
Geoffrey Espin
espin at idiom.com
-- Here is Erik's doc & device_table.txt all in file. Tight! --
# This is a sample device table file for use with mkfs.jffs2. You can
# do all sorts of interesting things with a device table file. For
# example, if you want to adjust the permissions on a particular file
# you can just add an entry like:
# /sbin/foobar f 2755 0 0 - - - - -
# and (assuming the file /sbin/foobar exists) it will be made setuid
# root (regardless of what its permissions are on the host filesystem.
#
# 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
# 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.
# When building a target filesystem, it is desirable to not have to
# become root and then run 'mknod' a thousand times. Using a device
# table you can create device nodes and directories "on the fly".
# Furthermore, you can use a single table entry to create a many device
# minors. For example, if I wanted to create /boot/var/dev/hda and /dev/hda[0-15]
# I could just use the following two table entries:
# /boot/var/dev/hda b 640 0 0 3 0 0 0 -
# /boot/var/dev/hda b 640 0 0 3 1 1 1 16
#
# Have fun
# -Erik Andersen <andersen at codepoet.org>
#
#<name> <type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>
/bin/tinylogin f 4755 0 0 - - - - -
/etc/shadow f 600 0 0 - - - - -
/etc/shadow f 600 0 0 - - - - -
/usr/share/udhcpc/default.script f 755 0 0 - - - - -
/home/default d 2755 1000 1000 - - - - -
/boot/var/tmp d 1777 0 0 - - - - -
/boot/var/dev d 755 0 0 - - - - -
/boot/var/dev/pts d 755 0 0 - - - - -
/boot/var/dev/ptmx c 666 0 0 5 2 - - -
/boot/var/dev/mem c 640 0 0 1 1 - - -
/boot/var/dev/kmem c 640 0 0 1 2 - - -
/boot/var/dev/null c 640 0 0 1 3 - - -
/boot/var/dev/zero c 640 0 0 1 5 - - -
/boot/var/dev/random c 640 0 0 1 8 - - -
/boot/var/dev/urandom c 640 0 0 1 9 - - -
/boot/var/dev/ram b 640 0 0 1 1 - - -
/boot/var/dev/ram b 640 0 0 1 0 0 1 4
/boot/var/dev/loop b 640 0 0 7 0 0 1 2
/boot/var/dev/console c 640 0 0 5 1 - - -
/boot/var/dev/tty c 640 0 0 5 0 - - -
/boot/var/dev/tty c 640 0 0 4 0 0 1 8
/boot/var/dev/ttyp c 640 0 0 3 0 0 1 10
/boot/var/dev/ptyp c 640 0 0 2 0 0 1 10
/boot/var/dev/ttyP c 640 0 0 57 0 0 1 4
/boot/var/dev/ttySA c 640 0 0 204 5 0 1 3
/boot/var/dev/ppp c 640 0 0 108 0 - - -
/boot/var/dev/ucb1x00-ts c 640 0 0 10 14 - - -
/boot/var/dev/wheaties c 640 0 0 60 0 - - -
/boot/var/dev/audio c 640 0 29 14 4 - - -
/boot/var/dev/audio1 c 640 0 29 14 20 - - -
/boot/var/dev/dsp c 640 0 29 14 3 - - -
/boot/var/dev/dsp1 c 640 0 29 14 19 - - -
/boot/var/dev/sndstat c 640 0 29 14 6 - - -
/boot/var/dev/fb c 640 0 5 29 0 0 32 4
/boot/var/dev/mtd c 640 0 0 90 0 0 2 4
/boot/var/dev/mtdblock b 640 0 0 31 0 0 1 4
/boot/var/dev/rtc c 640 0 0 10 135 - - -
#
#
#/boot/var/dev/psaux c 640 0 0 10 1 - - -
#/boot/var/dev/fd b 640 0 0 2 0 0 0 1
#
# IDE Devices
/boot/var/dev/hda b 640 0 0 3 0 - - -
/boot/var/dev/hda b 640 0 0 3 1 1 1 4
/boot/var/dev/hdb b 640 0 0 3 64 - - -
/boot/var/dev/hdb b 640 0 0 3 65 1 1 4
#/boot/var/dev/hdc b 640 0 0 22 0 - - -
#/boot/var/dev/hdc b 640 0 0 22 1 1 1 1
#/boot/var/dev/hdd b 640 0 0 22 64 - - -
#/boot/var/dev/hdd b 640 0 0 22 65 1 1 1
# SCSI Devices
#/boot/var/dev/sda b 640 0 0 8 0 - - -
#/boot/var/dev/sda b 640 0 0 8 1 1 1 1
#/boot/var/dev/sdb b 640 0 0 8 16 - - -
#/boot/var/dev/sdb b 640 0 0 8 17 1 1 1
#/boot/var/dev/sdc b 640 0 0 8 32 - - -
#/boot/var/dev/sdc b 640 0 0 8 33 1 1 1
#/boot/var/dev/sdd b 640 0 0 8 48 - - -
More information about the busybox
mailing list