]>
Commit | Line | Data |
---|---|---|
d2ce1817 GKH |
1 | |
2 | udev - a userspace implementation of devfs | |
3 | ||
4 | For more information on the design, and structure of this project, see the | |
5 | files in the docs/ directory. | |
6 | ||
7 | To use: | |
8 | ||
bf3ca56f | 9 | - You must be running a 2.6 version of the Linux kernel. |
d2ce1817 | 10 | |
9ab31422 GKH |
11 | - Your 2.6 kernel must have had CONFIG_HOTPLUG enabled when it was built. |
12 | ||
bf3ca56f GKH |
13 | - Make sure sysfs is mounted. udev will figure out where sysfs is mounted, but |
14 | the traditional place for it is at /sys. You can mount it by hand by running: | |
15 | mount -t sysfs none /sys | |
d2ce1817 | 16 | |
bf3ca56f GKH |
17 | - Make sure you have the latest version of the linux-hotplug scripts. They are |
18 | available at linux-hotplug.sf.net or from your local kernel.org mirror at: | |
19 | kernel.org/pub/linux/utils/kernel/hotplug/ | |
20 | They are required in order for udev to work properly. | |
d2ce1817 | 21 | |
bf3ca56f GKH |
22 | If for some reason you do not install the hotplug scripts, you must tell the |
23 | kernel to point the hotplug binary at wherever you install udev at. This can | |
24 | be done by: | |
25 | echo "/sbin/udev" > /proc/sys/kernel/hotplug | |
d2ce1817 | 26 | |
bf3ca56f GKH |
27 | - Build the project: |
28 | make | |
d2ce1817 | 29 | |
7d27ce1d GKH |
30 | Note: |
31 | There are a number of different flags that you can use when building | |
32 | udev. They are as follows: | |
05230184 GKH |
33 | prefix |
34 | set this to the default root that you want udev to be | |
7d27ce1d GKH |
35 | installed into. This works just like the 'configure --prefix' |
36 | script does. Default value is ''. Only override this if you | |
37 | really know what you are doing. | |
05230184 GKH |
38 | USE_KLIBC |
39 | if set to 'true', udev is built and linked against the | |
40 | included version of klibc. Default value is 'false'. | |
41 | USE_LOG | |
42 | if set to 'true', udev will emit messages to the syslog when | |
43 | it creates or removes device nodes. This is helpful to see | |
44 | what udev is doing. This is enabled by default. Note, if you | |
45 | are building udev against klibc it is recommended that you | |
46 | disable this option (due to klibc's syslog implementation.) | |
057f2bdb GKH |
47 | USE_SELINUX |
48 | if set to 'true', udev will be built with SELinux support | |
49 | enabled. This is disabled by default. | |
05230184 GKH |
50 | DEBUG |
51 | if set to 'true', debugging messages will be sent to the syslog | |
52 | as udev is run. Default value is 'false'. | |
977083c2 GKH |
53 | KERNEL_DIR |
54 | If this is not set it will default to /lib/modules/`uname -r`/build | |
55 | This is used if USE_KLIBC=true to find the kernel include | |
56 | directory that klibc needs to build against. This must be set | |
57 | if you are not building udev while running a 2.6 kernel. | |
7d27ce1d GKH |
58 | |
59 | So, if you want to build udev using klibc with debugging messages, you | |
60 | would do: | |
66626948 | 61 | make USE_KLIBC=true DEBUG=true |
7d27ce1d | 62 | |
bf3ca56f GKH |
63 | - Install the project: |
64 | make install | |
d2ce1817 | 65 | |
bf3ca56f GKH |
66 | This will put the udev binary in /sbin, create the /udev and /etc/udev |
67 | directories, and place the udev configuration files in /etc/udev. You | |
68 | will probably want to edit the namedev.* files to create custom naming | |
69 | rules. More info on how the config files are set up are contained in | |
70 | comments in the files, and is located in the documentation. | |
71 | ||
72 | - Add and remove devices from the system and marvel as nodes are created | |
73 | and removed in /udev/ based on the device types. | |
74 | ||
75 | - If you later get sick of it, uninstall it: | |
76 | make uninstall | |
77 | ||
78 | ||
9ab31422 GKH |
79 | Things are still quite rough, but it should work properly. If nothing |
80 | seems to happen, make sure your build worked properly by running the | |
81 | udev-test.pl script as root in the test/ subdirectory of the udev source | |
82 | tree. | |
83 | ||
84 | Development and documentation help is very much appreciated, see the TODO | |
85 | file for a list of things left to be done. | |
d2ce1817 | 86 | |
a34ea8f5 | 87 | |
9ab31422 GKH |
88 | Any comment/questions/concerns please let me and the other udev developers |
89 | know by sending a message to the linux-hotplug-devel mailing list at: | |
90 | linux-hotplug-devel@lists.sourceforge.net | |
d2ce1817 GKH |
91 | |
92 | greg k-h | |
93 | greg@kroah.com | |
057f2bdb | 94 |