From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ptx.hi.pengutronix.de ([2001:6f8:1178:2:5054:ff:fec0:8e10] ident=Debian-exim) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1Wx27F-0000lq-Pn for ptxdist@pengutronix.de; Wed, 18 Jun 2014 00:44:33 +0200 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.80) (envelope-from ) id 1Wx27F-0002Je-OP for ptxdist@pengutronix.de; Wed, 18 Jun 2014 00:44:33 +0200 Date: Wed, 18 Jun 2014 00:44:33 +0200 From: Michael Olbrich Message-ID: <20140617224433.GD7035@pengutronix.de> References: <1403021601-8244-1-git-send-email-alex.aring@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1403021601-8244-1-git-send-email-alex.aring@gmail.com> Subject: Re: [ptxdist] [PATCH v4 1/4] kbd: rework and version bump 1.15.2 -> 2.0.1 Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de On Tue, Jun 17, 2014 at 06:13:18PM +0200, Alexander Aring wrote: > 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. Thanks, all 4 patches applied. Michael > > Signed-off-by: Alexander Aring > --- > Changes since v4: > - fix patch subject issues > \-> the author deleted one of his scripts and will use git format-patch arguments > > changes since v3: > - really fix whitespace issues with right intend > > Changes since v2: > - use absoulte path in install_link > - remove wrong install_link call > - fix whitespace issue > - remove the removal of tests/Makefile in patch 0001 > - use && after change directory > > .../0001-getkeycode-show-reserved-scancode.patch | 33 ----- > patches/kbd-1.15.2/series | 1 - > ...configure-don-t-depend-on-check-for-tests.patch | 43 ++++++ > .../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 | 87 ++++++++---- > 8 files changed, 282 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 > -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 > ---- > - 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..40b695c > --- /dev/null > +++ b/patches/kbd-2.0.1/0001-Makefile-configure-don-t-depend-on-check-for-tests.patch > @@ -0,0 +1,43 @@ > +From 8768291208c4a11139efd2c4ae7bf139a2032998 Mon Sep 17 00:00:00 2001 > +From: Alexander Aring > +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 > +--- > + Makefile.am | 2 +- > + configure.ac | 2 -- > + 2 files changed, 1 insertion(+), 3 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..b9879ad 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]) > + > +-- > +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..3ee283a > --- /dev/null > +++ b/patches/kbd-2.0.1/0002-getkeycode-show-reserved-scancode.patch > @@ -0,0 +1,34 @@ > +From fea29f0fe8cb8e097d64b4b1152038d6c2ffa028 Mon Sep 17 00:00:00 2001 > +From: Luotao Fu > +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 > +Signed-off-by: Alexander Aring > +--- > + 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..59ce326 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,48 @@ $(STATEDIR)/kbd.targetinstall: > @$(call install_fixup, kbd,AUTHOR,"Luotao Fu ") > @$(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) > +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_SETKEYCODES > - @$(call install_copy, kbd, 0, 0, 0755, -, /usr/bin/setkeycodes) > +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_SHOWKEY > - @$(call install_copy, kbd, 0, 0, 0755, -, /usr/bin/showkey) > -endif > +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 > > -ifdef PTXCONF_KBD_CHVT > - @$(call install_copy, kbd, 0, 0, 0755, -, /usr/bin/chvt) > + @$(call install_link, kbd, mac, /usr/share/keymaps/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 > endif > > @$(call install_finish, kbd) > -- > 2.0.0 > > > -- > ptxdist mailing list > ptxdist@pengutronix.de > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list ptxdist@pengutronix.de