• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

m4/H04-Sep-2021-65

.cirrus.ymlH A D04-Sep-2021542 1917

.gitignoreH A D04-Sep-2021277 3332

Makefile.amH A D04-Sep-2021772 4133

READMEH A D04-Sep-20215.3 KiB216162

autogen.shH A D04-Sep-202145 41

configure.acH A D04-Sep-20211.3 KiB4435

libudev.hH A D04-Sep-20217.8 KiB167153

libudev.pc.inH A D04-Sep-2021246 119

meson.buildH A D03-May-20223 KiB129105

tree.hH A D04-Sep-202127.9 KiB834692

udev-device.cH A D04-Sep-202110.5 KiB474364

udev-device.hH A D04-Sep-2021697 2418

udev-enumerate.cH A D04-Sep-20215.9 KiB251182

udev-filter.cH A D04-Sep-20215.9 KiB246184

udev-filter.hH A D04-Sep-2021700 2320

udev-hwdb.cH A D04-Sep-20212 KiB6533

udev-list.cH A D04-Sep-20214.1 KiB177115

udev-list.hH A D04-Sep-2021529 1813

udev-monitor.cH A D04-Sep-20219.2 KiB403314

udev-queue.cH A D04-Sep-20214.1 KiB186134

udev-test.cH A D04-Sep-20215 KiB17071

udev-utils.cH A D04-Sep-202123 KiB895747

udev-utils.hH A D04-Sep-2021645 2416

udev.cH A D04-Sep-20212.8 KiB13283

udev.hH A D04-Sep-2021157 106

utils-gpl.cH A D04-Sep-202111.1 KiB395247

utils-gpl.hH A D04-Sep-202169 21

utils.cH A D03-May-20228 KiB391297

utils.hH A D03-May-20222.5 KiB10572

README

1libudev-compatible interface for devd
2=====================================
3
4Intended to work with xorg-server and libinput
5
6Installation:
7
81. Install multimedia/v4l_compat port. In case of evdev-enabled kernels it
9   can be patched to use system evdev headers instead of webcamd-supplied
10
11
122. Build and install libudev-devd
13
14export CFLAGS=-I/usr/local/include
15export CPPFLAGS=-I/usr/local/include
16cd libudev-devd
17./autogen.sh
18./configure
19make && sudo make install
20
21
223. recompile x11-servers/xorg-server with DEVD port option disabled and
23following configure args added: --enable-config-udev=yes \
24    --disable-config-udev-kms --disable-systemd-logind
25
26If you are going to use /dev/kbdmux0 as keyboard input device patch[1] should
27be applied to config/udev.c file in xorg distribution
28
29
304. Apply changes to xorg.conf
31
32Remove all InputDevice from "ServerLayout" section of xorg.conf
33
34For gsoc2014 evdev-enabled kernels add following lines to xorg.conf
35
36<<< CUT
37
38# Use the libinput driver for all event devices
39Section "InputClass"
40	Identifier	"evdev"
41	Driver		"libinput"
42#	Driver		"evdev"
43	MatchDevicePath	"/dev/input/event*"
44EndSection
45
46# Explicitly set xkb_rules to evdev for keyboards
47Section "InputClass"
48	Identifier	"evdev keyboard"
49	MatchIsKeyboard	"on"
50	MatchDevicePath	"/dev/input/event*"
51        Option		"XkbRules" "evdev"
52EndSection
53
54# Disable kbdmux to not receive keyboard events twice
55Section "InputClass"
56	Identifier	"evdev disable kbdmux"
57	MatchIsKeyboard	"on"
58	MatchProduct	"System keyboard multiplexer"
59	MatchDevicePath	"/dev/input/event*"
60	Option		"Ignore" "true"
61EndSection
62
63<<<CUT
64
65For stock kernels add following lines to xorg.conf
66
67<<<CUT
68
69# Use the libinput driver for all event devices
70Section "InputClass"
71	Identifier	"evdev"
72	MatchDevicePath	"/dev/input/event*"
73	Driver		"evdev"
74EndSection
75
76Section "InputClass"
77	Identifier	"kbdmux"
78	MatchDevicePath	"/dev/kbdmux*"
79	Driver		"kbd"
80EndSection
81
82Section "InputClass"
83	Identifier	"System mouse"
84	MatchDevicePath	"/dev/sysmouse"
85	Driver		"mouse"
86EndSection
87
88Section "InputClass"
89	Identifier	"PS/2 mouse"
90	MatchDevicePath	"/dev/psm*"
91	Driver		"mouse"
92EndSection
93
94Section "InputClass"
95	Identifier	"USB mouses"
96	MatchDevicePath	"/dev/ums*"
97	Driver		"mouse"
98EndSection
99
100Section "InputClass"
101	Identifier	"Joystick"
102	MatchDevicePath "/dev/joy*"
103	Driver		"mouse"
104EndSection
105
106Section "InputClass"
107	Identifier	"Apple touchpad"
108	MatchDevicePath	"/dev/atp*"
109	Driver		"mouse"
110EndSection
111
112Section "InputClass"
113	Identifier	"Wellspring touchpad"
114	MatchDevicePath	"/dev/wsp*"
115	Driver		"mouse"
116EndSection
117
118Section "InputClass"
119	Identifier	"eGalax touchscreen"
120	MatchDevicePath	"/dev/uep*"
121	Driver		"egalax"
122EndSection
123
124<<<CUT
125
126
1275. Fetch and install libinput port by Jan Kokemuller???
128
129For gsoc2014 evdev-enabled kernels only:
130
131fetch https://github.com/wulf7/libinput/archive/master.tar.gz
132tar zxvf master.tar.gz
133cd libinput-master
134./autogen.sh
135make && sudo make install
136
137
1386. Fetch and install xf86-input-libinput
139
140For gsoc2014 evdev-enabled kernels only:
141
142fetch http://xorg.freedesktop.org/releases/individual/driver/xf86-input-libinput-0.14.0.tar.bz2
143..
144..
145..
146
147
1487. Build and install libudev-devd for Linuxolator
149
150install devel/linux-c7-devtools, devel/autoconf and devel/automake
151than compile libudev.so library and install it somewhere under /compat/linux.
152
153To build and install 64-bit library:
154
155cd libudev-devd
156./autogen.sh
157env CC="/compat/linux/bin/gcc" CFLAGS="--sysroot /compat/linux" ./configure --libdir=/usr/lib64/shims
158make
159sudo make install-exec DESTDIR=/compat/linux
160
161To build and install 32-bit library:
162
163cd libudev-devd
164./autogen.sh
165env CC="/compat/linux/bin/gcc" CFLAGS="--sysroot /compat/linux -m32" ./configure --libdir=/usr/lib/shims
166make
167sudo make install-exec DESTDIR=/compat/linux
168
169To run my_64bit_app or my_32bit_app with libudev overloaded with libudev-devd use
170
171LD_PRELOAD=/usr/lib64/shims/libudev.so my_64bit_app
172
173or
174
175LD_PRELOAD=/usr/lib/shims/libudev.so my_32bit_app
176
177
1788. Appendix
179
180[1] config/udev.c patch. Just place content between two <<<CUTs as
181/usr/ports/x11-servers/xorg-server/files/patch-config_udev.c file
182
183<<<CUT
184+--- config/udev.c.orig	2015-05-21 17:23:54.000000000 +0300
185++++ config/udev.c	2015-10-13 17:37:05.063290000 +0300
186+@@ -29,6 +29,7 @@
187+
188+ #include <libudev.h>
189+ #include <ctype.h>
190++#include <fcntl.h>
191+ #include <unistd.h>
192+
193+ #include "input.h"
194+@@ -188,6 +189,20 @@ device_added(struct udev_device *udev_de
195+         attrs.product = strdup(name);
196+     input_options = input_option_new(input_options, "name", name);
197+     input_options = input_option_new(input_options, "path", path);
198++    if(strstr(path, "kbdmux") != NULL) {
199++        /*
200++         * Don't pass "device" option if the keyboard is already attached
201++         * to the console (ie. open() fails). This would activate a special
202++         * logic in xf86-input-keyboard. Prevent any other attached to console
203++         * keyboards being processed. There can be only one such device.
204++         */
205++        int fd = open(path, O_RDONLY);
206++        if (fd > -1) {
207++            close(fd);
208++            input_options = input_option_new(input_options, "device", path);
209++        }
210++    }
211++    else
212+     input_options = input_option_new(input_options, "device", path);
213+     input_options = input_option_new(input_options, "major", itoa(major(devnum)));
214+     input_options = input_option_new(input_options, "minor", itoa(minor(devnum)));
215<<<CUT
216