summaryrefslogtreecommitdiffstats
path: root/bootloader/make-kbd-info
diff options
context:
space:
mode:
Diffstat (limited to 'bootloader/make-kbd-info')
-rwxr-xr-xbootloader/make-kbd-info42
1 files changed, 12 insertions, 30 deletions
diff --git a/bootloader/make-kbd-info b/bootloader/make-kbd-info
index d36fde8..95560b6 100755
--- a/bootloader/make-kbd-info
+++ b/bootloader/make-kbd-info
@@ -19,15 +19,9 @@
# SYNOPSIS
#
# This program gets the list of supported keyboards from libDrakX and
-# generates a grub2 keyboard mapping file for each keyboard in the list.
-# It then generates the keyboard names file and the language to keyboard
-# mapping file that are used when generating the bootloader menus for
-# the Mageia ISOs.
-#
-# The grub2 keyboard mapping files are generated using the grub2-kbdcomp
-# program. The X11 keyboard layout and variant names are obtained from
-# libDrakX. The files (*.gkb) are stored in the 'layouts' subdirectory
-# of the current working directory.
+# generates the keyboard names file and the language to keyboard mapping
+# file that are used when generating the bootloader menus for the Mageia
+# ISOs.
#
# The keyboard names file consists of a list of paired identifier and
# description strings. The identifier is the keyboard identifier used
@@ -44,44 +38,32 @@
#
# The list of supported languages is read from the language names file
# (lang-names.txt) that is used when generating the bootloader menus.
-# This file is expected to be found in the current working directory.
+# This file is expected to be found in the current working directory.
+#
+# NOTE: An older version of this program also generated GRUB2 keyboard
+# layout files for each supported language, but it was found that the
+# GRUB2 at_keyboard driver did not work on all hardware, so this feature
+# was dropped.
use lib qw(/usr/lib/libDrakX);
use strict;
use Cwd qw(getcwd);
-use Data::Dumper;
use MDK::Common;
use common;
use keyboard;
-use run_program;
# Make sure we get the canonical description for the keyboard.
$ENV{LANGUAGE} = 'C';
-# Make sure the 'layouts' subdirectory exists.
-my $kbd_dir = getcwd() . '/layouts';
-mkdir_p($kbd_dir);
-
-# Generate the grub2 keyboard mapping files and collect the keyboard
-# descriptions. For keyboards with multiple layouts, only use the first
-# layout. If we fail to generate a keyboard mapping, don't include that
-# keyboard in the lists.
+# Collect the keyboard descriptions. For keyboards with multiple layouts,
+# only use the first layout.
my %names;
my @keyboards = map { { KEYBOARD => $_ } } keyboard::KEYBOARDs();
foreach (@keyboards) {
my $id = $_->{KEYBOARD};
- my $xkb = keyboard::keyboard2full_xkb($_);
- my @model = split(',', $xkb->{XkbModel});
- my @layout = split(',', $xkb->{XkbLayout});
- my @variant = split(',', $xkb->{XkbVariant});
- my $kbd_file = $kbd_dir . '/' . $id . '.gkb';
- if (-e $kbd_file || run_program::run('grub2-kbdcomp', '-o', $kbd_file, '-model', $model[0], $layout[0], $variant[0])) {
- $names{$id} = translate(keyboard::keyboard2text($_));
- } else {
- rm_rf($kbd_file);
- }
+ $names{$id} = translate(keyboard::keyboard2text($_));
}
# Generate the keyboard names file.