busybox: create /dev/input/touchscreen0 with mdev
authorMarcin Juszkiewicz <hrw@koansoftware.com>
Fri, 9 Jan 2009 16:39:34 +0000 (17:39 +0100)
committerMarcin Juszkiewicz <hrw@koansoftware.com>
Fri, 16 Jan 2009 14:37:49 +0000 (15:37 +0100)
packages/busybox/busybox_1.13.2.bb
packages/busybox/files/find-touchscreen.sh [new file with mode: 0644]
packages/busybox/files/mdev.conf

index 740eee2..2172967 100644 (file)
@@ -1,11 +1,14 @@
 require busybox.inc
 
+PR = "r1"
+
 SRC_URI = "\
   http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
   \
   file://udhcpscript.patch;patch=1 \
   file://B921600.patch;patch=1 \
   file://mdev-fix.patch;patch=1 \
+  file://find-touchscreen.sh \
   file://busybox-cron \
   file://busybox-httpd \
   file://busybox-udhcpd \
@@ -30,6 +33,8 @@ do_configure () {
 do_install_append() {
     install -m 0644 ${WORKDIR}/mdev.conf ${D}${sysconfdir}/
     install -d ${D}${sysconfdir}/init.d/
+    install -d ${D}${sysconfdir}/mdev
+    install -m 0755 ${WORKDIR}/find-touchscreen.sh ${D}${sysconfdir}/mdev/
     install -m 0755 ${WORKDIR}/mdev ${D}${sysconfdir}/init.d/
 }
 
diff --git a/packages/busybox/files/find-touchscreen.sh b/packages/busybox/files/find-touchscreen.sh
new file mode 100644 (file)
index 0000000..34835e7
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+
+
+if [ `egrep "input:.*-e0.*,3,.*a0,1,.*18,.*" /sys/class/input/$MDEV/device/modalias|wc -l` -gt 0 ]; then
+       ln -sf /dev/input/$MDEV /dev/input/touchscreen0
+fi
index 1961949..c66e7bd 100644 (file)
@@ -1,32 +1,32 @@
-console 0:0 0600
-cpu_dma_latency 0:0 0660
-fb0:0 44 0660
-full 0:0 0666
-initctl 0:0 0600
-ircomm[0-9].* 0:20 0660
-kmem 0:15 0640
-kmsg 0:0 0660
-log 0:0 0666
-loop[0-9].* 0:6 0640
-mem 0:15 0640
-network_latency 0:0 0660
-network_throughput 0:0 0660
-null 0:0 0666
-port 0:15 0640
-ptmx 0:5 0666
-ram[0-9].* 0:6 0640
-random 0:0 0666
-sda 0:6 0640
-tty 0:5 0666
-tty.* 0:0 0620
-urandom 0:0 0666
-usbdev.* 0:0 0660
-vcs.* 0:5 0660
-zero 0:0 0666
+console 0:0 0600 
+cpu_dma_latency 0:0 0660 
+fb0:0 44 0660 
+full 0:0 0666 
+initctl 0:0 0600 
+ircomm[0-9].* 0:20 0660 
+kmem 0:15 0640 
+kmsg 0:0 0660 
+log 0:0 0666 
+loop[0-9].* 0:6 0640 
+mem 0:15 0640 
+network_latency 0:0 0660 
+network_throughput 0:0 0660 
+null 0:0 0666 
+port 0:15 0640 
+ptmx 0:5 0666 
+ram[0-9].* 0:6 0640 
+random 0:0 0666 
+sda 0:6 0640 
+tty 0:5 0666 
+tty.* 0:0 0620 
+urandom 0:0 0666 
+usbdev.* 0:0 0660 
+vcs.* 0:5 0660 
+zero 0:0 0666 
+pcm.* 0:0 0660 =snd/ 
+control.* 0:0 0660 =snd/ 
 
-pcm.* 0:0 0660 =snd/
-control.* 0:0 0660 =snd/
-
-event.* 0:0 0660 =input/
-mice 0:0 0660 =input/
+event.* 0:0 0660 =input/ @/etc/mdev/find-touchscreen.sh
+mice 0:0 0660 =input/ 
 mouse.* 0:0 0660 =input/