6.34. Kbd-1.12

The Kbd package contains key-table files and keyboard utilities.

6.34.1. Installation of Kbd

The following patch fixes build issues with GCC 4.1.1:

patch -Np1 -i ../kbd-1.12-gcc4_fixes-1.patch

The following sed disables running the built conftests while running configure:

cp configure{,.orig}
sed -e "s@&& ./conftest@@" configure.orig > configure

The following sed removes -s from the install command which will try to strip the installed files:

cp src/Makefile.in{,.orig}
sed -e "s/install -s/install/" src/Makefile.in.orig > src/Makefile.in

Prepare Kbd for compilation:

./configure --datadir=/lib/kbd

The meaning of the configure options:

--datadir

This option places the Kbd data and keymap files into /lib/kbd, as they are used by some of the scripts in the CLFS-Bootscripts package and must be on the root partition.

Configure detects the architecture of the host system. The following sed changes this value to your target architecture.

cp make_include{,.orig}
sed "/^ARCH/s/=.*/=arm/" make_include.orig > make_include

Compile the package:

make CC="${CC}"

Install the package:

make DESTDIR=${CLFS} install

Some of the Programs from Kbd are used by some of the scripts in the CLFS-Bootscripts package. As /usr may not be available during the early stages of booting, those binaries need to be on the root partition:

mv -v ${CLFS}/usr/bin/{kbd_mode,openvt,setfont} ${CLFS}/bin

6.34.2. Contents of Kbd

Installed programs: chvt, deallocvt, dumpkeys, fgconsole, getkeycodes, kbd_mode, kbdrate, loadkeys, loadunimap, mapscrn, openvt, psfaddtable (link to psfxtable), psfgettable (link to psfxtable), psfstriptable (link to psfxtable), psfxtable, resizecons, setfont, setkeycodes, setleds, setmetamode, showconsolefont, showkey, unicode_start, and unicode_stop

Short Descriptions

chvt

Changes the foreground virtual terminal

deallocvt

Deallocates unused virtual terminals

dumpkeys

Dumps the keyboard translation tables

fgconsole

Prints the number of the active virtual terminal

getkeycodes

Prints the kernel scancode-to-keycode mapping table

kbd_mode

Reports or sets the keyboard mode

kbdrate

Sets the keyboard repeat and delay rates

loadkeys

Loads the keyboard translation tables

loadunimap

Loads the kernel unicode-to-font mapping table

mapscrn

An obsolete program that used to load a user-defined output character mapping table into the console driver; this is now done by setfont

openvt

Starts a program on a new virtual terminal (VT)

psfaddtable

A link to psfxtable

psfgettable

A link to psfxtable

psfstriptable

A link to psfxtable

psfxtable

Handle Unicode character tables for console fonts

resizecons

Changes the kernel idea of the console size

setfont

Changes the Enhanced Graphic Adapter (EGA) and Video Graphics Array (VGA) fonts on the console

setkeycodes

Loads kernel scancode-to-keycode mapping table entries; this is useful if there are unusual keys on the keyboard

setleds

Sets the keyboard flags and Light Emitting Diodes (LEDs)

setmetamode

Defines the keyboard meta-key handling

showconsolefont

Shows the current EGA/VGA console screen font

showkey

Reports the scancodes, keycodes, and ASCII codes of the keys pressed on the keyboard

unicode_start

Puts the keyboard and console in UNICODE mode. Never use it on CLFS, because applications are not configured to support UNICODE.

unicode_stop

Reverts keyboard and console from UNICODE mode