source: clfs-embedded/BOOK/bootscripts/common/mdev.xml@ a5d6c23

Last change on this file since a5d6c23 was 59d0399, checked in by Andrew Bradford <andrew@…>, 11 years ago

Update all bootscripts ch to use ${CLFS}/targetfs

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