Date: Thu, 17 Dec 2015 13:23:19 +0100 (CET) From: =?ISO-8859-1?Q?Trond_Endrest=F8l?= <Trond.Endrestol@fagskolen.gjovik.no> To: Kevin Oberman <rkoberman@gmail.com> Cc: Carsten Kunze <carsten.kunze@arcor.de>, FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: Re: keymap set after file system decryption Message-ID: <alpine.BSF.2.20.1512171242521.1026@mail.fig.ol.no> In-Reply-To: <alpine.BSF.2.20.1512171219520.1026@mail.fig.ol.no> References: <37578766.236860.1450260266870.JavaMail.ngmail@webmail18.arcor-online.net> <alpine.BSF.2.20.1512161545400.1026@mail.fig.ol.no> <271086927.242379.1450280096357.JavaMail.ngmail@webmail18.arcor-online.net> <CAN6yY1u-BStBuFiX7y4gisD=YXs2eJAEqv4S7TmPVtxh_Ww9Hg@mail.gmail.com> <alpine.BSF.2.20.1512171151260.1026@mail.fig.ol.no> <alpine.BSF.2.20.1512171219520.1026@mail.fig.ol.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 17 Dec 2015 12:21+0100, Trond Endrestøl wrote: > On Thu, 17 Dec 2015 11:56+0100, Trond Endrestøl wrote: > > > On Wed, 16 Dec 2015 16:34-0800, Kevin Oberman wrote: > > > > > On Wed, Dec 16, 2015 at 7:34 AM, Carsten Kunze <carsten.kunze@arcor.de> > > > wrote: > > > > > > > Trond Endrestøl <Trond.Endrestol@fagskolen.gjovik.no> wrote: > > > > > > > > > I guess we who live outside the US should take into account that PCs > > > > > are initialised by firmware to the US keyboard layout and the 437 code > > > > > page, courtesy of IBM, 1981. > > > > > > > > In 1981 I had accepted this. Now it's simply a bug and I wonder it has > > > > not been fixed in 22 years. I'll file a bug report. > > > > > > > > > I'm not sure if the creators of (U)EFI has considered other keyboard > > > > > layouts and/or code pages at boot time. > > > > > > > > I don't care for the BIOS here, the OS has to take care of it. It may be > > > > ok that at the boot prompt only US keymap is set. But when the rc scripts > > > > are running the keymap must be set correctly (as one of the first actions). > > > > > > > > > A bad workaround is to copy the suitable keymap from /usr/share... to > > > > > /etc, along with /usr/sbin/kbdcontrol, and add a suitable line to one > > > > > or either of /etc/rc.d/geli{,2}, e.g.: > > > > > > > > > > /etc/kbdcontrol -l /etc/german.iso.kbd > > > > > > > > > > kbdcontrol is linked only to libc: > > > > > > > > > > $ ldd `which kbdcontrol` > > > > > /usr/sbin/kbdcontrol: > > > > > libc.so.7 => /lib/libc.so.7 (0x800827000) > > > > > > > > In my case it's simpler since I have /usr in /, but as you descripted > > > > kbdcontrol must be in /sbin and the maps in /etc in the future. > > > > > > > > Carsten > > > > > > > > > > You can specify your default keymap in your kernel config file. > > > ATKBD_DFLT_KEYBD. It's possible that you might be able to set it in > > > /boot/loader.conf, as well, but I'm not too sure of this. See atkbd(4). > > > > I can confirm that neither ATKBD_DFLT_KEYMAP nor UKBD_DFLT_KEYMAP, nor > > SC_DFLT_FONT for that matter, works as intended. > > > > I have never had any success with: > > > > options SC_DFLT_FONT > > makeoptions SC_DFLT_FONT=iso > > > > options UKBD_DFLT_KEYMAP > > makeoptions UKBD_DFLT_KEYMAP=norwegian.iso > > > > options ATKBD_DFLT_KEYMAP > > makeoptions ATKBD_DFLT_KEYMAP=norwegian.iso > > > > Please prove me wrong. > > A recent run in stable/10 using r292334, resulted in: > > --- ukbd.o --- > cc -c -O2 -pipe -fno-strict-aliasing -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -gdwarf-2 /usr/src/sys/dev/usb/input/ukbd.c > /usr/src/sys/dev/usb/input/ukbd.c:1216:18: error: use of undeclared identifier 'key_map' > sc->sc_keymap = key_map; > ^ > /usr/src/sys/dev/usb/input/ukbd.c:1217:18: error: use of undeclared identifier 'accent_map' > sc->sc_accmap = accent_map; > ^ /usr/obj/usr/src/sys/KERNEL/{at,u}kbdmap.h er both empty. The problem seems to be related to kbdcontrol. kbdcontrol(8) is run as /usr/sbin/kbdcontrol -L ${ATKBD_DFLT_KEYMAP} and as /usr/sbin/kbdcontrol -L ${UKBD_DFLT_KEYMAP}, during buildkernel. The option -L, unlike option -l (lowercase ell), does not search the normal directories, e.g. /usr/share/syscons/keymaps. By removing {at,u}kbdmap.h from /usr/obj/usr/src/sys/KERNEL and changing to options ATKBD_DFLT_KEYMAP makeoptions ATKBD_DFLT_KEYMAP=/usr/share/syscons/keymaps/norwegian.iso.kbd options UKBD_DFLT_KEYMAP makeoptions UKBD_DFLT_KEYMAP=/usr/share/syscons/keymaps/norwegian.iso.kbd I got rid of any error messages and had a successful kernel build. Option 1: Fix kbdcontrol(8) and its mishandling of the -L option. Option 2: Use absolute paths in the kernel config files. -- +-------------------------------+------------------------------------+ | Vennlig hilsen, | Best regards, | | Trond Endrestøl, | Trond Endrestøl, | | IT-ansvarlig, | System administrator, | | Fagskolen Innlandet, | Gjøvik Technical College, Norway, | | tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, | | sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. | +-------------------------------+------------------------------------+ From owner-freebsd-current@freebsd.org Thu Dec 17 12:56:23 2015 Return-Path: <owner-freebsd-current@freebsd.org> Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42B71A4A42B for <freebsd-current@mailman.ysv.freebsd.org>; Thu, 17 Dec 2015 12:56:23 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from smtp.fagskolen.gjovik.no (smtp.fagskolen.gjovik.no [IPv6:2001:700:1100:1:200:ff:fe00:b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.fagskolen.gjovik.no", Issuer "Fagskolen i Gj??vik" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E075A1C13 for <freebsd-current@freebsd.org>; Thu, 17 Dec 2015 12:56:22 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from mail.fig.ol.no (localhost [127.0.0.1]) by mail.fig.ol.no (8.15.2/8.15.2) with ESMTPS id tBHCu7g2033768 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 17 Dec 2015 13:56:08 +0100 (CET) (envelope-from trond@fagskolen.gjovik.no) Received: from localhost (trond@localhost) by mail.fig.ol.no (8.15.2/8.15.2/Submit) with ESMTP id tBHCu7tN033765; Thu, 17 Dec 2015 13:56:07 +0100 (CET) (envelope-from trond@fagskolen.gjovik.no) X-Authentication-Warning: mail.fig.ol.no: trond owned process doing -bs Date: Thu, 17 Dec 2015 13:56:07 +0100 (CET) From: =?ISO-8859-1?Q?Trond_Endrest=F8l?= <Trond.Endrestol@fagskolen.gjovik.no> Sender: Trond.Endrestol@fagskolen.gjovik.no To: Claude Buisson <clbuisson@orange.fr> cc: Kevin Oberman <rkoberman@gmail.com>, Carsten Kunze <carsten.kunze@arcor.de>, FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: keymap set after file system decryption In-Reply-To: <5672A1D8.8090602@orange.fr> Message-ID: <alpine.BSF.2.20.1512171342522.1026@mail.fig.ol.no> References: <37578766.236860.1450260266870.JavaMail.ngmail@webmail18.arcor-online.net> <alpine.BSF.2.20.1512161545400.1026@mail.fig.ol.no> <271086927.242379.1450280096357.JavaMail.ngmail@webmail18.arcor-online.net> <CAN6yY1u-BStBuFiX7y4gisD=YXs2eJAEqv4S7TmPVtxh_Ww9Hg@mail.gmail.com> <alpine.BSF.2.20.1512171151260.1026@mail.fig.ol.no> <alpine.BSF.2.20.1512171219520.1026@mail.fig.ol.no> <5672A1D8.8090602@orange.fr> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) Organization: Fagskolen Innlandet OpenPGP: url=http://fig.ol.no/~trond/trond.key MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED, AWL autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail.fig.ol.no Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current <freebsd-current.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-current>, <mailto:freebsd-current-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-current/> List-Post: <mailto:freebsd-current@freebsd.org> List-Help: <mailto:freebsd-current-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-current>, <mailto:freebsd-current-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 17 Dec 2015 12:56:23 -0000 On Thu, 17 Dec 2015 12:51+0100, Claude Buisson wrote: > On 12/17/2015 12:21, Trond Endrestøl wrote: > > On Thu, 17 Dec 2015 11:56+0100, Trond Endrestøl wrote: > > > > > On Wed, 16 Dec 2015 16:34-0800, Kevin Oberman wrote: > > > > > > > On Wed, Dec 16, 2015 at 7:34 AM, Carsten Kunze <carsten.kunze@arcor.de> > > > > wrote: > > > > > > > > > Trond Endrestøl <Trond.Endrestol@fagskolen.gjovik.no> wrote: > > > > > > > > > > > I guess we who live outside the US should take into account that PCs > > > > > > are initialised by firmware to the US keyboard layout and the 437 > > > > > > code > > > > > > page, courtesy of IBM, 1981. > > > > > > > > > > In 1981 I had accepted this. Now it's simply a bug and I wonder it > > > > > has > > > > > not been fixed in 22 years. I'll file a bug report. > > > > > > > > > > > I'm not sure if the creators of (U)EFI has considered other keyboard > > > > > > layouts and/or code pages at boot time. > > > > > > > > > > I don't care for the BIOS here, the OS has to take care of it. It may > > > > > be > > > > > ok that at the boot prompt only US keymap is set. But when the rc > > > > > scripts > > > > > are running the keymap must be set correctly (as one of the first > > > > > actions). > > > > > > > > > > > A bad workaround is to copy the suitable keymap from /usr/share... > > > > > > to > > > > > > /etc, along with /usr/sbin/kbdcontrol, and add a suitable line to > > > > > > one > > > > > > or either of /etc/rc.d/geli{,2}, e.g.: > > > > > > > > > > > > /etc/kbdcontrol -l /etc/german.iso.kbd > > > > > > > > > > > > kbdcontrol is linked only to libc: > > > > > > > > > > > > $ ldd `which kbdcontrol` > > > > > > /usr/sbin/kbdcontrol: > > > > > > libc.so.7 => /lib/libc.so.7 (0x800827000) > > > > > > > > > > In my case it's simpler since I have /usr in /, but as you descripted > > > > > kbdcontrol must be in /sbin and the maps in /etc in the future. > > > > > > > > > > Carsten > > > > > > > > > > > > > You can specify your default keymap in your kernel config file. > > > > ATKBD_DFLT_KEYBD. It's possible that you might be able to set it in > > > > /boot/loader.conf, as well, but I'm not too sure of this. See atkbd(4). > > > > > > I can confirm that neither ATKBD_DFLT_KEYMAP nor UKBD_DFLT_KEYMAP, nor > > > SC_DFLT_FONT for that matter, works as intended. > > > > > > I have never had any success with: > > > > > > options SC_DFLT_FONT > > > makeoptions SC_DFLT_FONT=iso > > > > > > options UKBD_DFLT_KEYMAP > > > makeoptions UKBD_DFLT_KEYMAP=norwegian.iso > > > > > > options ATKBD_DFLT_KEYMAP > > > makeoptions ATKBD_DFLT_KEYMAP=norwegian.iso > > > > > > Please prove me wrong. > > > > A recent run in stable/10 using r292334, resulted in: > > > > --- ukbd.o --- > > cc -c -O2 -pipe -fno-strict-aliasing -std=c99 -g -Wall -Wredundant-decls > > -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith > > -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions > > -Wmissing-include-dirs -fdiagnostics-show-option > > -Wno-error-tautological-compare -Wno-error-empty-body > > -Wno-error-parentheses-equality -Wno-error-unused-function -nostdinc -I. > > -I/usr/src/sys -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/libfdt > > -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h > > -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -mno-aes -mno-avx > > -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float > > -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -gdwarf-2 > > /usr/src/sys/dev/usb/input/ukbd.c > > /usr/src/sys/dev/usb/input/ukbd.c:1216:18: error: use of undeclared > > identifier 'key_map' > > sc->sc_keymap = key_map; > > ^ > > /usr/src/sys/dev/usb/input/ukbd.c:1217:18: error: use of undeclared > > identifier 'accent_map' > > sc->sc_accmap = accent_map; > > ^ > > > > If your system is configured with VT and not syscons, there exists no > such thing as norwegian.iso(.kbd), but you must use no(.kbd). > See /usr/share/vt/keymaps/INDEX.keymaps. > > Furthermore, with VT, there is a chance that the system is configuerd > with kbdmux, which makes things more complicated. There exist patches in > bugzilla adding support of keyboard definitions to kbdmux. OK, so kbdcontrol(8) depends on the active console driver, be it sc or vt, and kbdcontrol(8) searchs for the files in either /usr/share/syscons/keymaps or /usr/share/vt/keymaps. In my case there's virtually no difference between norwegian.iso.kbd for sc and no.kbd for vt. Anyway, I learned something today, and I finally got Norwegian keyboard layout in my kernel. -- +-------------------------------+------------------------------------+ | Vennlig hilsen, | Best regards, | | Trond Endrestøl, | Trond Endrestøl, | | IT-ansvarlig, | System administrator, | | Fagskolen Innlandet, | Gjøvik Technical College, Norway, | | tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, | | sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. | +-------------------------------+------------------------------------+ From owner-freebsd-current@freebsd.org Thu Dec 17 15:44:42 2015 Return-Path: <owner-freebsd-current@freebsd.org> Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 668E3A4A323 for <freebsd-current@mailman.ysv.freebsd.org>; Thu, 17 Dec 2015 15:44:42 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from smtp.fagskolen.gjovik.no (smtp.fagskolen.gjovik.no [IPv6:2001:700:1100:1:200:ff:fe00:b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.fagskolen.gjovik.no", Issuer "Fagskolen i Gj??vik" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E64411B73 for <freebsd-current@freebsd.org>; Thu, 17 Dec 2015 15:44:41 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from mail.fig.ol.no (localhost [127.0.0.1]) by mail.fig.ol.no (8.15.2/8.15.2) with ESMTPS id tBHFiTb3034463 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 17 Dec 2015 16:44:29 +0100 (CET) (envelope-from trond@fagskolen.gjovik.no) Received: from localhost (trond@localhost) by mail.fig.ol.no (8.15.2/8.15.2/Submit) with ESMTP id tBHFiTgf034460; Thu, 17 Dec 2015 16:44:29 +0100 (CET) (envelope-from trond@fagskolen.gjovik.no) X-Authentication-Warning: mail.fig.ol.no: trond owned process doing -bs Date: Thu, 17 Dec 2015 16:44:29 +0100 (CET) From: =?ISO-8859-1?Q?Trond_Endrest=F8l?= <Trond.Endrestol@fagskolen.gjovik.no> Sender: Trond.Endrestol@fagskolen.gjovik.no To: Claude Buisson <clbuisson@orange.fr> cc: Kevin Oberman <rkoberman@gmail.com>, Carsten Kunze <carsten.kunze@arcor.de>, FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: keymap set after file system decryption In-Reply-To: <alpine.BSF.2.20.1512171342522.1026@mail.fig.ol.no> Message-ID: <alpine.BSF.2.20.1512171623300.1026@mail.fig.ol.no> References: <37578766.236860.1450260266870.JavaMail.ngmail@webmail18.arcor-online.net> <alpine.BSF.2.20.1512161545400.1026@mail.fig.ol.no> <271086927.242379.1450280096357.JavaMail.ngmail@webmail18.arcor-online.net> <CAN6yY1u-BStBuFiX7y4gisD=YXs2eJAEqv4S7TmPVtxh_Ww9Hg@mail.gmail.com> <alpine.BSF.2.20.1512171151260.1026@mail.fig.ol.no> <alpine.BSF.2.20.1512171219520.1026@mail.fig.ol.no> <5672A1D8.8090602@orange.fr> <alpine.BSF.2.20.1512171342522.1026@mail.fig.ol.no> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) Organization: Fagskolen Innlandet OpenPGP: url=http://fig.ol.no/~trond/trond.key MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED, AWL autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail.fig.ol.no Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current <freebsd-current.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-current>, <mailto:freebsd-current-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-current/> List-Post: <mailto:freebsd-current@freebsd.org> List-Help: <mailto:freebsd-current-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-current>, <mailto:freebsd-current-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 17 Dec 2015 15:44:42 -0000 On Thu, 17 Dec 2015 13:56+0100, Trond Endrestøl wrote: > On Thu, 17 Dec 2015 12:51+0100, Claude Buisson wrote: > > > On 12/17/2015 12:21, Trond Endrestøl wrote: > > > On Thu, 17 Dec 2015 11:56+0100, Trond Endrestøl wrote: > > > > > > > On Wed, 16 Dec 2015 16:34-0800, Kevin Oberman wrote: > > > > > > > > > On Wed, Dec 16, 2015 at 7:34 AM, Carsten Kunze <carsten.kunze@arcor.de> > > > > > wrote: > > > > > > > > > > > Trond Endrestøl <Trond.Endrestol@fagskolen.gjovik.no> wrote: > > > > > > > > > > > > > I guess we who live outside the US should take into account that PCs > > > > > > > are initialised by firmware to the US keyboard layout and the 437 > > > > > > > code > > > > > > > page, courtesy of IBM, 1981. > > > > > > > > > > > > In 1981 I had accepted this. Now it's simply a bug and I wonder it > > > > > > has > > > > > > not been fixed in 22 years. I'll file a bug report. > > > > > > > > > > > > > I'm not sure if the creators of (U)EFI has considered other keyboard > > > > > > > layouts and/or code pages at boot time. > > > > > > > > > > > > I don't care for the BIOS here, the OS has to take care of it. It may > > > > > > be > > > > > > ok that at the boot prompt only US keymap is set. But when the rc > > > > > > scripts > > > > > > are running the keymap must be set correctly (as one of the first > > > > > > actions). > > > > > > > > > > > > > A bad workaround is to copy the suitable keymap from /usr/share... > > > > > > > to > > > > > > > /etc, along with /usr/sbin/kbdcontrol, and add a suitable line to > > > > > > > one > > > > > > > or either of /etc/rc.d/geli{,2}, e.g.: > > > > > > > > > > > > > > /etc/kbdcontrol -l /etc/german.iso.kbd > > > > > > > > > > > > > > kbdcontrol is linked only to libc: > > > > > > > > > > > > > > $ ldd `which kbdcontrol` > > > > > > > /usr/sbin/kbdcontrol: > > > > > > > libc.so.7 => /lib/libc.so.7 (0x800827000) > > > > > > > > > > > > In my case it's simpler since I have /usr in /, but as you descripted > > > > > > kbdcontrol must be in /sbin and the maps in /etc in the future. > > > > > > > > > > > > Carsten > > > > > > > > > > > > > > > > You can specify your default keymap in your kernel config file. > > > > > ATKBD_DFLT_KEYBD. It's possible that you might be able to set it in > > > > > /boot/loader.conf, as well, but I'm not too sure of this. See atkbd(4). > > > > > > > > I can confirm that neither ATKBD_DFLT_KEYMAP nor UKBD_DFLT_KEYMAP, nor > > > > SC_DFLT_FONT for that matter, works as intended. > > > > > > > > I have never had any success with: > > > > > > > > options SC_DFLT_FONT > > > > makeoptions SC_DFLT_FONT=iso > > > > > > > > options UKBD_DFLT_KEYMAP > > > > makeoptions UKBD_DFLT_KEYMAP=norwegian.iso > > > > > > > > options ATKBD_DFLT_KEYMAP > > > > makeoptions ATKBD_DFLT_KEYMAP=norwegian.iso > > > > > > > > Please prove me wrong. > > > > > > A recent run in stable/10 using r292334, resulted in: > > > > > > --- ukbd.o --- > > > cc -c -O2 -pipe -fno-strict-aliasing -std=c99 -g -Wall -Wredundant-decls > > > -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith > > > -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions > > > -Wmissing-include-dirs -fdiagnostics-show-option > > > -Wno-error-tautological-compare -Wno-error-empty-body > > > -Wno-error-parentheses-equality -Wno-error-unused-function -nostdinc -I. > > > -I/usr/src/sys -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/libfdt > > > -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h > > > -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -mno-aes -mno-avx > > > -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float > > > -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -gdwarf-2 > > > /usr/src/sys/dev/usb/input/ukbd.c > > > /usr/src/sys/dev/usb/input/ukbd.c:1216:18: error: use of undeclared > > > identifier 'key_map' > > > sc->sc_keymap = key_map; > > > ^ > > > /usr/src/sys/dev/usb/input/ukbd.c:1217:18: error: use of undeclared > > > identifier 'accent_map' > > > sc->sc_accmap = accent_map; > > > ^ > > > > > > > If your system is configured with VT and not syscons, there exists no > > such thing as norwegian.iso(.kbd), but you must use no(.kbd). > > See /usr/share/vt/keymaps/INDEX.keymaps. > > > > Furthermore, with VT, there is a chance that the system is configuerd > > with kbdmux, which makes things more complicated. There exist patches in > > bugzilla adding support of keyboard definitions to kbdmux. > > OK, so kbdcontrol(8) depends on the active console driver, be it sc or > vt, and kbdcontrol(8) searchs for the files in either > /usr/share/syscons/keymaps or /usr/share/vt/keymaps. > > In my case there's virtually no difference between norwegian.iso.kbd > for sc and no.kbd for vt. > > Anyway, I learned something today, and I finally got Norwegian > keyboard layout in my kernel. Well, not quite. A stable/10 kernel (r292399) configured as below did not exhibit a Norwegian keyboard layout when booted in single user mode. :-/ kern.vty="vt" options UKBD_DFLT_KEYMAP makeoptions UKBD_DFLT_KEYMAP=no options ATKBD_DFLT_KEYMAP makeoptions ATKBD_DFLT_KEYMAP=no Instead of getting the letters æ ø å when hitting on those keys on a USB keyboard, I got the characters ' ; [, in the spirit of US keyboards. Full multi user mode works as expected with keymap="no" in /etc/rc.conf. /usr/obj/usr/src/sys/KERNEL/atkbdmap.h begins with: /* * Automatically generated from /usr/share/vt/keymaps/no.kbd. * DO NOT EDIT! */ static keymap_t key_map = { 0x6d, { The same goes for ukbdmap.h in the same directory. Nothing seems to be wrong with the generated .h files. Alas, the options and makeoptions for selecting a default keymap does not work, at least not for USB keyboards. -- +-------------------------------+------------------------------------+ | Vennlig hilsen, | Best regards, | | Trond Endrestøl, | Trond Endrestøl, | | IT-ansvarlig, | System administrator, | | Fagskolen Innlandet, | Gjøvik Technical College, Norway, | | tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, | | sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. | +-------------------------------+------------------------------------+ From owner-freebsd-current@freebsd.org Thu Dec 17 16:08:51 2015 Return-Path: <owner-freebsd-current@freebsd.org> Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9BDFA494EE for <freebsd-current@mailman.ysv.freebsd.org>; Thu, 17 Dec 2015 16:08:51 +0000 (UTC) (envelope-from clbuisson@orange.fr) Received: from smtp.smtpout.orange.fr (smtp08.smtpout.orange.fr [80.12.242.130]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client CN "Bizanga Labs SMTP Client Certificate", Issuer "Bizanga Labs CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 186131A59 for <freebsd-current@freebsd.org>; Thu, 17 Dec 2015 16:08:50 +0000 (UTC) (envelope-from clbuisson@orange.fr) Received: from localhost ([90.50.135.113]) by mwinf5d15 with ME id ug8b1r0052SxzLy03g8bKo; Thu, 17 Dec 2015 17:08:41 +0100 X-ME-Helo: localhost X-ME-Date: Thu, 17 Dec 2015 17:08:41 +0100 X-ME-IP: 90.50.135.113 Subject: Re: keymap set after file system decryption To: =?UTF-8?Q?Trond_Endrest=c3=b8l?= <Trond.Endrestol@fagskolen.gjovik.no> References: <37578766.236860.1450260266870.JavaMail.ngmail@webmail18.arcor-online.net> <alpine.BSF.2.20.1512161545400.1026@mail.fig.ol.no> <271086927.242379.1450280096357.JavaMail.ngmail@webmail18.arcor-online.net> <CAN6yY1u-BStBuFiX7y4gisD=YXs2eJAEqv4S7TmPVtxh_Ww9Hg@mail.gmail.com> <alpine.BSF.2.20.1512171151260.1026@mail.fig.ol.no> <alpine.BSF.2.20.1512171219520.1026@mail.fig.ol.no> <5672A1D8.8090602@orange.fr> <alpine.BSF.2.20.1512171342522.1026@mail.fig.ol.no> <alpine.BSF.2.20.1512171623300.1026@mail.fig.ol.no> Cc: Kevin Oberman <rkoberman@gmail.com>, Carsten Kunze <carsten.kunze@arcor.de>, FreeBSD Current <freebsd-current@freebsd.org> From: Claude Buisson <clbuisson@orange.fr> Message-ID: <5672DE02.9060503@orange.fr> Date: Thu, 17 Dec 2015 17:08:34 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <alpine.BSF.2.20.1512171623300.1026@mail.fig.ol.no> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current <freebsd-current.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-current>, <mailto:freebsd-current-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-current/> List-Post: <mailto:freebsd-current@freebsd.org> List-Help: <mailto:freebsd-current-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-current>, <mailto:freebsd-current-request@freebsd.org?subject=subscribe> X-List-Received-Date: Thu, 17 Dec 2015 16:08:51 -0000 On 12/17/2015 16:44, Trond Endrestøl wrote: > On Thu, 17 Dec 2015 13:56+0100, Trond Endrestøl wrote: > >> On Thu, 17 Dec 2015 12:51+0100, Claude Buisson wrote: >> >>> On 12/17/2015 12:21, Trond Endrestøl wrote: >>>> On Thu, 17 Dec 2015 11:56+0100, Trond Endrestøl wrote: >>>> >>>>> On Wed, 16 Dec 2015 16:34-0800, Kevin Oberman wrote: >>>>> >>>>>> On Wed, Dec 16, 2015 at 7:34 AM, Carsten Kunze <carsten.kunze@arcor.de> >>>>>> wrote: >>>>>> >>>>>>> Trond Endrestøl <Trond.Endrestol@fagskolen.gjovik.no> wrote: >>>>>>> >>>>>>>> I guess we who live outside the US should take into account that PCs >>>>>>>> are initialised by firmware to the US keyboard layout and the 437 >>>>>>>> code >>>>>>>> page, courtesy of IBM, 1981. >>>>>>> >>>>>>> In 1981 I had accepted this. Now it's simply a bug and I wonder it >>>>>>> has >>>>>>> not been fixed in 22 years. I'll file a bug report. >>>>>>> >>>>>>>> I'm not sure if the creators of (U)EFI has considered other keyboard >>>>>>>> layouts and/or code pages at boot time. >>>>>>> >>>>>>> I don't care for the BIOS here, the OS has to take care of it. It may >>>>>>> be >>>>>>> ok that at the boot prompt only US keymap is set. But when the rc >>>>>>> scripts >>>>>>> are running the keymap must be set correctly (as one of the first >>>>>>> actions). >>>>>>> >>>>>>>> A bad workaround is to copy the suitable keymap from /usr/share... >>>>>>>> to >>>>>>>> /etc, along with /usr/sbin/kbdcontrol, and add a suitable line to >>>>>>>> one >>>>>>>> or either of /etc/rc.d/geli{,2}, e.g.: >>>>>>>> >>>>>>>> /etc/kbdcontrol -l /etc/german.iso.kbd >>>>>>>> >>>>>>>> kbdcontrol is linked only to libc: >>>>>>>> >>>>>>>> $ ldd `which kbdcontrol` >>>>>>>> /usr/sbin/kbdcontrol: >>>>>>>> libc.so.7 => /lib/libc.so.7 (0x800827000) >>>>>>> >>>>>>> In my case it's simpler since I have /usr in /, but as you descripted >>>>>>> kbdcontrol must be in /sbin and the maps in /etc in the future. >>>>>>> >>>>>>> Carsten >>>>>>> >>>>>> >>>>>> You can specify your default keymap in your kernel config file. >>>>>> ATKBD_DFLT_KEYBD. It's possible that you might be able to set it in >>>>>> /boot/loader.conf, as well, but I'm not too sure of this. See atkbd(4). >>>>> >>>>> I can confirm that neither ATKBD_DFLT_KEYMAP nor UKBD_DFLT_KEYMAP, nor >>>>> SC_DFLT_FONT for that matter, works as intended. >>>>> >>>>> I have never had any success with: >>>>> >>>>> options SC_DFLT_FONT >>>>> makeoptions SC_DFLT_FONT=iso >>>>> >>>>> options UKBD_DFLT_KEYMAP >>>>> makeoptions UKBD_DFLT_KEYMAP=norwegian.iso >>>>> >>>>> options ATKBD_DFLT_KEYMAP >>>>> makeoptions ATKBD_DFLT_KEYMAP=norwegian.iso >>>>> >>>>> Please prove me wrong. >>>> >>>> A recent run in stable/10 using r292334, resulted in: >>>> >>>> --- ukbd.o --- >>>> cc -c -O2 -pipe -fno-strict-aliasing -std=c99 -g -Wall -Wredundant-decls >>>> -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith >>>> -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions >>>> -Wmissing-include-dirs -fdiagnostics-show-option >>>> -Wno-error-tautological-compare -Wno-error-empty-body >>>> -Wno-error-parentheses-equality -Wno-error-unused-function -nostdinc -I. >>>> -I/usr/src/sys -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/libfdt >>>> -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h >>>> -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -mno-aes -mno-avx >>>> -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float >>>> -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -gdwarf-2 >>>> /usr/src/sys/dev/usb/input/ukbd.c >>>> /usr/src/sys/dev/usb/input/ukbd.c:1216:18: error: use of undeclared >>>> identifier 'key_map' >>>> sc->sc_keymap = key_map; >>>> ^ >>>> /usr/src/sys/dev/usb/input/ukbd.c:1217:18: error: use of undeclared >>>> identifier 'accent_map' >>>> sc->sc_accmap = accent_map; >>>> ^ >>>> >>> >>> If your system is configured with VT and not syscons, there exists no >>> such thing as norwegian.iso(.kbd), but you must use no(.kbd). >>> See /usr/share/vt/keymaps/INDEX.keymaps. >>> >>> Furthermore, with VT, there is a chance that the system is configuerd >>> with kbdmux, which makes things more complicated. There exist patches in >>> bugzilla adding support of keyboard definitions to kbdmux. >> >> OK, so kbdcontrol(8) depends on the active console driver, be it sc or >> vt, and kbdcontrol(8) searchs for the files in either >> /usr/share/syscons/keymaps or /usr/share/vt/keymaps. >> >> In my case there's virtually no difference between norwegian.iso.kbd >> for sc and no.kbd for vt. >> >> Anyway, I learned something today, and I finally got Norwegian >> keyboard layout in my kernel. > > Well, not quite. A stable/10 kernel (r292399) configured as below did > not exhibit a Norwegian keyboard layout when booted in single user > mode. :-/ > > kern.vty="vt" > > options UKBD_DFLT_KEYMAP > makeoptions UKBD_DFLT_KEYMAP=no > > options ATKBD_DFLT_KEYMAP > makeoptions ATKBD_DFLT_KEYMAP=no > > Instead of getting the letters æ ø å when hitting on those keys on a > USB keyboard, I got the characters ' ; [, in the spirit of US > keyboards. > > Full multi user mode works as expected with > > keymap="no" > > in /etc/rc.conf. > > /usr/obj/usr/src/sys/KERNEL/atkbdmap.h begins with: > > /* > * Automatically generated from /usr/share/vt/keymaps/no.kbd. > * DO NOT EDIT! > */ > static keymap_t key_map = { 0x6d, { > > The same goes for ukbdmap.h in the same directory. > > Nothing seems to be wrong with the generated .h files. > > Alas, the options and makeoptions for selecting a default keymap does > not work, at least not for USB keyboards. > As I said above, if you use vt, and kbdmux (which is standard and even mandatory to be able to use Xorg), specifying the keymap for atkbd and usbkbd is useless.. Have a look at PR 194744 by Oliver Pinter (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194744) This PR is now more than 1 year old, and nothing has been done: people using non-US keyboard are not popular here.. Claude Buisson
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.20.1512171242521.1026>