Parcourir la source

swupdate-gui: create the device names opened by the GUI

The GUI opens /dev/fb, /dev/input/keyboard0 and /dev/input/touchscreen0,
which the kernel does not create: "cannot open framebuffer device" even
if /dev/fb0 exists. Add udev rules that link them to the framebuffer and
to the keyboard and touchscreen found by udev.

Signed-off-by: Stefano Babic <stefano.babic@swupdate.org>
Stefano Babic il y a 2 jours
Parent
commit
665b65601c

+ 5 - 0
recipes-support/rescuegui/files/90-recovery-gui.rules

@@ -0,0 +1,5 @@
+# swupdate-gui (recovery_gui) opens fixed device names:
+# /dev/fb, /dev/input/keyboard0 and /dev/input/touchscreen0
+SUBSYSTEM=="graphics", KERNEL=="fb0", SYMLINK+="fb"
+SUBSYSTEM=="input", KERNEL=="event*", ENV{ID_INPUT_KEYBOARD}=="1", SYMLINK+="input/keyboard0"
+SUBSYSTEM=="input", KERNEL=="event*", ENV{ID_INPUT_TOUCHSCREEN}=="1", SYMLINK+="input/touchscreen0"

+ 7 - 0
recipes-support/rescuegui/swupdate-gui_git.bb

@@ -13,6 +13,7 @@ SRC_URI = "git://github.com/sbabic/SWUpdateGUI.git;protocol=https;branch=main \
 	file://swupdate-gui \
 	file://swupdate-gui.service \
 	file://0001-Ported-to-lvgl-9.4.patch \
+	file://90-recovery-gui.rules \
 	"
 SRCREV = "d6bd129b4cea1e5c53bcad077a7d25af8260ef84"
 
@@ -38,8 +39,14 @@ do_install:append () {
         install -m 0755 ${S}/scripts/recovery-get-dhcp-status.sh ${D}${bindir}
         install -m 0755 ${S}/scripts/recovery-set-dhcp.sh ${D}${bindir}
         install -m 0755 ${S}/scripts/recovery-set-static.sh ${D}${bindir}
+
+        # The GUI opens /dev/fb and /dev/input/{keyboard0,touchscreen0}
+        install -d ${D}${sysconfdir}/udev/rules.d
+        install -m 0644 ${UNPACKDIR}/90-recovery-gui.rules ${D}${sysconfdir}/udev/rules.d/
 }
 
+FILES:${PN} += "${sysconfdir}/udev/rules.d/90-recovery-gui.rules"
+
 RDEPENDS:${PN}:append = " \
 	swupdate \
 	"