diff --git a/ChangeLog b/ChangeLog index 539575f3f..5d8793aa5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2012-02-25 Vladimir Serbinenko + + 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 Another round of string clarification and adding TRANSLATORS comments. diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am index 4a46e1d9c..80b24b949 100644 --- a/grub-core/Makefile.am +++ b/grub-core/Makefile.am @@ -336,7 +336,7 @@ syminfo.lst: gensyminfo.sh kernel_syms.lst $(MODULE_FILES) 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 diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def index cda6f94ce..fbc85d344 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def @@ -1794,3 +1794,8 @@ module = { name = crc64; common = lib/crc64.c; }; + +module = { + name = all_video; + common = lib/fake_module.c; +}; diff --git a/grub-core/genmoddep.awk b/grub-core/genmoddep.awk index e412d4370..9ffea7309 100644 --- a/grub-core/genmoddep.awk +++ b/grub-core/genmoddep.awk @@ -57,6 +57,14 @@ END { 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; } diff --git a/grub-core/lib/fake_module.c b/grub-core/lib/fake_module.c new file mode 100644 index 000000000..3646cedbc --- /dev/null +++ b/grub-core/lib/fake_module.c @@ -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_MOD_LICENSE ("GPLv3+"); diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c index aea540457..50c314dfa 100644 --- a/grub-core/normal/main.c +++ b/grub-core/normal/main.c @@ -475,7 +475,7 @@ static grub_command_t cmd_clear; 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) diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in index 24212e0cf..a319d58b5 100644 --- a/util/grub.d/00_header.in +++ b/util/grub.d/00_header.in @@ -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 <