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
|
@ -22,7 +22,6 @@ transform="@program_transform_name@"
|
|||
prefix="@prefix@"
|
||||
exec_prefix="@exec_prefix@"
|
||||
datarootdir="@datarootdir@"
|
||||
locale_dir=`echo ${GRUB_PREFIX}/locale | sed ${transform}`
|
||||
grub_lang=`echo $LANG | cut -d . -f 1`
|
||||
|
||||
. "@datadir@/@PACKAGE@/grub-mkconfig_lib"
|
||||
|
@ -83,17 +82,21 @@ if [ -n "${GRUB_VIDEO_BACKEND}" ]; then
|
|||
insmod ${GRUB_VIDEO_BACKEND}
|
||||
EOF
|
||||
else
|
||||
# Insert all available backends; GRUB will use the most appropriate.
|
||||
have_video=0;
|
||||
for backend in $(cat "${GRUB_PREFIX}/video.lst"); do
|
||||
have_video=1;
|
||||
cat <<EOF
|
||||
insmod ${backend}
|
||||
# If all_video.mod isn't available load all modules available
|
||||
# with versions prior to introduction of all_video.mod
|
||||
cat <<EOF
|
||||
if [ x\$feature_all_video_module = xy ]; then
|
||||
insmod all_video
|
||||
else
|
||||
insmod efi_gop
|
||||
insmod efi_uga
|
||||
insmod ieee1275_fb
|
||||
insmod vbe
|
||||
insmod vga
|
||||
insmod video_bochs
|
||||
insmod video_cirrus
|
||||
fi
|
||||
EOF
|
||||
done
|
||||
if [ x$have_video = x0 ]; then
|
||||
echo "true"
|
||||
fi
|
||||
fi
|
||||
cat <<EOF
|
||||
}
|
||||
|
@ -167,10 +170,9 @@ EOF
|
|||
EOF
|
||||
|
||||
# Gettext variables and module
|
||||
if [ "x${LANG}" != "xC" ] && [ -d "${locale_dir}" ] ; then
|
||||
prepare_grub_to_access_device $(${grub_probe} --target=device ${locale_dir}) | sed -e "s/^/ /"
|
||||
if [ "x${LANG}" != "xC" ] ; then
|
||||
cat << EOF
|
||||
set locale_dir=(\$root)$(make_system_path_relative_to_its_root ${locale_dir})
|
||||
set locale_dir=\$prefix/locale
|
||||
set lang=${grub_lang}
|
||||
insmod gettext
|
||||
EOF
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue