Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Mf8Ls-00067C-Vj for mharc-grub-devel@gnu.org; Sun, 23 Aug 2009 04:23:01 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mf8Lr-000621-B2 for grub-devel@gnu.org; Sun, 23 Aug 2009 04:22:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mf8Lm-0005kf-KL for grub-devel@gnu.org; Sun, 23 Aug 2009 04:22:58 -0400 Received: from [199.232.76.173] (port=40376 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mf8Lm-0005jx-Ej for grub-devel@gnu.org; Sun, 23 Aug 2009 04:22:54 -0400 Received: from moutng.kundenserver.de ([212.227.17.8]:58606) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mf8Ll-00006q-VO for grub-devel@gnu.org; Sun, 23 Aug 2009 04:22:54 -0400 Received: from [85.180.2.245] (e180002245.adsl.alicedsl.de [85.180.2.245]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0MKt2u-1Mf8Li2HFS-000RoQ; Sun, 23 Aug 2009 10:22:50 +0200 From: Felix Zielcke To: The development of GRUB 2 In-Reply-To: <1250806721.2668.62.camel@mj> References: <1244022215.3429.17.camel@fz.local> <1244062540.20653.11.camel@mj> <1244067102.3407.51.camel@fz.local> <1248260661.3517.7.camel@fz.local> <1250617493.3810.15.camel@mj> <20090819151821.GC7859@thorin> <1250806721.2668.62.camel@mj> Content-Type: multipart/mixed; boundary="=-zUad8X5P4blSOQQbxl9w" Date: Sun, 23 Aug 2009 10:22:49 +0200 Message-Id: <1251015769.3612.3.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.27.90 X-Provags-ID: V01U2FsdGVkX1+Roz0ac/nt0juq9SKzJWRrDC6xRed7Pu5/n5L qzzUykURLmkFeprqoz43IoB5a0XZPFd/MaEe++rWga6hfXatQL 9WSXyixY0bgAehmtu9iHZk1cRzU93ZG X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: grub-mkconfig fails on every non i386-pc because of gfxterm/vbe X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Aug 2009 08:22:59 -0000 --=-zUad8X5P4blSOQQbxl9w Content-Type: text/plain Content-Transfer-Encoding: 7bit Am Donnerstag, den 20.08.2009, 18:18 -0400 schrieb Pavel Roskin: > On Wed, 2009-08-19 at 17:18 +0200, Robert Millan wrote: > > > The eye candy is nice but not so important. For me, gfxterm should be > > default on platforms where it's available, because it implements UTF-8, > > which is necessary to support l10n. > > Fine with me. Just please don't rely on existence of modules. > Here's now a patch which moves the check for vbe.mod from 00_header to grub-mkconfig and enables gfxterm if it's found. -- Felix Zielcke Proud Debian Maintainer --=-zUad8X5P4blSOQQbxl9w Content-Disposition: attachment; filename="gfxterm.patch" Content-Type: text/x-patch; name="gfxterm.patch"; charset="UTF-8" Content-Transfer-Encoding: 7bit 2009-08-23 Felix Zielcke * 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. Index: util/grub.d/00_header.in =================================================================== --- util/grub.d/00_header.in (revision 2508) +++ util/grub.d/00_header.in (working copy) @@ -73,23 +73,11 @@ case x${GRUB_TERMINAL_OUTPUT} in # 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 Index: util/grub-mkconfig.in =================================================================== --- util/grub-mkconfig.in (revision 2508) +++ util/grub-mkconfig.in (working copy) @@ -141,7 +141,24 @@ if [ "x${GRUB_TERMINAL}" != "x" ] ; then 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 @@ export GRUB_DEVICE \ 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 \ --=-zUad8X5P4blSOQQbxl9w--