summaryrefslogtreecommitdiffstats
path: root/bootloader
diff options
context:
space:
mode:
Diffstat (limited to 'bootloader')
-rw-r--r--bootloader/Makefile11
-rwxr-xr-xbootloader/make-kbd-info42
2 files changed, 15 insertions, 38 deletions
diff --git a/bootloader/Makefile b/bootloader/Makefile
index 74437f7..f625342 100644
--- a/bootloader/Makefile
+++ b/bootloader/Makefile
@@ -1,11 +1,10 @@
-MY_TARGETS = images kbd-names.txt lang-kbds.txt layouts maggy unicode.pf2
+MY_TARGETS = images kbd-names.txt lang-kbds.txt maggy unicode.pf2
ARCH = $(shell uname -m)
GRUB2_MODULES = iso9660 ext2 fat jfs reiserfs xfs \
part_apple part_bsd part_gpt part_msdos \
- all_video font png gfxterm gfxmenu \
- keylayouts at_keyboard usb_keyboard \
+ all_video font gfxterm gfxmenu png \
boot chain configfile echo gettext \
linux linux16 ls search test
@@ -39,11 +38,9 @@ images/bootx64.efi:
@mkdir -p images
grub2-mkimage --output $@ --prefix /EFI/BOOT --format x86_64-efi $(GRUB2_MODULES)
-kbd-names%txt lang-kbds%txt: layouts
+kbd-names%txt lang-kbds%txt:
make-kbd-info
-layouts:
-
maggy: /boot/grub2/themes/maggy
cp -rL $< $@
@@ -56,12 +53,10 @@ unicode.pf2: /usr/share/grub/unicode.pf2
install: all
mkdir -p $(INSTALL_DIR)/images
- mkdir -p $(INSTALL_DIR)/layouts
mkdir -p $(INSTALL_DIR)/messages
mkdir -p $(INSTALL_DIR)/maggy
install -m 0644 *.txt *.pf2 $(INSTALL_DIR)
install -m 0644 images/* $(INSTALL_DIR)/images
- install -m 0644 layouts/* $(INSTALL_DIR)/layouts
install -m 0644 maggy/* $(INSTALL_DIR)/maggy
install -m 0644 po/*.mo $(INSTALL_DIR)/messages
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.