summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bootloader/Makefile11
-rwxr-xr-xbootloader/make-kbd-info42
-rw-r--r--examples/gui/config/build.cfg1
-rw-r--r--examples/xfce/config/build.cfg1
-rw-r--r--lib/MGA/DrakISO/BuildBoot.pm21
5 files changed, 20 insertions, 56 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.
diff --git a/examples/gui/config/build.cfg b/examples/gui/config/build.cfg
index 2506d8f..9e6d770 100644
--- a/examples/gui/config/build.cfg
+++ b/examples/gui/config/build.cfg
@@ -184,7 +184,6 @@ my $config = {
bootloader_theme => '/usr/share/drakiso-bootloader/maggy',
bootloader_font => '/usr/share/drakiso-bootloader/unicode.pf2',
bootloader_langs => '/usr/share/drakiso-bootloader/lang-names.txt',
- bootloader_kbds => '/usr/share/drakiso-bootloader/kbd-names.txt',
bootloader_messages => '/usr/share/drakiso-bootloader/messages',
bootloader_default => 0,
bootloader_timeout => 10,
diff --git a/examples/xfce/config/build.cfg b/examples/xfce/config/build.cfg
index d6faa3c..db17310 100644
--- a/examples/xfce/config/build.cfg
+++ b/examples/xfce/config/build.cfg
@@ -232,7 +232,6 @@ my $config = {
bootloader_theme => '/usr/share/drakiso-bootloader/maggy',
bootloader_font => '/usr/share/drakiso-bootloader/unicode.pf2',
bootloader_langs => '/usr/share/drakiso-bootloader/lang-names.txt',
- bootloader_kbds => '/usr/share/drakiso-bootloader/kbd-names.txt',
bootloader_messages => '/usr/share/drakiso-bootloader/messages',
bootloader_default => 0,
bootloader_timeout => 10,
diff --git a/lib/MGA/DrakISO/BuildBoot.pm b/lib/MGA/DrakISO/BuildBoot.pm
index 51b3c65..4191243 100644
--- a/lib/MGA/DrakISO/BuildBoot.pm
+++ b/lib/MGA/DrakISO/BuildBoot.pm
@@ -148,8 +148,7 @@ sub prepare_iso_bootloader {
}
# If the user has provided the necessary configuration data, construct
- # the bootloader language and keyboard selection submenus and copy the
- # grub2 keyboard layout files.
+ # the bootloader language and keyboard selection submenus.
my $add_lang_menu = defined $build->{media}{bootloader_langs};
my $add_kbd_menu = defined $build->{media}{bootloader_kbds};
if ($add_lang_menu) {
@@ -170,10 +169,6 @@ sub prepare_iso_bootloader {
-e $kbd_names or die "ERROR: cannot find bootloader keyboard name file $kbd_names\n";
my @kbds = group_by2(eval(cat_($kbd_names))) or die "ERROR: error in keyboard name file $kbd_names\n";
- my $layouts = dirname($kbd_names) . '/layouts';
- -d $layouts or die "ERROR: cannot find bootloader keyboard map directory $layouts\n";
- cp_f($layouts, $grub2_dir);
-
MDK::Common::File::output_utf8($grub2_dir . '/kbd-menu.cfg', build_kbd_menu_cfg(\@kbds));
}
@@ -289,9 +284,8 @@ sub prepare_iso_bootloader {
sub build_grub2_eltorito_img {
my ($output) = @_;
- my @modules = qw(biosdisk iso9660 fat part_msdos all_video font png gfxterm gfxmenu
- keylayouts at_keyboard usb_keyboard configfile echo gettext
- linux linux16 ls search test);
+ my @modules = qw(biosdisk iso9660 fat part_msdos all_video font gfxterm gfxmenu png
+ configfile echo gettext linux linux16 ls search test);
run_('grub2-mkimage',
'--output', $output,
@@ -304,9 +298,8 @@ sub build_grub2_eltorito_img {
sub build_grub2_boot_efi {
my ($output, $format) = @_;
- my @modules = qw(iso9660 fat part_msdos all_video font png gfxterm gfxmenu
- keylayouts at_keyboard usb_keyboard configfile echo gettext
- linux linux16 ls search test);
+ my @modules = qw(iso9660 fat part_msdos all_video font gfxterm gfxmenu png
+ configfile echo gettext linux linux16 ls search test);
run_('grub2-mkimage',
'--output', $output,
@@ -463,12 +456,8 @@ sub build_kbd_menu_cfg {
my ($kbds) = @_;
join("\n",
"function set_keyboard {",
- " if [ -z \$kbd ] ; then",
- " terminal_input at_keyboard",
- " fi",
" set kbd=\$1",
" set lkbd=",
- " keymap \$grub2/layouts/\$kbd.gkb",
" configfile \$grub2/grub.cfg",
"}",
"",