commit-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[2532] 2009-08-25 Felix Zielcke <address@hidden>


From: Felix Zielcke
Subject: [2532] 2009-08-25 Felix Zielcke <address@hidden>
Date: Tue, 25 Aug 2009 19:42:57 +0000

Revision: 2532
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2532
Author:   fzielcke
Date:     2009-08-25 19:42:56 +0000 (Tue, 25 Aug 2009)
Log Message:
-----------
2009-08-25  Felix Zielcke  <address@hidden>

        * util/grub.d/00_header.in: Move check for the video backend of
        gfxterm from here ...
        * util/grub-mkconfig.in: ... to here.  Enable gfxterm if there's
        a suitable video backend.

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/util/grub-mkconfig.in
    trunk/grub2/util/grub.d/00_header.in

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog       2009-08-25 08:28:13 UTC (rev 2531)
+++ trunk/grub2/ChangeLog       2009-08-25 19:42:56 UTC (rev 2532)
@@ -1,3 +1,10 @@
+2009-08-25  Felix Zielcke  <address@hidden>
+
+       * util/grub.d/00_header.in: Move check for the video backend of
+       gfxterm from here ...
+       * util/grub-mkconfig.in: ... to here.  Enable gfxterm if there's
+       a suitable video backend.
+
 2009-08-25  Vladimir Serbinenko  <address@hidden>
 
        Fix breakage in grub-setup.

Modified: trunk/grub2/util/grub-mkconfig.in
===================================================================
--- trunk/grub2/util/grub-mkconfig.in   2009-08-25 08:28:13 UTC (rev 2531)
+++ trunk/grub2/util/grub-mkconfig.in   2009-08-25 19:42:56 UTC (rev 2532)
@@ -141,7 +141,24 @@
 fi
 
 case x${GRUB_TERMINAL_OUTPUT} in
-  x | xconsole | xserial | xofconsole | xgfxterm) ;;
+  x | xgfxterm)
+    # If this platform supports gfxterm, try to use it.
+    if test -e ${grub_prefix}/gfxterm.mod ; then
+      GRUB_VIDEO_BACKEND=
+      for i in vbe ; do
+        if test -e ${grub_prefix}/$i.mod ; then
+          GRUB_VIDEO_BACKEND=$i
+          break
+        fi
+      done
+      if [ -n "${GRUB_VIDEO_BACKEND}" ] ; then
+        GRUB_TERMINAL_OUTPUT=gfxterm
+      elif [ "${GRUB_TERMINAL_OUTPUT}" = "gfxterm" ] ; then
+        echo "No suitable backend could be found for gfxterm." >&2 ; exit 1
+      fi
+    fi
+  ;;
+  xconsole | xserial | xofconsole) ;;
   *) echo "Invalid output terminal \"${GRUB_TERMINAL_OUTPUT}\"" >&2 ; exit 1 ;;
 esac
 
@@ -190,7 +207,8 @@
   GRUB_DEVICE_BOOT_UUID \
   GRUB_FS \
   GRUB_FONT_PATH \
-  GRUB_PRELOAD_MODULES
+  GRUB_PRELOAD_MODULES \
+  GRUB_VIDEO_BACKEND
 
 # These are optional, user-defined variables.
 export GRUB_DEFAULT \

Modified: trunk/grub2/util/grub.d/00_header.in
===================================================================
--- trunk/grub2/util/grub.d/00_header.in        2009-08-25 08:28:13 UTC (rev 
2531)
+++ trunk/grub2/util/grub.d/00_header.in        2009-08-25 19:42:56 UTC (rev 
2532)
@@ -73,23 +73,11 @@
     # Make the font accessible
     prepare_grub_to_access_device `${grub_probe} --target=device 
${GRUB_FONT_PATH}`
 
-    # Pick a video backend
-    video_backend=
-    for i in vbe ; do
-      if test -e ${grub_prefix}/$i.mod ; then
-        video_backend=$i
-        break
-      fi
-    done
-    if ! [ "${video_backend}" ] ; then
-      echo "No suitable backend could be found for gfxterm." >&2 ; exit 1
-    fi
-
     cat << EOF
 if loadfont `make_system_path_relative_to_its_root ${GRUB_FONT_PATH}` ; then
   set gfxmode=${GRUB_GFXMODE}
   insmod gfxterm
-  insmod ${video_backend}
+  insmod ${GRUB_VIDEO_BACKEND}
   if terminal_output gfxterm ; then true ; else
     # For backward compatibility with versions of terminal.mod that don't
     # understand terminal_output





reply via email to

[Prev in Thread] Current Thread [Next in Thread]