From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-wg0-x22d.google.com ([2a00:1450:400c:c00::22d]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1WwcC7-0004P8-05 for ptxdist@pengutronix.de; Mon, 16 Jun 2014 21:03:53 +0200 Received: by mail-wg0-f45.google.com with SMTP id l18so5971995wgh.28 for ; Mon, 16 Jun 2014 12:03:45 -0700 (PDT) Received: from omega (p20030064A94744D2E2CB4EFFFE1BB546.dip0.t-ipconnect.de. [2003:64:a947:44d2:e2cb:4eff:fe1b:b546]) by mx.google.com with ESMTPSA id s3sm19911146wje.36.2014.06.16.12.03.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Jun 2014 12:03:44 -0700 (PDT) Date: Mon, 16 Jun 2014 21:03:43 +0200 From: Alexander Aring Message-ID: <20140616190340.GB30538@omega> References: <1402862806-7297-1-git-send-email-alex.aring@gmail.com> <1402862806-7297-3-git-send-email-alex.aring@gmail.com> <20140616182238.GA14975@localhost> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140616182238.GA14975@localhost> Subject: Re: [ptxdist] [PATCH 3/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 Mon, Jun 16, 2014 at 08:22:38PM +0200, Michael Olbrich wrote: > On Sun, Jun 15, 2014 at 10:06:45PM +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. > > > > Signed-off-by: Alexander Aring > > --- > > 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 > > -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..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 > > +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 | 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]) > > This change is unneded. It should still be possible to generate > tests/Makefile. > Ok. > > + 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 > > +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..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 ") > > @$(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) > > Why don't you add these to KBD_TOOLS-y as well? > because that are symlinks to psfxtable. I don't know if all to the same or it works like busybox and evaluate argv[0]. > > 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; \ > > use '&&', otherwise stange things happen, if the directory does not exist. > You are right. I copy&pasted it from other fonts install rule "rules/xorg-fonts.make". There is also no '&&' I will send some patches for changing this, too. > > + find . -type f | while read file; do \ > > + $(call install_copy, kbd, 0, 0, 0644, -, \ > > + /usr/share/consolefonts/$$file); \ > > Use tabs! > Oops. Ok and this wasn't copy&pasted... :-) Thanks Michael. - Alex -- ptxdist mailing list ptxdist@pengutronix.de