[1d67150] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[bd48e48] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[1d67150] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
| 8 | <sect1 id="ch-scripts-mdev">
|
---|
| 9 | <?dbhtml filename="mdev.html"?>
|
---|
| 10 |
|
---|
[75a41b8] | 11 | <title>Configure mdev</title>
|
---|
[1d67150] | 12 |
|
---|
| 13 | <indexterm zone="ch-scripts-mdev">
|
---|
[75a41b8] | 14 | <primary sortas="a-mdev">mdev</primary>
|
---|
[1d67150] | 15 | </indexterm>
|
---|
| 16 |
|
---|
| 17 | <sect2 role="package">
|
---|
| 18 | <title/>
|
---|
| 19 |
|
---|
[364d698] | 20 | <para>Is a BusyBox replacement of udev. With a different rule
|
---|
[1d67150] | 21 | base.</para>
|
---|
| 22 |
|
---|
| 23 | </sect2>
|
---|
| 24 |
|
---|
| 25 | <sect2>
|
---|
[3ca2208] | 26 | <title>Creating /etc/mdev.conf</title>
|
---|
| 27 |
|
---|
| 28 | <indexterm zone="ch-scripts-mdev">
|
---|
| 29 | <primary sortas="e-/etc/mdev.conf">/etc/mdev.conf</primary>
|
---|
| 30 | </indexterm>
|
---|
[1d67150] | 31 |
|
---|
| 32 | <para os="a">Now we will create the mdev.conf file for use with our system:</para>
|
---|
| 33 |
|
---|
[3ca2208] | 34 | <screen os="b"><?dbfo keep-together="auto"?><userinput>cat > ${CLFS}/etc/mdev.conf<< "EOF"
|
---|
[1d67150] | 35 | <literal># /etc/mdev/conf
|
---|
| 36 |
|
---|
| 37 | # Devices:
|
---|
| 38 | # Syntax: %s %d:%d %s
|
---|
| 39 | # devices user:group mode
|
---|
| 40 |
|
---|
[111f2c6] | 41 | # null does already exist; therefore ownership has to be changed with command
|
---|
| 42 | null root:root 0666 @chmod 666 $MDEV
|
---|
| 43 | zero root:root 0666
|
---|
| 44 | grsec root:root 0660
|
---|
| 45 | full root:root 0666
|
---|
| 46 |
|
---|
| 47 | random root:root 0666
|
---|
| 48 | urandom root:root 0444
|
---|
| 49 | hwrandom root:root 0660
|
---|
| 50 |
|
---|
| 51 | # console does already exist; therefore ownership has to be changed with command
|
---|
| 52 | #console root:tty 0600 @chmod 600 $MDEV && mkdir -p vc && ln -sf ../$MDEV vc/0
|
---|
| 53 | console root:tty 0600 @mkdir -pm 755 fd && cd fd && for x in 0 1 2 3 ; do ln -sf /proc/self/fd/$x $x; done
|
---|
| 54 |
|
---|
| 55 | fd0 root:floppy 0660
|
---|
| 56 | kmem root:root 0640
|
---|
| 57 | mem root:root 0640
|
---|
| 58 | port root:root 0640
|
---|
| 59 | ptmx root:tty 0666
|
---|
| 60 |
|
---|
| 61 | # ram.*
|
---|
| 62 | ram([0-9]*) root:disk 0660 >rd/%1
|
---|
| 63 | loop([0-9]+) root:disk 0660 >loop/%1
|
---|
| 64 | sd[a-z].* root:disk 0660 */lib/mdev/usbdisk_link
|
---|
| 65 | hd[a-z][0-9]* root:disk 0660 */lib/mdev/ide_links
|
---|
| 66 | md[0-9] root:disk 0660
|
---|
| 67 |
|
---|
| 68 | tty root:tty 0666
|
---|
| 69 | tty[0-9] root:root 0600
|
---|
| 70 | tty[0-9][0-9] root:tty 0660
|
---|
| 71 | ttyS[0-9]* root:tty 0660
|
---|
| 72 | pty.* root:tty 0660
|
---|
| 73 | vcs[0-9]* root:tty 0660
|
---|
| 74 | vcsa[0-9]* root:tty 0660
|
---|
| 75 |
|
---|
| 76 | ttyLTM[0-9] root:dialout 0660 @ln -sf $MDEV modem
|
---|
| 77 | ttySHSF[0-9] root:dialout 0660 @ln -sf $MDEV modem
|
---|
| 78 | slamr root:dialout 0660 @ln -sf $MDEV slamr0
|
---|
| 79 | slusb root:dialout 0660 @ln -sf $MDEV slusb0
|
---|
| 80 | fuse root:root 0666
|
---|
| 81 |
|
---|
| 82 | # dri device
|
---|
| 83 | card[0-9] root:video 0660 =dri/
|
---|
| 84 |
|
---|
| 85 | # alsa sound devices and audio stuff
|
---|
| 86 | pcm.* root:audio 0660 =snd/
|
---|
| 87 | control.* root:audio 0660 =snd/
|
---|
| 88 | midi.* root:audio 0660 =snd/
|
---|
| 89 | seq root:audio 0660 =snd/
|
---|
| 90 | timer root:audio 0660 =snd/
|
---|
| 91 |
|
---|
| 92 | adsp root:audio 0660 >sound/
|
---|
| 93 | audio root:audio 0660 >sound/
|
---|
| 94 | dsp root:audio 0660 >sound/
|
---|
| 95 | mixer root:audio 0660 >sound/
|
---|
| 96 | sequencer.* root:audio 0660 >sound/
|
---|
| 97 |
|
---|
| 98 | # misc stuff
|
---|
| 99 | agpgart root:root 0660 >misc/
|
---|
| 100 | psaux root:root 0660 >misc/
|
---|
| 101 | rtc root:root 0664 >misc/
|
---|
| 102 |
|
---|
| 103 | # input stuff
|
---|
| 104 | event[0-9]+ root:root 0640 =input/
|
---|
| 105 | mice root:root 0640 =input/
|
---|
| 106 | mouse[0-9] root:root 0640 =input/
|
---|
| 107 | ts[0-9] root:root 0600 =input/
|
---|
| 108 |
|
---|
| 109 | # v4l stuff
|
---|
| 110 | vbi[0-9] root:video 0660 >v4l/
|
---|
| 111 | video[0-9] root:video 0660 >v4l/
|
---|
| 112 |
|
---|
| 113 | # dvb stuff
|
---|
| 114 | dvb.* root:video 0660 */lib/mdev/dvbdev
|
---|
| 115 |
|
---|
| 116 | # load drivers for usb devices
|
---|
| 117 | usbdev[0-9].[0-9] root:root 0660 */lib/mdev/usbdev
|
---|
| 118 | usbdev[0-9].[0-9]_.* root:root 0660
|
---|
| 119 |
|
---|
| 120 | # net devices
|
---|
| 121 | tun[0-9]* root:root 0600 =net/
|
---|
| 122 | tap[0-9]* root:root 0600 =net/
|
---|
| 123 |
|
---|
| 124 | # zaptel devices
|
---|
| 125 | zap(.*) root:dialout 0660 =zap/%1
|
---|
| 126 | dahdi!(.*) root:dialout 0660 =dahdi/%1
|
---|
| 127 |
|
---|
| 128 | # raid controllers
|
---|
| 129 | cciss!(.*) root:disk 0660 =cciss/%1
|
---|
| 130 | ida!(.*) root:disk 0660 =ida/%1
|
---|
| 131 | rd!(.*) root:disk 0660 =rd/%1
|
---|
| 132 |
|
---|
| 133 | sr[0-9] root:cdrom 0660 @ln -sf $MDEV cdrom
|
---|
| 134 |
|
---|
| 135 | # hpilo
|
---|
| 136 | hpilo!(.*) root:root 0660 =hpilo/%1
|
---|
| 137 |
|
---|
| 138 | # xen stuff
|
---|
| 139 | xvd[a-z] root:root 0660 */lib/mdev/xvd_links</literal>
|
---|
[1d67150] | 140 | EOF</userinput></screen>
|
---|
| 141 |
|
---|
| 142 | </sect2>
|
---|
| 143 |
|
---|
| 144 | </sect1>
|
---|
| 145 |
|
---|