All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] GRUB_GFXMODE_LINUX user variable
@ 2009-03-29  2:31 Robert Millan
  2009-03-29  8:39 ` Yoshinori K. Okuji
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Millan @ 2009-03-29  2:31 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 357 bytes --]


This patch adds GRUB_GFXMODE_LINUX user variable to make it easy for
users to set graphical mode before booting Linux.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."

[-- Attachment #2: gfxmode_linux.diff --]
[-- Type: text/x-diff, Size: 1447 bytes --]

2009-03-29  Robert Millan  <rmh@aybabtu.com>

	* util/grub-mkconfig.in (GRUB_GFXMODE_LINUX): Export variable.
	* util/grub.d/10_linux.in (linux_entry): If $GRUB_GFXMODE_LINUX
	was set by the user, set mode as per specified before boot.

Index: util/grub.d/10_linux.in
===================================================================
--- util/grub.d/10_linux.in	(revision 2048)
+++ util/grub.d/10_linux.in	(working copy)
@@ -107,6 +107,11 @@ EOF
 	initrd	${rel_dirname}/${initrd}
 EOF
   fi
+  if [ "$GRUB_GFXMODE_LINUX" ] ; then cat << EOF
+	set gfxmode=$GRUB_GFXMODE_LINUX
+	terminal_output gfxterm
+EOF
+  fi
   cat << EOF
 }
 EOF
Index: util/grub-mkconfig.in
===================================================================
--- util/grub-mkconfig.in	(revision 2047)
+++ util/grub-mkconfig.in	(working copy)
@@ -173,7 +173,8 @@ esac
 export GRUB_DEVICE GRUB_DEVICE_UUID GRUB_DEVICE_BOOT GRUB_DEVICE_BOOT_UUID GRUB_FS GRUB_FONT_PATH GRUB_PRELOAD_MODULES
 
 # These are optional, user-defined variables.
-export GRUB_DEFAULT GRUB_TIMEOUT GRUB_DISTRIBUTOR GRUB_CMDLINE_LINUX GRUB_CMDLINE_LINUX_DEFAULT GRUB_TERMINAL_OUTPUT GRUB_SERIAL_COMMAND GRUB_DISABLE_LINUX_UUID GRUB_GFXMODE
+export GRUB_DEFAULT GRUB_TIMEOUT GRUB_DISTRIBUTOR GRUB_CMDLINE_LINUX GRUB_CMDLINE_LINUX_DEFAULT GRUB_TERMINAL_OUTPUT \
+	GRUB_SERIAL_COMMAND GRUB_DISABLE_LINUX_UUID GRUB_GFXMODE GRUB_GFXMODE_LINUX
 
 if test "x${grub_cfg}" != "x"; then
   rm -f ${grub_cfg}.new

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-01 14:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-29  2:31 [PATCH] GRUB_GFXMODE_LINUX user variable Robert Millan
2009-03-29  8:39 ` Yoshinori K. Okuji
2009-04-01 13:05   ` Robert Millan
2009-04-01 14:01     ` Yoshinori K. Okuji

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.