mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: ptxdist@pengutronix.de
Cc: Alexander Aring <alex.aring@gmail.com>
Subject: [ptxdist] [PATCH 3/4] kbd: rework and version bump 1.15.2 -> 2.0.1
Date: Sun, 15 Jun 2014 22:06:45 +0200	[thread overview]
Message-ID: <1402862806-7297-3-git-send-email-alex.aring@gmail.com> (raw)
In-Reply-To: <1402862806-7297-1-git-send-email-alex.aring@gmail.com>

This patch updated the kbd package to version 2.0.1 and add many new
tools option which are available to install.

Also add options to install consolefonts, consoletrans, keymaps, etc...

Add new patch for remove the building for tests which also check for
"check" which is not necessary.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
I didn't check if I can really change the font on a console interface.
Sorry!

 .../0001-getkeycode-show-reserved-scancode.patch   |  33 -----
 patches/kbd-1.15.2/series                          |   1 -
 ...configure-don-t-depend-on-check-for-tests.patch |  53 +++++++
 .../0002-getkeycode-show-reserved-scancode.patch   |  34 +++++
 patches/kbd-2.0.1/autogen.sh                       |   1 +
 patches/kbd-2.0.1/series                           |   2 +
 rules/kbd.in                                       | 153 +++++++++++++++++++--
 rules/kbd.make                                     |  90 ++++++++----
 8 files changed, 295 insertions(+), 72 deletions(-)
 delete mode 100644 patches/kbd-1.15.2/0001-getkeycode-show-reserved-scancode.patch
 delete mode 100644 patches/kbd-1.15.2/series
 create mode 100644 patches/kbd-2.0.1/0001-Makefile-configure-don-t-depend-on-check-for-tests.patch
 create mode 100644 patches/kbd-2.0.1/0002-getkeycode-show-reserved-scancode.patch
 create mode 120000 patches/kbd-2.0.1/autogen.sh
 create mode 100644 patches/kbd-2.0.1/series

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
deleted file mode 100644
index de0c9f8..0000000
--- a/patches/kbd-1.15.2/0001-getkeycode-show-reserved-scancode.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 3b6394ed6c8f26a4c59ce1446b40af9db6100f44 Mon Sep 17 00:00:00 2001
-From: Luotao Fu <l.fu@pengutronix.de>
-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 <l.fu@pengutronix.de>
----
- 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
deleted file mode 100644
index d6cc8bd..0000000
--- a/patches/kbd-1.15.2/series
+++ /dev/null
@@ -1 +0,0 @@
-0001-getkeycode-show-reserved-scancode.patch
diff --git a/patches/kbd-2.0.1/0001-Makefile-configure-don-t-depend-on-check-for-tests.patch b/patches/kbd-2.0.1/0001-Makefile-configure-don-t-depend-on-check-for-tests.patch
new file mode 100644
index 0000000..caefa5e
--- /dev/null
+++ b/patches/kbd-2.0.1/0001-Makefile-configure-don-t-depend-on-check-for-tests.patch
@@ -0,0 +1,53 @@
+From 6913deb7278f4f145e7deb8a6102dec843aeac0b Mon Sep 17 00:00:00 2001
+From: Alexander Aring <alex.aring@gmail.com>
+Date: Sun, 15 Jun 2014 15:48:20 +0200
+Subject: [PATCH 1/2] Makefile: configure: don't depend on check for tests
+
+This patch removes the dependency for check and removes the build of the tests
+environment.
+
+Signed-off-by: Alexander Aring <alex.aring@gmail.com>
+---
+ Makefile.am  | 2 +-
+ configure.ac | 5 +----
+ 2 files changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 89c7e83..beb6e29 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -8,7 +8,7 @@ EXTRA_DIST = \
+ 	CREDITS \
+ 	contrib docs rc
+ 
+-SUBDIRS = src data po tests docs
++SUBDIRS = src data po docs
+ 
+ kbd-$(VERSION).tar.xz:
+ 	make distcheck
+diff --git a/configure.ac b/configure.ac
+index 960cc07..fea8605 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -11,8 +11,6 @@ AM_INIT_AUTOMAKE([1.9 -Wall color-tests dist-xz])
+ AC_CONFIG_SRCDIR([src/loadkeys.c])
+ AC_CONFIG_HEADERS(config.h)
+ 
+-PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
+-
+ m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
+ AM_SILENT_RULES([yes])
+ 
+@@ -138,8 +136,7 @@ AC_CONFIG_FILES([Makefile
+ 		po/Makefile.in
+ 		src/Makefile
+ 		src/libkeymap/Makefile
+-		src/vlock/Makefile
+-		tests/Makefile])
++		src/vlock/Makefile])
+ AC_OUTPUT
+ 
+ AC_MSG_RESULT([
+-- 
+2.0.0
+
diff --git a/patches/kbd-2.0.1/0002-getkeycode-show-reserved-scancode.patch b/patches/kbd-2.0.1/0002-getkeycode-show-reserved-scancode.patch
new file mode 100644
index 0000000..2e12281
--- /dev/null
+++ b/patches/kbd-2.0.1/0002-getkeycode-show-reserved-scancode.patch
@@ -0,0 +1,34 @@
+From 75370786760aaf74b032e6ab518735eed97e6550 Mon Sep 17 00:00:00 2001
+From: Luotao Fu <l.fu@pengutronix.de>
+Date: Fri, 4 Jun 2010 10:36:42 +0200
+Subject: [PATCH 2/2] 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 <l.fu@pengutronix.de>
+Signed-off-by: Alexander Aring <alex.aring@gmail.com>
+---
+ src/getkeycodes.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/getkeycodes.c b/src/getkeycodes.c
+index d1fccf9..500fc5f 100644
+--- a/src/getkeycodes.c
++++ b/src/getkeycodes.c
+@@ -44,7 +44,7 @@ main(int argc, char **argv) {
+ 	if (ioctl(fd, KDGETKEYCODE, &a)) {
+ 		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)
+-- 
+2.0.0
+
diff --git a/patches/kbd-2.0.1/autogen.sh b/patches/kbd-2.0.1/autogen.sh
new file mode 120000
index 0000000..9f8a4cb
--- /dev/null
+++ b/patches/kbd-2.0.1/autogen.sh
@@ -0,0 +1 @@
+../autogen.sh
\ No newline at end of file
diff --git a/patches/kbd-2.0.1/series b/patches/kbd-2.0.1/series
new file mode 100644
index 0000000..c0a3247
--- /dev/null
+++ b/patches/kbd-2.0.1/series
@@ -0,0 +1,2 @@
+0001-Makefile-configure-don-t-depend-on-check-for-tests.patch
+0002-getkeycode-show-reserved-scancode.patch
diff --git a/rules/kbd.in b/rules/kbd.in
index ab35c8c..dbde1ba 100644
--- a/rules/kbd.in
+++ b/rules/kbd.in
@@ -7,19 +7,44 @@ menuconfig KBD
 	  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_CHVT
+	bool
+	prompt "chvt"
+	depends on !BUSYBOX_CHVT || ALLYES
+	help
+	  chvt - change foreground virtual terminal
+
+comment "BusyBox' chvt is selected!"
+	depends on BUSYBOX_CHVT
+
+config KBD_DEALLOCVT
+	bool
+	prompt "deallocvt"
+	depends on !BUSYBOX_DEALLOCVT || ALLYES
+	help
+	  deallocvt - deallocate unused virtual terminals
+
+comment "BusyBox' deallocvt is selected!"
+	depends on BUSYBOX_DEALLOCVT
+
 config KBD_DUMPKEYS
 	bool
 	prompt "dumpkeys"
 	help
 	  dumpkeys - dump keyboard translation tables
 
-config KBD_LOADKEYS
+config KBD_FGCONSOLE
 	bool
-	prompt "loadkeys"
+	prompt "fgconsole"
+	depends on !BUSYBOX_FGCONSOLE || ALLYES
 	help
-	  loadkeys - load keyboard translation tables
+	  print the number of the active VT
+
+comment "BusyBox' fgconsole is selected!"
+	depends on BUSYBOX_FGCONSOLE
 
 config KBD_GETKEYCODES
 	bool
@@ -27,6 +52,64 @@ config KBD_GETKEYCODES
 	help
 	  getkeycodes - print kernel scancode-to-keycode mapping table
 
+config KBD_KBDINFO
+	bool
+	prompt "kbdinfo"
+	help
+	  show kbd information
+
+config KBD_KBD_MODE
+	bool
+	prompt "kbd_mode"
+	help
+	  report or set the keyboard mode
+
+config KBD_KBDRATE
+	bool
+	prompt "kbdrate"
+	help
+	  reset the keyboard repeat rate and delay time
+
+config KBD_LOADKEYS
+	bool
+	prompt "loadkeys"
+	help
+	  loadkeys - load keyboard translation tables
+
+config KBD_LOADUNIMAP
+	bool
+	prompt "loadunimap"
+	help
+	  load the kernel unicode-to-font mapping table
+
+config KBD_MAPSCRN
+	bool
+	prompt "mapscrn"
+	help
+	  load screen output mapping table
+
+config KBD_OPENVT
+	bool
+	prompt "openvt"
+	depends on !BUSYBOX_OPENVT || ALLYES
+	help
+	  start a program on a new virtual terminal (VT)
+
+comment "BusyBox' openvt is selected!"
+	depends on BUSYBOX_OPENVT
+
+config KBD_PSFXTABLE
+	bool
+	prompt "psfxtable"
+	help
+	  handle Unicode character tables for console fonts
+
+config KBD_SETFONT
+	bool
+	prompt "setfont"
+	help
+	  load EGA/VGA console screen font
+
 config KBD_SETKEYCODES
 	bool
 	prompt "setkeycodes"
@@ -37,6 +120,30 @@ config KBD_SETKEYCODES
 comment "BusyBox' setkeycodes is selected!"
 	depends on BUSYBOX_SETKEYCODES
 
+config KBD_SETLEDS
+	bool
+	prompt "setleds"
+	help
+	  set the keyboard leds
+
+config KBD_SETMETAMODE
+	bool
+	prompt "setmetamode"
+	help
+	  define the keyboard meta key handling
+
+config KBD_SETVTRGB
+	bool
+	prompt "setvtrgb"
+	help
+	  set the virtual terminal RGB colors
+
+config KBD_SHOWCONSOLEFONT
+	bool
+	prompt "showconsolefont"
+	help
+	  Show the current EGA/VGA console screen font
+
 config KBD_SHOWKEY
 	bool
 	prompt "showkey"
@@ -47,24 +154,40 @@ config KBD_SHOWKEY
 comment "BusyBox' showkey is selected!"
 	depends on BUSYBOX_SHOWKEY
 
-config KBD_CHVT
+config KBD_UNICODE_START
 	bool
-	prompt "chvt"
-	depends on !BUSYBOX_CHVT || ALLYES
+	prompt "unicode_start"
 	help
-	  chvt - change foreground virtual terminal
+	  put keyboard and console in unicode mode
 
-comment "BusyBox' chvt is selected!"
-	depends on BUSYBOX_CHVT
+config KBD_UNICODE_STOP
+	bool
+	prompt "unicode_stop"
+	help
+	  revert keyboard and console from unicode mode
 
-config KBD_DEALLOCVT
+config KBD_CONSOLEFONTS
 	bool
-	prompt "deallocvt"
-	depends on !BUSYBOX_DEALLOCVT || ALLYES
+	prompt "install consolefonts"
 	help
-	  deallocvt - deallocate unused virtual terminals
+	  install consolefonts to /usr/share/consolefonts
 
-comment "BusyBox' deallocvt is selected!"
-	depends on BUSYBOX_DEALLOCVT
+config KBD_CONSOLETRANS
+	bool
+	prompt "install consoletrans"
+	help
+	  install consoletrans to /usr/share/consoletrans
+
+config KBD_KEYMAPS
+	bool
+	prompt "install keymaps"
+	help
+	  install keymaps to /usr/share/keymaps
+
+config KBD_UNIMAPS
+	bool
+	prompt "install unimaps"
+	help
+	  install unimaps to /usr/share/unimaps
 
 endif
diff --git a/rules/kbd.make b/rules/kbd.make
index 9c51e04..8f28aca 100644
--- a/rules/kbd.make
+++ b/rules/kbd.make
@@ -16,10 +16,10 @@ PACKAGES-$(PTXCONF_KBD) += kbd
 #
 # Paths and names
 #
-KBD_VERSION	:= 1.15.2
-KBD_MD5		:= e850eb91e4d3b94b194efe8e953204c5
+KBD_VERSION	:= 2.0.1
+KBD_MD5		:= e9f2b7046312c11cec9e52e22f307b6a
 KBD		:= kbd-$(KBD_VERSION)
-KBD_SUFFIX	:= tar.bz2
+KBD_SUFFIX	:= tar.gz
 KBD_URL		:= $(call ptx/mirror, KERNEL, utils/kbd/$(KBD).$(KBD_SUFFIX))
 KBD_SOURCE	:= $(SRCDIR)/$(KBD).$(KBD_SUFFIX)
 KBD_DIR		:= $(BUILDDIR)/$(KBD)
@@ -32,16 +32,41 @@ KBD_LICENSE	:= GPLv2+
 #
 # autoconf
 #
-KBD_CONF_TOOL	:= autoconf
-KBD_CONF_OPT	:= \
+KBD_CONF_OPT := \
 	$(CROSS_AUTOCONF_USR) \
 	--disable-nls \
 	--disable-rpath \
-	--disable-klibc \
-	--disable-klibc-layout \
+	--disable-optional-progs \
+	--disable-libkeymap \
+	--disable-vlock \
 	--without-libiconv-prefix \
 	--without-libintl-prefix
 
+
+KBD_TOOLS-y					:=
+KBD_TOOLS-$(PTXCONF_KBD_CHVT)			+= chvt
+KBD_TOOLS-$(PTXCONF_KBD_DEALLOCVT)		+= deallocvt
+KBD_TOOLS-$(PTXCONF_KBD_DUMPKEYS)		+= dumpkeys
+KBD_TOOLS-$(PTXCONF_KBD_FGCONSOLE)		+= fgconsole
+KBD_TOOLS-$(PTXCONF_KBD_GETKEYCODES)		+= getkeycodes
+KBD_TOOLS-$(PTXCONF_KBD_KBDINFO)		+= kbdinfo
+KBD_TOOLS-$(PTXCONF_KBD_KBD_MODE)		+= kbd_mode
+KBD_TOOLS-$(PTXCONF_KBD_KBDRATE)		+= kbdrate
+KBD_TOOLS-$(PTXCONF_KBD_LOADKEYS)		+= loadkeys
+KBD_TOOLS-$(PTXCONF_KBD_LOADUNIMAP)		+= loadunimap
+KBD_TOOLS-$(PTXCONF_KBD_MAPSCRN)		+= mapscrn
+KBD_TOOLS-$(PTXCONF_KBD_OPENVT)			+= openvt
+KBD_TOOLS-$(PTXCONF_KBD_PSFXTABLE)		+= psfxtable
+KBD_TOOLS-$(PTXCONF_KBD_SETFONT)		+= setfont
+KBD_TOOLS-$(PTXCONF_KBD_SETKEYCODES)		+= setkeycodes
+KBD_TOOLS-$(PTXCONF_KBD_SETLEDS)		+= setleds
+KBD_TOOLS-$(PTXCONF_KBD_SETMETAMODE)		+= setmetamode
+KBD_TOOLS-$(PTXCONF_KBD_SETVTRGB)		+= setvtrgb
+KBD_TOOLS-$(PTXCONF_KBD_SHOWCONSOLEFONT)	+= showconsolefont
+KBD_TOOLS-$(PTXCONF_KBD_SHOWKEY)		+= showkey
+KBD_TOOLS-$(PTXCONF_KBD_UNICODE_START)		+= unicode_start
+KBD_TOOLS-$(PTXCONF_KBD_UNICODE_STOP)		+= unicode_stop
+
 # ----------------------------------------------------------------------------
 # Target-Install
 # ----------------------------------------------------------------------------
@@ -55,32 +80,51 @@ $(STATEDIR)/kbd.targetinstall:
 	@$(call install_fixup, kbd,AUTHOR,"Luotao Fu <l.fu@pengutronix.de>")
 	@$(call install_fixup, kbd,DESCRIPTION,missing)
 
-ifdef PTXCONF_KBD_DUMPKEYS
-	@$(call install_copy, kbd, 0, 0, 0755, -, /usr/bin/dumpkeys)
-endif
+	@$(foreach tool,$(KBD_TOOLS-y), \
+		$(call install_copy, kbd, 0, 0, 0755, -, \
+		/usr/bin/$(tool));)
 
-ifdef PTXCONF_KBD_LOADKEYS
-	@$(call install_copy, kbd, 0, 0, 0755, -, /usr/bin/loadkeys)
+ifdef PTXCONF_KBD_PSFXTABLE
+	@$(call install_link, kbd, psfxtable, /usr/bin/psfaddtable)
+	@$(call install_link, kbd, psfxtable, /usr/bin/psfgettable)
+	@$(call install_link, kbd, psfxtable, /usr/bin/psfstriptable)
 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)
+ifdef PTXCONF_KBD_CONSOLEFONTS
+	@cd $(KBD_PKGDIR)/usr/share/consolefonts; \
+	find . -type f | while read file; do \
+                $(call install_copy, kbd, 0, 0, 0644, -, \
+                        /usr/share/consolefonts/$$file); \
+        done
 endif
 
-ifdef PTXCONF_KBD_SHOWKEY
-	@$(call install_copy, kbd, 0, 0, 0755, -, /usr/bin/showkey)
+ifdef PTXCONF_KBD_CONSOLETRANS
+	@cd $(KBD_PKGDIR)/usr/share/consoletrans; \
+	find . -type f | while read file; do \
+                $(call install_copy, kbd, 0, 0, 0644, -, \
+                        /usr/share/consoletrans/$$file); \
+        done
 endif
 
-ifdef PTXCONF_KBD_CHVT
-	@$(call install_copy, kbd, 0, 0, 0755, -, /usr/bin/chvt)
+ifdef PTXCONF_KBD_KEYMAPS
+	@cd $(KBD_PKGDIR)/usr/share/keymaps; \
+	find . -type f | while read file; do \
+                $(call install_copy, kbd, 0, 0, 0644, -, \
+                        /usr/share/keymaps/$$file); \
+        done
+
+	@$(call install_link, kbd, mac, ppc)
 endif
 
-ifdef PTXCONF_KBD_DEALLOCVT
-	@$(call install_copy, kbd, 0, 0, 0755, -, /usr/bin/deallocvt)
+ifdef PTXCONF_KBD_UNIMAPS
+	@cd $(KBD_PKGDIR)/usr/share/unimaps; \
+	find . -type f | while read file; do \
+                $(call install_copy, kbd, 0, 0, 0644, -, \
+                        /usr/share/unimaps/$$file); \
+        done
+
+	@$(call install_link, kbd, mac, ppc)
 endif
 
 	@$(call install_finish, kbd)
-- 
2.0.0


-- 
ptxdist mailing list
ptxdist@pengutronix.de

  parent reply	other threads:[~2014-06-15 20:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-15 20:06 [ptxdist] [PATCH 1/4] libusb: fix libusbx to libusb prompt Alexander Aring
2014-06-15 20:06 ` [ptxdist] [PATCH 2/4] protobuf: version bump 2.4.1 -> 2.5.0 Alexander Aring
2014-06-16 19:01   ` Michael Olbrich
2014-06-15 20:06 ` Alexander Aring [this message]
2014-06-15 20:51   ` [ptxdist] [PATCH 3/4] kbd: rework and version bump 1.15.2 -> 2.0.1 Alexander Aring
2014-06-16 18:22   ` Michael Olbrich
2014-06-16 19:03     ` Alexander Aring
2014-06-16 19:15       ` Michael Olbrich
2014-06-15 20:06 ` [ptxdist] [PATCH 4/4] cmatrix: add new package Alexander Aring
2014-06-16 18:47   ` Michael Olbrich
2014-06-16 19:06     ` Alexander Aring
2014-06-16 19:00 ` [ptxdist] [PATCH 1/4] libusb: fix libusbx to libusb prompt Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1402862806-7297-3-git-send-email-alex.aring@gmail.com \
    --to=alex.aring@gmail.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox