mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-12 06:57:57 +04:00
input-support: add a package for input device handling
The evdev character devices come out 0600 root:root, so a display server or any other process reading keyboards and pointers runs as root. Add an input-support package which allocates the input group and puts the input nodes into it, and make the evdev and joydev modules depend on it. The one device profile that ships evdev lists the package directly. kmod-input-core stays ungated: it carries no device node of its own, and most drivers built on it deliver their events to in-kernel consumers such as the keyboard and button handlers. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
1 parent
a6524274c1
commit
a7c50f7d73
4 files changed
+28
-3
No files matched your search
@@ -104,7 +104,7 @@ $(eval $(call KernelPackage,input-core))
|
|||||||
define KernelPackage/input-evdev
|
define KernelPackage/input-evdev
|
||||||
SUBMENU:=$(INPUT_MODULES_MENU)
|
SUBMENU:=$(INPUT_MODULES_MENU)
|
||||||
TITLE:=Input event device
|
TITLE:=Input event device
|
||||||
DEPENDS:=+kmod-input-core
|
DEPENDS:=input-support +kmod-input-core
|
||||||
KCONFIG:=CONFIG_INPUT_EVDEV
|
KCONFIG:=CONFIG_INPUT_EVDEV
|
||||||
FILES:=$(LINUX_DIR)/drivers/input/evdev.ko
|
FILES:=$(LINUX_DIR)/drivers/input/evdev.ko
|
||||||
AUTOLOAD:=$(call AutoLoad,60,evdev)
|
AUTOLOAD:=$(call AutoLoad,60,evdev)
|
||||||
@@ -196,7 +196,7 @@ $(eval $(call KernelPackage,input-matrix-keypad))
|
|||||||
define KernelPackage/input-joydev
|
define KernelPackage/input-joydev
|
||||||
SUBMENU:=$(INPUT_MODULES_MENU)
|
SUBMENU:=$(INPUT_MODULES_MENU)
|
||||||
TITLE:=Joystick device support
|
TITLE:=Joystick device support
|
||||||
DEPENDS:=+kmod-input-core
|
DEPENDS:=input-support +kmod-input-core
|
||||||
KCONFIG:=CONFIG_INPUT_JOYDEV
|
KCONFIG:=CONFIG_INPUT_JOYDEV
|
||||||
FILES:=$(LINUX_DIR)/drivers/input/joydev.ko
|
FILES:=$(LINUX_DIR)/drivers/input/joydev.ko
|
||||||
AUTOLOAD:=$(call AutoProbe,joydev)
|
AUTOLOAD:=$(call AutoProbe,joydev)
|
||||||
|
|||||||
@@ -78,6 +78,23 @@ define Package/accel-support/install
|
|||||||
$(call InstallFragment,$(1),35-accel.json)
|
$(call InstallFragment,$(1),35-accel.json)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/input-support
|
||||||
|
$(call Package/hardware-support/Default)
|
||||||
|
TITLE:=Input device support
|
||||||
|
USERID:=:input=41
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/input-support/description
|
||||||
|
Feature gate for input devices. Allocates the input group and installs
|
||||||
|
the hotplug rules which put the evdev character devices into it. Kernel
|
||||||
|
modules exposing input devices and userspace using the group depend on
|
||||||
|
this package.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/input-support/install
|
||||||
|
$(call InstallFragment,$(1),40-input.json)
|
||||||
|
endef
|
||||||
|
|
||||||
define Build/Prepare
|
define Build/Prepare
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@@ -90,3 +107,4 @@ endef
|
|||||||
$(eval $(call BuildPackage,audio-support))
|
$(eval $(call BuildPackage,audio-support))
|
||||||
$(eval $(call BuildPackage,video-support))
|
$(eval $(call BuildPackage,video-support))
|
||||||
$(eval $(call BuildPackage,accel-support))
|
$(eval $(call BuildPackage,accel-support))
|
||||||
|
$(eval $(call BuildPackage,input-support))
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
[
|
||||||
|
[ "if",
|
||||||
|
[ "eq", "SUBSYSTEM", "input" ],
|
||||||
|
[ "makedev", "/dev/%DEVNAME%", "0660", "input" ]
|
||||||
|
]
|
||||||
|
]
|
||||||
@@ -737,7 +737,8 @@ define Device/qding_qc202
|
|||||||
IMAGE_SIZE := 7872k
|
IMAGE_SIZE := 7872k
|
||||||
DEVICE_VENDOR := Qding
|
DEVICE_VENDOR := Qding
|
||||||
DEVICE_MODEL := QC202
|
DEVICE_MODEL := QC202
|
||||||
DEVICE_PACKAGES := kmod-i2c-mt7628 kmod-gpio-beeper kmod-input-matrix-keypad kmod-input-evdev uboot-envtools
|
DEVICE_PACKAGES := kmod-i2c-mt7628 kmod-gpio-beeper kmod-input-matrix-keypad kmod-input-evdev \
|
||||||
|
input-support uboot-envtools
|
||||||
IMAGES += factory.bin
|
IMAGES += factory.bin
|
||||||
IMAGE/factory.bin := $$(sysupgrade_bin) | qding-header qc202
|
IMAGE/factory.bin := $$(sysupgrade_bin) | qding-header qc202
|
||||||
endef
|
endef
|
||||||
|
|||||||
Reference in new issue
Block a user