Add new all_video module.
* grub-core/Makefile.am (moddep.lst): Make dependent on video.lst. * grub-core/Makefile.core.def (all_video): New module. * grub-core/genmoddep.awk: Generate dependency of all_video from video.lst. * grub-core/lib/fake_module.c: New file. * grub-core/normal/main.c (features): Add feature_all_video_module. * util/grub.d/00_header.in: Define locale_dir based on $prefix and don't do explicit search again. insmod all_video in load_video if available.
This commit is contained in:
parent
67093bc0ed
commit
22c7ce85fe
7 changed files with 49 additions and 16 deletions
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,17 @@
|
||||||
|
2012-02-25 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Add new all_video module.
|
||||||
|
|
||||||
|
* grub-core/Makefile.am (moddep.lst): Make dependent on video.lst.
|
||||||
|
* grub-core/Makefile.core.def (all_video): New module.
|
||||||
|
* grub-core/genmoddep.awk: Generate dependency of all_video from
|
||||||
|
video.lst.
|
||||||
|
* grub-core/lib/fake_module.c: New file.
|
||||||
|
* grub-core/normal/main.c (features): Add feature_all_video_module.
|
||||||
|
* util/grub.d/00_header.in: Define locale_dir based on $prefix and
|
||||||
|
don't do explicit search again.
|
||||||
|
insmod all_vidoe in load_video if available.
|
||||||
|
|
||||||
2012-02-25 Vladimir Serbinenko <phcoder@gmail.com>
|
2012-02-25 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
Another round of string clarification and adding TRANSLATORS comments.
|
Another round of string clarification and adding TRANSLATORS comments.
|
||||||
|
|
|
@ -336,7 +336,7 @@ syminfo.lst: gensyminfo.sh kernel_syms.lst $(MODULE_FILES)
|
||||||
mv $@.new $@
|
mv $@.new $@
|
||||||
|
|
||||||
# generate global module dependencies list
|
# generate global module dependencies list
|
||||||
moddep.lst: syminfo.lst genmoddep.awk
|
moddep.lst: syminfo.lst genmoddep.awk video.lst
|
||||||
cat $< | sort | awk -f $(srcdir)/genmoddep.awk > $@ || (rm -f $@; exit 1)
|
cat $< | sort | awk -f $(srcdir)/genmoddep.awk > $@ || (rm -f $@; exit 1)
|
||||||
platform_DATA += moddep.lst
|
platform_DATA += moddep.lst
|
||||||
CLEANFILES += config.log syminfo.lst moddep.lst
|
CLEANFILES += config.log syminfo.lst moddep.lst
|
||||||
|
|
|
@ -1794,3 +1794,8 @@ module = {
|
||||||
name = crc64;
|
name = crc64;
|
||||||
common = lib/crc64.c;
|
common = lib/crc64.c;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module = {
|
||||||
|
name = all_video;
|
||||||
|
common = lib/fake_module.c;
|
||||||
|
};
|
||||||
|
|
|
@ -57,6 +57,14 @@ END {
|
||||||
for (depmod in uniqmods) {
|
for (depmod in uniqmods) {
|
||||||
modlist = modlist " " depmod;
|
modlist = modlist " " depmod;
|
||||||
}
|
}
|
||||||
|
if (mod == "all_video") {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
printf "%s:%s\n", mod, modlist;
|
printf "%s:%s\n", mod, modlist;
|
||||||
}
|
}
|
||||||
|
modlist = ""
|
||||||
|
while (getline <"video.lst") {
|
||||||
|
modlist = modlist " " $1;
|
||||||
|
}
|
||||||
|
printf "all_video:%s\n", modlist;
|
||||||
}
|
}
|
||||||
|
|
4
grub-core/lib/fake_module.c
Normal file
4
grub-core/lib/fake_module.c
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
/* This file is intentionally empty: it's used to generate modules with no code or data. (purely dependency modules) */
|
||||||
|
#include <grub/dl.h>
|
||||||
|
|
||||||
|
GRUB_MOD_LICENSE ("GPLv3+");
|
|
@ -475,7 +475,7 @@ static grub_command_t cmd_clear;
|
||||||
static void (*grub_xputs_saved) (const char *str);
|
static void (*grub_xputs_saved) (const char *str);
|
||||||
static const char *features[] = {
|
static const char *features[] = {
|
||||||
"feature_chainloader_bpb", "feature_ntldr", "feature_platform_search_hint",
|
"feature_chainloader_bpb", "feature_ntldr", "feature_platform_search_hint",
|
||||||
"feature_default_font_path"
|
"feature_default_font_path", "feature_all_video_module"
|
||||||
};
|
};
|
||||||
|
|
||||||
GRUB_MOD_INIT(normal)
|
GRUB_MOD_INIT(normal)
|
||||||
|
|
|
@ -22,7 +22,6 @@ transform="@program_transform_name@"
|
||||||
prefix="@prefix@"
|
prefix="@prefix@"
|
||||||
exec_prefix="@exec_prefix@"
|
exec_prefix="@exec_prefix@"
|
||||||
datarootdir="@datarootdir@"
|
datarootdir="@datarootdir@"
|
||||||
locale_dir=`echo ${GRUB_PREFIX}/locale | sed ${transform}`
|
|
||||||
grub_lang=`echo $LANG | cut -d . -f 1`
|
grub_lang=`echo $LANG | cut -d . -f 1`
|
||||||
|
|
||||||
. "@datadir@/@PACKAGE@/grub-mkconfig_lib"
|
. "@datadir@/@PACKAGE@/grub-mkconfig_lib"
|
||||||
|
@ -83,17 +82,21 @@ if [ -n "${GRUB_VIDEO_BACKEND}" ]; then
|
||||||
insmod ${GRUB_VIDEO_BACKEND}
|
insmod ${GRUB_VIDEO_BACKEND}
|
||||||
EOF
|
EOF
|
||||||
else
|
else
|
||||||
# Insert all available backends; GRUB will use the most appropriate.
|
# If all_video.mod isn't available load all modules available
|
||||||
have_video=0;
|
# with versions prior to introduction of all_video.mod
|
||||||
for backend in $(cat "${GRUB_PREFIX}/video.lst"); do
|
|
||||||
have_video=1;
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
insmod ${backend}
|
if [ x\$feature_all_video_module = xy ]; then
|
||||||
EOF
|
insmod all_video
|
||||||
done
|
else
|
||||||
if [ x$have_video = x0 ]; then
|
insmod efi_gop
|
||||||
echo "true"
|
insmod efi_uga
|
||||||
|
insmod ieee1275_fb
|
||||||
|
insmod vbe
|
||||||
|
insmod vga
|
||||||
|
insmod video_bochs
|
||||||
|
insmod video_cirrus
|
||||||
fi
|
fi
|
||||||
|
EOF
|
||||||
fi
|
fi
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
}
|
}
|
||||||
|
@ -167,10 +170,9 @@ EOF
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Gettext variables and module
|
# Gettext variables and module
|
||||||
if [ "x${LANG}" != "xC" ] && [ -d "${locale_dir}" ] ; then
|
if [ "x${LANG}" != "xC" ] ; then
|
||||||
prepare_grub_to_access_device $(${grub_probe} --target=device ${locale_dir}) | sed -e "s/^/ /"
|
|
||||||
cat << EOF
|
cat << EOF
|
||||||
set locale_dir=(\$root)$(make_system_path_relative_to_its_root ${locale_dir})
|
set locale_dir=\$prefix/locale
|
||||||
set lang=${grub_lang}
|
set lang=${grub_lang}
|
||||||
insmod gettext
|
insmod gettext
|
||||||
EOF
|
EOF
|
||||||
|
|
Loading…
Reference in a new issue