README revision 8481f8ce2bd2b19ebcf3cb96ac6825093f626b0f
71092d70af35567dd154d3de2ce04ce62e157a7cLennart Poettering
d086fe4e085d216652b70e575e59302810035989Kay Sieversudev - a userspace implementation of devfs
d086fe4e085d216652b70e575e59302810035989Kay Sievers
d086fe4e085d216652b70e575e59302810035989Kay SieversFor more information on the design, and structure of this project, see the
d086fe4e085d216652b70e575e59302810035989Kay Sieversfiles in the docs/ directory.
d086fe4e085d216652b70e575e59302810035989Kay Sievers
d086fe4e085d216652b70e575e59302810035989Kay SieversTo use:
9cb48731b29f508178731b45b0643c816800c05eKay Sievers
9cb48731b29f508178731b45b0643c816800c05eKay Sievers- You must be running a 2.6 version of the Linux kernel.
9cb48731b29f508178731b45b0643c816800c05eKay Sievers
9cb48731b29f508178731b45b0643c816800c05eKay Sievers- Your 2.6 kernel must have had CONFIG_HOTPLUG enabled when it was built.
9cb48731b29f508178731b45b0643c816800c05eKay Sievers
9cb48731b29f508178731b45b0643c816800c05eKay Sievers- Make sure sysfs is mounted. udev will figure out where sysfs is mounted, but
9cb48731b29f508178731b45b0643c816800c05eKay Sievers the traditional place for it is at /sys. You can mount it by hand by running:
9cb48731b29f508178731b45b0643c816800c05eKay Sievers mount -t sysfs none /sys
ebcd5d3acd4c470668bbcd945a5aa42f0af5ccf0Kay Sievers
ebcd5d3acd4c470668bbcd945a5aa42f0af5ccf0Kay Sievers- Make sure you have the latest version of the linux-hotplug scripts. They are
80037e4d17d0c8f28d0ff610902babc9e2b4e2f9Kay Sievers available at linux-hotplug.sf.net or from your local kernel.org mirror at:
ebcd5d3acd4c470668bbcd945a5aa42f0af5ccf0Kay Sievers kernel.org/pub/linux/utils/kernel/hotplug/
7c66aeba0f28cb82027d6015405ed71afa3b6059Kay Sievers They are required in order for udev to work properly.
7c66aeba0f28cb82027d6015405ed71afa3b6059Kay Sievers
c904f64d84db8c4eebedf210ba10893f19ba05edLennart Poettering If for some reason you do not install the hotplug scripts, you must tell the
c904f64d84db8c4eebedf210ba10893f19ba05edLennart Poettering kernel to point the hotplug binary at wherever you install udev at. This can
05677bb78079c3fa0283101aac2c07581f4873f1Lennart Poettering be done by:
73090dc815390f4fca4e3ed8a7e1d3806605daaaLennart Poettering echo "/sbin/udev" > /proc/sys/kernel/hotplug
f957632b960a0a42999b38ded7089fa602b41745Kay Sievers
f957632b960a0a42999b38ded7089fa602b41745Kay Sievers- Build the project:
f957632b960a0a42999b38ded7089fa602b41745Kay Sievers make
f957632b960a0a42999b38ded7089fa602b41745Kay Sievers
9a36607584bbd1d78775353e022a51794b4e27b1Lennart Poettering Note:
9a36607584bbd1d78775353e022a51794b4e27b1Lennart Poettering There are a number of different flags that you can use when building
a40593a0d0d740efa387e35411e1e456a6c5aba7Lennart Poettering udev. They are as follows:
20ffc4c4a9226b0e45cc02ad9c0108981626c0bbKay Sievers prefix
871206d340ed6119b31daeb8b13c8ef5ccf25501Kay Sievers set this to the default root that you want udev to be
871206d340ed6119b31daeb8b13c8ef5ccf25501Kay Sievers installed into. This works just like the 'configure --prefix'
871206d340ed6119b31daeb8b13c8ef5ccf25501Kay Sievers script does. Default value is ''. Only override this if you
825c6fe5eb362437aa46faa52b683a62eede9a13Lennart Poettering really know what you are doing.
825c6fe5eb362437aa46faa52b683a62eede9a13Lennart Poettering USE_KLIBC
825c6fe5eb362437aa46faa52b683a62eede9a13Lennart Poettering if set to 'true', udev is built and linked against the
825c6fe5eb362437aa46faa52b683a62eede9a13Lennart Poettering included version of klibc. Default value is 'false'.
825c6fe5eb362437aa46faa52b683a62eede9a13Lennart Poettering USE_LOG
825c6fe5eb362437aa46faa52b683a62eede9a13Lennart Poettering if set to 'true', udev will emit messages to the syslog when
825c6fe5eb362437aa46faa52b683a62eede9a13Lennart Poettering it creates or removes device nodes. This is helpful to see
825c6fe5eb362437aa46faa52b683a62eede9a13Lennart Poettering what udev is doing. This is enabled by default. Note, if you
825c6fe5eb362437aa46faa52b683a62eede9a13Lennart Poettering are building udev against klibc it is recommended that you
825c6fe5eb362437aa46faa52b683a62eede9a13Lennart Poettering disable this option (due to klibc's syslog implementation.)
825c6fe5eb362437aa46faa52b683a62eede9a13Lennart Poettering USE_DBUS
825c6fe5eb362437aa46faa52b683a62eede9a13Lennart Poettering if set to 'true', DBUS messages will be sent everytime udev
e146e4516b9ea9907852e7ad609de39dca9e8769Kay Sievers creates or removes a device node. This requires that DBUS
e146e4516b9ea9907852e7ad609de39dca9e8769Kay Sievers development headers and libraries be present on your system to
e146e4516b9ea9907852e7ad609de39dca9e8769Kay Sievers build properly. Default value is 'false'.
e146e4516b9ea9907852e7ad609de39dca9e8769Kay Sievers USE_SELINUX
e146e4516b9ea9907852e7ad609de39dca9e8769Kay Sievers if set to 'true', SELinux support for udev will be built in.
71092d70af35567dd154d3de2ce04ce62e157a7cLennart Poettering This requires that SELinux development headers and libraries be
dcfc4b2e5c1af6375488c00bdc6fb8122f86c4d7Lennart Poettering present on your system to build properly. Default value is
0790b9fed42eefc4e22dbbe2337cba9713b7848cLennart Poettering 'false'.
0790b9fed42eefc4e22dbbe2337cba9713b7848cLennart Poettering DEBUG
0790b9fed42eefc4e22dbbe2337cba9713b7848cLennart Poettering if set to 'true', debugging messages will be sent to the syslog
0790b9fed42eefc4e22dbbe2337cba9713b7848cLennart Poettering as udev is run. Default value is 'false'.
df1c8f6ac8a45913104b5eeb44f4574689fedd50Lennart Poettering KERNEL_DIR
df1c8f6ac8a45913104b5eeb44f4574689fedd50Lennart Poettering If this is not set it will default to /lib/modules/`uname -r`/build
d7535514c39b2245e1651dc4b08bdec230e05f36Lennart Poettering This is used if USE_KLIBC=true to find the kernel include
d7535514c39b2245e1651dc4b08bdec230e05f36Lennart Poettering directory that klibc needs to build against. This must be set
5aea932fd54db835b77709ddeba30732648aae53Lennart Poettering if you are not building udev while running a 2.6 kernel.
5aea932fd54db835b77709ddeba30732648aae53Lennart Poettering
918943c75fbd9dee87ff396de3a7c63a8d228433Lennart Poettering So, if you want to build udev using klibc with debugging messages, you
918943c75fbd9dee87ff396de3a7c63a8d228433Lennart Poettering would do:
fd4d89b2c0b31da01d134301e30916931ae3c7d9Lennart Poettering make USE_KLIBC=true DEBUG=true
fd4d89b2c0b31da01d134301e30916931ae3c7d9Lennart Poettering
8230e26dc954a40d8c9dbc8ddd9376117021f9d2Lennart Poettering- Install the project:
8230e26dc954a40d8c9dbc8ddd9376117021f9d2Lennart Poettering make install
dcfc4b2e5c1af6375488c00bdc6fb8122f86c4d7Lennart Poettering
dcfc4b2e5c1af6375488c00bdc6fb8122f86c4d7Lennart Poettering This will put the udev binary in /sbin, create the /udev and /etc/udev
dcfc4b2e5c1af6375488c00bdc6fb8122f86c4d7Lennart Poettering directories, and place the udev configuration files in /etc/udev. You
dcfc4b2e5c1af6375488c00bdc6fb8122f86c4d7Lennart Poettering will probably want to edit the namedev.* files to create custom naming
73fcda2737ac607a265b3e1382e9d4fb4607c20fKay Sievers rules. More info on how the config files are set up are contained in
73fcda2737ac607a265b3e1382e9d4fb4607c20fKay Sievers comments in the files, and is located in the documentation.
919a7f39e6aa4a93b8348ec2586e313c40f49e52Lennart Poettering
3bea51c59d79333a2a365f4677c97b4302377a48Lennart Poettering- Add and remove devices from the system and marvel as nodes are created
3bea51c59d79333a2a365f4677c97b4302377a48Lennart Poettering and removed in /udev/ based on the device types.
3bea51c59d79333a2a365f4677c97b4302377a48Lennart Poettering
3bea51c59d79333a2a365f4677c97b4302377a48Lennart Poettering- If you later get sick of it, uninstall it:
4d9909c93e9c58789c71b34555a1908307c6849eLennart Poettering make uninstall
4d9909c93e9c58789c71b34555a1908307c6849eLennart Poettering
7212a8a99ee863698f5feaa00abb4b99f3996a1aLennart Poettering
7212a8a99ee863698f5feaa00abb4b99f3996a1aLennart PoetteringThings are still quite rough, but it should work properly. If nothing
47ae7201b1df43bd3da83a19e38483b0e5694c99Lennart Poetteringseems to happen, make sure your build worked properly by running the
47ae7201b1df43bd3da83a19e38483b0e5694c99Lennart Poetteringudev-test.pl script as root in the test/ subdirectory of the udev source
941e990db1f2682abaa2966b1c48602901d0c599Lennart Poetteringtree.
941e990db1f2682abaa2966b1c48602901d0c599Lennart Poettering
decab96090593d617bfd576cb68253a6e082309bLennart PoetteringDevelopment and documentation help is very much appreciated, see the TODO
decab96090593d617bfd576cb68253a6e082309bLennart Poetteringfile for a list of things left to be done.
919a7f39e6aa4a93b8348ec2586e313c40f49e52Lennart Poettering
919a7f39e6aa4a93b8348ec2586e313c40f49e52Lennart Poettering
88a6c5894c9d3f85d63b87b040c130366b4006ceKay SieversAny comment/questions/concerns please let me and the other udev developers
8351ceaea9480d9c2979aa2ff0f4982cfdfef58dLennart Poetteringknow by sending a message to the linux-hotplug-devel mailing list at:
6a7353684b65f0107cbdfa0a16ab7717ba257b61Lennart Poettering linux-hotplug-devel@lists.sourceforge.net
6a7353684b65f0107cbdfa0a16ab7717ba257b61Lennart Poettering
6b78f9b4354010f8af2fe48c783ffd52b2db8f57Lennart Poetteringgreg k-h
6b78f9b4354010f8af2fe48c783ffd52b2db8f57Lennart Poetteringgreg@kroah.com
9f8d29834ba97052403e50ec9b358c0470fa4cebLennart Poettering
9f8d29834ba97052403e50ec9b358c0470fa4cebLennart Poettering
9f8d29834ba97052403e50ec9b358c0470fa4cebLennart Poettering
9f8d29834ba97052403e50ec9b358c0470fa4cebLennart Poettering
b7def684941808600c344f0be7a2b9fcdda97e0fLennart Poettering
b7def684941808600c344f0be7a2b9fcdda97e0fLennart Poettering