linux-2.6.37 defkeymap.c?

Andrew Benton b3nton at gmail.com
Thu Dec 2 16:05:31 PST 2010


On Sun, 28 Nov 2010 12:08:39 -0500
Mike Hollis <zzflop at embarqmail.com> wrote:

>  I didn't realize you could compile a default into the kernel. What are
> the advantages of doing this as opposed to loading the keymap from boot
> scripts ?

If, in a crisis, you boot with init=/bin/bash, the bootscripts don't
get run and on top of everything else you have to cope with you have
the default American keymap. Which is fine if you're using an American
keyboard, not so good if you live somewhere else. Where's the tilde
sign gone? Where's the quotation mark?

Google was no use solving this, I had to figure it out from the kernel
source. It seems that in the 2.6.37 kernel the default keymap has moved
from drivers/char/defkeymap.c to drivers/tty/vt/defkeymap.c.
To compile a UK keymap into the kernel I now have to (just before I run
make):

loadkeys -m /usr/share/keymaps/i386/qwerty/uk.map.gz > \
  drivers/tty/vt/defkeymap.c

Andy



More information about the lfs-chat mailing list