This one adds the kbd package, which contains keytable files and keyboard utilities. Currently only the installation for some basic utillities is activated. Stuffs like consolefonts, ready to use keymaps etc. are mostly not really useful for embedded devices, hence no target install options. If some one does need them -> send patches. :-)
Signed-off-by: Luotao Fu <[email protected]> --- .../0001-getkeycode-show-reserved-scancode.patch | 33 ++++++ patches/kbd-1.15.2/series | 1 + rules/kbd.in | 54 ++++++++++ rules/kbd.make | 108 ++++++++++++++++++++ 4 files changed, 196 insertions(+), 0 deletions(-) create mode 100644 patches/kbd-1.15.2/0001-getkeycode-show-reserved-scancode.patch create mode 100644 patches/kbd-1.15.2/series create mode 100644 rules/kbd.in create mode 100644 rules/kbd.make diff --git a/patches/kbd-1.15.2/0001-getkeycode-show-reserved-scancode.patch b/patches/kbd-1.15.2/0001-getkeycode-show-reserved-scancode.patch new file mode 100644 index 0000000..de0c9f8 --- /dev/null +++ b/patches/kbd-1.15.2/0001-getkeycode-show-reserved-scancode.patch @@ -0,0 +1,33 @@ +From 3b6394ed6c8f26a4c59ce1446b40af9db6100f44 Mon Sep 17 00:00:00 2001 +From: Luotao Fu <[email protected]> +Date: Fri, 4 Jun 2010 10:36:42 +0200 +Subject: [PATCH] getkeycode: show reserved scancode + +The scancode 0 is usually reserved. Hence the getkeycodes starts scanning at 1. +However, the scancode can still be used in some special cases, e.g. for a matrix +keypad with board specific combination of keycodes and scancodes. This one +change the scan range to start from 0. + +probably not for mainline, as far kdb is maintained et all. + +Signed-off-by: Luotao Fu <[email protected]> +--- + src/getkeycodes.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/getkeycodes.c b/src/getkeycodes.c +index 6504e7e..2ea5298 100644 +--- a/src/getkeycodes.c ++++ b/src/getkeycodes.c +@@ -47,7 +47,7 @@ main(int argc, char **argv) { + old_kernel = 1; + sc0 = 89; + } else +- for (sc0 = 1; sc0 <= 88; sc0++) { ++ for (sc0 = 0; sc0 <= 88; sc0++) { + a.scancode = sc0; + a.keycode = 0; + if (ioctl(fd, KDGETKEYCODE, &a) || a.keycode != sc0) +-- +1.7.1 + diff --git a/patches/kbd-1.15.2/series b/patches/kbd-1.15.2/series new file mode 100644 index 0000000..d6cc8bd --- /dev/null +++ b/patches/kbd-1.15.2/series @@ -0,0 +1 @@ +0001-getkeycode-show-reserved-scancode.patch diff --git a/rules/kbd.in b/rules/kbd.in new file mode 100644 index 0000000..9a552be --- /dev/null +++ b/rules/kbd.in @@ -0,0 +1,54 @@ +## SECTION=shell_and_console + +menuconfig KBD + tristate + prompt "kbd" + help + The kbd package contains keytable files and keyboard utilities + compatible with kernel version 1.1.54 and later. Setfont requires + 1.1.92 or later. +if KBD + +config KBD_DUMPKEYS + bool + prompt "dumpkeys" + help + dumpkeys - dump keyboard translation tables + +config KBD_LOADKEYS + bool + prompt "loadkeys" + help + loadkeys - load keyboard translation tables + +config KBD_GETKEYCODES + bool + prompt "getkeycodes" + help + getkeycodes - print kernel scancode-to-keycode mapping table + +config KBD_SETKEYCODES + bool + prompt "setkeycodes" + help + setkeycodes - load kernel scancode-to-keycode mapping table entries + +config KBD_SHOWKEY + bool + prompt "showkey" + help + showkey - examine the scan codes and keycodes sent by the keyboard + +config KBD_CHVT + bool + prompt "chvt" + help + chvt - change foreground virtual terminal + +config KBD_DEALLOCVT + bool + prompt "deallocvt" + help + deallocvt - deallocate unused virtual terminals + +endif diff --git a/rules/kbd.make b/rules/kbd.make new file mode 100644 index 0000000..88e66d6 --- /dev/null +++ b/rules/kbd.make @@ -0,0 +1,108 @@ +# -*-makefile-*- +# +# Copyright (C) 2010 by Luotao Fu <[email protected]> +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_KBD) += kbd + +# +# Paths and names +# +KBD_VERSION := 1.15.2 +KBD := kbd-$(KBD_VERSION) +KBD_SUFFIX := tar.bz2 +KBD_URL := ftp://ftp.kernel.org/pub/linux/utils/kbd//$(KBD).$(KBD_SUFFIX) +KBD_SOURCE := $(SRCDIR)/$(KBD).$(KBD_SUFFIX) +KBD_DIR := $(BUILDDIR)/$(KBD) +KBD_LICENSE := unknown + +# ---------------------------------------------------------------------------- +# Get +# ---------------------------------------------------------------------------- + +$(KBD_SOURCE): + @$(call targetinfo) + @$(call get, KBD) + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +# +# autoconf +# +KBD_CONF_TOOL := autoconf +KBD_CONF_OPT := \ + $(CROSS_AUTOCONF_USR) \ + --disable-nls \ + --disable-rpath \ + --disable-klibc \ + --disable-klibc-layout \ + --without-libiconv-prefix \ + --without-libintl-prefix + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/kbd.targetinstall: + @$(call targetinfo) + + @$(call install_init, kbd) + @$(call install_fixup, kbd,PACKAGE,kbd) + @$(call install_fixup, kbd,PRIORITY,optional) + @$(call install_fixup, kbd,VERSION,$(KBD_VERSION)) + @$(call install_fixup, kbd,SECTION,base) + @$(call install_fixup, kbd,AUTHOR,"Luotao Fu <[email protected]>") + @$(call install_fixup, kbd,DEPENDS,) + @$(call install_fixup, kbd,DESCRIPTION,missing) + +ifdef PTXCONF_KBD_DUMPKEYS + @$(call install_copy, kbd, 0, 0, 0755, -, /usr/bin/dumpkeys) +endif + +ifdef PTXCONF_KBD_LOADKEYS + @$(call install_copy, kbd, 0, 0, 0755, -, /usr/bin/loadkeys) +endif + +ifdef PTXCONF_KBD_GETKEYCODES + @$(call install_copy, kbd, 0, 0, 0755, -, /usr/bin/getkeycodes) +endif + +ifdef PTXCONF_KBD_SETKEYCODES + @$(call install_copy, kbd, 0, 0, 0755, -, /usr/bin/setkeycodes) +endif + +ifdef PTXCONF_KBD_SHOWKEY + @$(call install_copy, kbd, 0, 0, 0755, -, /usr/bin/showkey) +endif + +ifdef PTXCONF_KBD_CHVT + @$(call install_copy, kbd, 0, 0, 0755, -, /usr/bin/chvt) +endif + +ifdef PTXCONF_KBD_DEALLOCVT + @$(call install_copy, kbd, 0, 0, 0755, -, /usr/bin/deallocvt) +endif + + @$(call install_finish, kbd) + + @$(call touch) + +# ---------------------------------------------------------------------------- +# Clean +# ---------------------------------------------------------------------------- + +#$(STATEDIR)/kbd.clean: +# @$(call targetinfo) +# @$(call clean_pkg, KBD) + +# vim: syntax=make -- 1.7.1 -- ptxdist mailing list [email protected]
