[OE-core] [PATCH 1/1] Limit the kbdrate application to x86, mips and sparc.

jackie.huang at windriver.com jackie.huang at windriver.com
Mon Jun 24 06:27:58 UTC 2013


From: Jackie Huang <jackie.huang at windriver.com>

The code relies on hardware specific memory locations to access
and modify the keyboard repeat rate.  It also requires read/write
access to /dev/port which doesn't exist on every architecture's
root fs.  The defect was raised for Qemu PowerPC but it also fails on
ARM.  The keyboard emulation in qemuppc is for an ADB (Apple Desktop Bus)
device and not compatible with an Intel driver.  There's also no
indication in the documentation that the code should work on
anything other than Intel architecture but it also works on MIPS.

Signed-off-by: Dennis Hall <dennis.hall at windriver.com>
Signed-off-by: Jackie Huang <jackie.huang at windriver.com>
---
 .../0001-Limit-kbdrate-to-x86-mips-and-sparc.patch |   48 ++++++++++++++++++++
 meta/recipes-core/kbd/kbd_1.15.2.bb                |    6 ++-
 2 files changed, 52 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-core/kbd/files/0001-Limit-kbdrate-to-x86-mips-and-sparc.patch

diff --git a/meta/recipes-core/kbd/files/0001-Limit-kbdrate-to-x86-mips-and-sparc.patch b/meta/recipes-core/kbd/files/0001-Limit-kbdrate-to-x86-mips-and-sparc.patch
new file mode 100644
index 0000000..0283202
--- /dev/null
+++ b/meta/recipes-core/kbd/files/0001-Limit-kbdrate-to-x86-mips-and-sparc.patch
@@ -0,0 +1,48 @@
+From 4a679f16a3728a9323d23a8466d22a984a58c7af Mon Sep 17 00:00:00 2001
+From: Dennis Hall <dennis.hall at windriver.com>
+Date: Fri, 31 Aug 2012 10:15:13 -0400
+Subject: [PATCH] Limit kbdrate to x86, mips and sparc.
+
+Upstream-Status: Pending
+
+The application will exit with an error if it runs on any other architecture.
+
+The code relies on hardware specific memory locations to access
+and modify the keyboard repeat rate.  It also requires read/write
+access to /dev/port which doesn't exist on every architecture's
+root fs.  The CQ was raised for Qemu PowerPC but it also fails on
+ARM.  The keyboard emulation in qemuppc is for an ADB (Apple Desktop Bus)
+device and not compatible with an Intel driver.  There's also no
+indication in the documentation that the code should work on
+anything other than Intel architecture but it also works on MIPS32.
+MIPS64 is not supported at this time so it was not tested.
+
+Signed-off-by: Dennis Hall <dennis.hall at windriver.com>
+---
+ src/kbdrate.c |   10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+diff --git a/src/kbdrate.c b/src/kbdrate.c
+index 95ff723..9a79774 100644
+--- a/src/kbdrate.c
++++ b/src/kbdrate.c
+@@ -241,6 +241,16 @@ main( int argc, char **argv ) {
+ 	unsigned int i;
+ 	extern char *optarg;
+
++#if !(  defined(__i386__)   \
++     || defined(__x86_64__) \
++     || defined(__mips__)   \
++     || defined(__sparc___))
++
++	fprintf(stderr,
++		"ERROR:  %s should only be used on MIPS, x86 and Sparc archicture boards\n", basename(argv[0]));
++        exit(1);
++#endif
++ 	set_progname(argv[0]);
+ 	set_progname(argv[0]);
+
+ 	setlocale(LC_ALL, "");
+--
+1.7.1
+
diff --git a/meta/recipes-core/kbd/kbd_1.15.2.bb b/meta/recipes-core/kbd/kbd_1.15.2.bb
index 79ea468..2fddf0a 100644
--- a/meta/recipes-core/kbd/kbd_1.15.2.bb
+++ b/meta/recipes-core/kbd/kbd_1.15.2.bb
@@ -10,9 +10,11 @@ RREPLACES_${PN} = "console-tools"
 RPROVIDES_${PN} = "console-tools"
 RCONFLICTS_${PN} = "console-tools"
 
-PR = "r4"
+PR = "r5"
 
-SRC_URI="${KERNELORG_MIRROR}/linux/utils/kbd/kbd-1.15.2.tar.bz2"
+SRC_URI="${KERNELORG_MIRROR}/linux/utils/kbd/kbd-1.15.2.tar.bz2 \
+         file://0001-Limit-kbdrate-to-x86-mips-and-sparc.patch \
+"
 SRC_URI[md5sum] = "e850eb91e4d3b94b194efe8e953204c5"
 SRC_URI[sha256sum] = "b3602d191eef7a6a8317fc3cd231efa40a89ac235dce57a77cac825a2a21eba6"
 
-- 
1.7.4.1




More information about the Openembedded-core mailing list