[udev/f14] Update OLPC XO keymap

Daniel Drake dsd at fedoraproject.org
Mon Aug 29 14:26:59 UTC 2011


commit ec910abb26fb7cf77518cbb6d0731086d6806047
Author: Daniel Drake <dsd at laptop.org>
Date:   Mon Aug 29 09:10:39 2011 +0100

    Update OLPC XO keymap
    
    and fix compile with new headers

 udev-olpc-keymap-update.patch |   65 +++++++++++++++++++++++++++++++++++++++++
 udev-v4l-compile-fix.patch    |   45 ++++++++++++++++++++++++++++
 udev-v4l-compile-fix2.patch   |   24 +++++++++++++++
 udev.spec                     |   13 +++++++-
 4 files changed, 146 insertions(+), 1 deletions(-)
---
diff --git a/udev-olpc-keymap-update.patch b/udev-olpc-keymap-update.patch
new file mode 100644
index 0000000..f1bbecf
--- /dev/null
+++ b/udev-olpc-keymap-update.patch
@@ -0,0 +1,65 @@
+From 00fc377e7a6b1997db346c8de51cbf05cad48376 Mon Sep 17 00:00:00 2001
+From: Paul Fox <pgf at laptop.org>
+Date: Mon, 22 Aug 2011 06:39:06 +0200
+Subject: [PATCH] keymap: update the OLPC keymap for correct function key
+ behavior
+
+New mappings were needed when the mechanical keyboard was
+introduced, and GNOME was made a peer to the sugar desktop.
+see http://lists.laptop.org/pipermail/devel/2010-July/029384.html
+---
+ extras/keymap/keymaps/olpc-xo |   38 ++++++++++++++++++++++++++------------
+ 1 files changed, 26 insertions(+), 12 deletions(-)
+
+diff --git a/extras/keymap/keymaps/olpc-xo b/extras/keymap/keymaps/olpc-xo
+index 7fe0662..34434a1 100644
+--- a/extras/keymap/keymaps/olpc-xo
++++ b/extras/keymap/keymaps/olpc-xo
+@@ -2,18 +2,32 @@
+ 0x81 fn_esc
+ 0xF9 camera
+ 0xF8 sound # Fn-CAMERA = Mic
+-0xBB fn_f1
+-0xBC fn_f2
+-0xBD fn_f3
+-0xBE fn_f4
+-0xBF fn_f5
+-0xC0 fn_f6
+-0xC1 fn_f7
+-0xC2 fn_f8
+-0xC3 fn_f9
+-0xC4 fn_f10
+-0xD7 fn_f11
+-0xD8 fn_f12
++
++
++# Function key mappings, as per
++#    http://dev.laptop.org/ticket/10213#comment:20
++#
++# Unmodified F1-F8 produce F1-F8, so no remap necessary.
++# Unmodified F9-F12 control brightness and volume.
++0x43 brightnessdown
++0x44 brightnessup
++0x57 volumedown
++0x58 volumeup
++
++# fn-modified fkeys all produce the unmodified version of the key.
++0xBB f1
++0xBC f2
++0xBD f3
++0xBE f4
++0xBF f5
++0xC0 f6
++0xC1 f7
++0xC2 f8
++0xC3 f9
++0xC4 f10
++0xD7 f11
++0xD8 f12
++
+ 
+ # Using F13-F21 for the .5 F keys right now.
+ 0xF7 f13
+-- 
+1.7.4.4
+
diff --git a/udev-v4l-compile-fix.patch b/udev-v4l-compile-fix.patch
new file mode 100644
index 0000000..17b9876
--- /dev/null
+++ b/udev-v4l-compile-fix.patch
@@ -0,0 +1,45 @@
+From 4ace8a43ac2cbbd4d6f5c29fc461c3caa8f8545b Mon Sep 17 00:00:00 2001
+From: Kay Sievers <kay.sievers at vrfy.org>
+Date: Tue, 15 Feb 2011 17:24:32 +0100
+Subject: [PATCH] v4l_id: kill the v4l1 ioctl
+
+Recent kernels do not have v4l1 anymore.
+---
+ extras/v4l_id/v4l_id.c |   14 --------------
+ 1 files changed, 0 insertions(+), 14 deletions(-)
+
+diff --git a/extras/v4l_id/v4l_id.c b/extras/v4l_id/v4l_id.c
+index d530a6d..f3fc648 100644
+--- a/extras/v4l_id/v4l_id.c
++++ b/extras/v4l_id/v4l_id.c
+@@ -28,7 +28,6 @@
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <sys/ioctl.h>
+-#include <linux/videodev.h>
+ #include <linux/videodev2.h>
+ 
+ int main (int argc, char *argv[])
+@@ -82,19 +81,6 @@ int main (int argc, char *argv[])
+ 		if ((v2cap.capabilities & V4L2_CAP_RADIO) > 0)
+ 			printf("radio:");
+ 		printf("\n");
+-	} else if (ioctl (fd, VIDIOCGCAP, &v1cap) == 0) {
+-		printf("ID_V4L_VERSION=1\n");
+-		printf("ID_V4L_PRODUCT=%s\n", v1cap.name);
+-		printf("ID_V4L_CAPABILITIES=:");
+-		if ((v1cap.type & VID_TYPE_CAPTURE) > 0)
+-			printf("capture:");
+-		if ((v1cap.type & VID_TYPE_OVERLAY) > 0)
+-			printf("video_overlay:");
+-		if (v1cap.audios > 0)
+-			printf("audio:");
+-		if ((v1cap.type & VID_TYPE_TUNER) > 0)
+-			printf("tuner:");
+-		printf("\n");
+ 	}
+ 
+ 	close (fd);
+-- 
+1.7.4.4
+
diff --git a/udev-v4l-compile-fix2.patch b/udev-v4l-compile-fix2.patch
new file mode 100644
index 0000000..57769bb
--- /dev/null
+++ b/udev-v4l-compile-fix2.patch
@@ -0,0 +1,24 @@
+From 89284ddac413d376fc3b56f742daaf1b9bc85bba Mon Sep 17 00:00:00 2001
+From: Kay Sievers <kay.sievers at vrfy.org>
+Date: Tue, 15 Feb 2011 17:27:29 +0100
+Subject: [PATCH] v4l_id: remove left-over variable
+
+---
+ extras/v4l_id/v4l_id.c |    1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+diff --git a/extras/v4l_id/v4l_id.c b/extras/v4l_id/v4l_id.c
+index f3fc648..21cb328 100644
+--- a/extras/v4l_id/v4l_id.c
++++ b/extras/v4l_id/v4l_id.c
+@@ -38,7 +38,6 @@ int main (int argc, char *argv[])
+ 	};
+ 	int fd;
+ 	char *device;
+-	struct video_capability v1cap;
+ 	struct v4l2_capability v2cap;
+ 
+ 	while (1) {
+-- 
+1.7.4.4
+
diff --git a/udev.spec b/udev.spec
index 3ad3b72..f239c80 100644
--- a/udev.spec
+++ b/udev.spec
@@ -7,7 +7,7 @@
 Summary: A rule-based device node and kernel event manager
 Name: udev
 Version: 161
-Release: 9%{?dist}
+Release: 10%{?dist}
 License: GPLv2+
 Group: System Environment/Base
 Provides: udev-persistent = %{version}-%{release}
@@ -53,6 +53,10 @@ Patch1001: udev-pda-acl.patch
 Patch1002: udev-5e199245f2d2fd03c2586a7f1140300b073a4abe.patch
 Patch1003: udev-98ab6a377285d5943563cfa397e8b350e43878ec.patch
 
+Patch1004: udev-olpc-keymap-update.patch
+Patch1005: udev-v4l-compile-fix.patch
+Patch1006: udev-v4l-compile-fix2.patch
+
 ExclusiveOS: Linux
 URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -183,6 +187,9 @@ glib-based applications using libudev functionality.
 %patch1001 -p1 -b .pda
 %patch1002 -p1 
 %patch1003 -p1 
+%patch1004 -p1
+%patch1005 -p1
+%patch1006 -p1
 
 %build
 libtoolize -f -c
@@ -423,6 +430,10 @@ rm -rf $RPM_BUILD_ROOT
 %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0*
 
 %changelog
+* Mon Aug 29 2011 Daniel Drake <dsd at laptop.org> 161-10
+- Update OLPC XO keymap
+- Fix compilation on new linux-headers
+
 * Wed Mar 23 2011 Harald Hoyer <harald at redhat.com> 161-9
 - add ACLs for harmony remote controls
 Resolves: rhbz#559412


More information about the scm-commits mailing list