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

Last change on this file since 7efa496 was 111f2c6, checked in by Andrew Bradford <bradfa@…>, 14 years ago

Updated mdev.conf using Alpine Linux config

Obtained mdev.conf from Alpine Linux project from:
http://git.alpinelinux.org/cgit/aports.git/plain/main/busybox-initscripts/mdev.conf?h=2.1-stable
Modified slightly to fit our environment. Tested quickly on a
BeagleBoard-xM.

Used Alpine Linux as base because of mailing list thread:
http://lists.busybox.net/pipermail/busybox/2009-November/070889.html

  • Property mode set to 100644
File size: 3.6 KB
RevLine 
[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
20 <para>Is a Busybox replacement of udev. With a different rule
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 &gt; ${CLFS}/etc/mdev.conf&lt;&lt; "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
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>
[1d67150]140EOF</userinput></screen>
141
142 </sect2>
143
144</sect1>
145
Note: See TracBrowser for help on using the repository browser.