* 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.
+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>
Another round of string clarification and adding TRANSLATORS comments.
mv $@.new $@
# 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)
platform_DATA += moddep.lst
CLEANFILES += config.log syminfo.lst moddep.lst
name = crc64;
common = lib/crc64.c;
};
+
+module = {
+ name = all_video;
+ common = lib/fake_module.c;
+};
for (depmod in uniqmods) {
modlist = modlist " " depmod;
}
+ if (mod == "all_video") {
+ continue;
+ }
printf "%s:%s\n", mod, modlist;
}
+ modlist = ""
+ while (getline <"video.lst") {
+ modlist = modlist " " $1;
+ }
+ printf "all_video:%s\n", modlist;
}
--- /dev/null
+/* 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+");
static void (*grub_xputs_saved) (const char *str);
static const char *features[] = {
"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)
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"
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
}
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