All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] default terminals on i386-pc / i386-ieee1275
@ 2008-11-12 18:11 Robert Millan
  2008-11-13 17:42 ` Vesa Jääskeläinen
  0 siblings, 1 reply; 3+ messages in thread
From: Robert Millan @ 2008-11-12 18:11 UTC (permalink / raw)
  To: grub-devel

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


Hi,

I think it would be good to make at_keyboard the default input terminal on
i386-ieee1275, after the kernel has loaded (via grub-mkconfig).  The AT
keyboard is the only choice on OLPC anyway, and avoids ofconsole bugs
(this used to be the old behaviour before the terminal split).

Also, I think it would be good to make vga_text the default output terminal
on i386-pc, provided that gfxterm auto-setup (in grub-mkconfig.in) wasn't
possible.  BIOS output is occasionally buggy (seen in a recent thread), and
this way we avoid problems.

See attached patch.

-- 
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: mkconfig_defaults.diff --]
[-- Type: text/x-diff, Size: 1152 bytes --]

2008-11-12  Robert Millan  <rmh@aybabtu.com>

	* util/grub.d/00_header.in: Default input terminal to at_keyboard for
	i386-ieee1275, and default output terminal to vga_text on i386-pc.

Index: util/grub.d/00_header.in
===================================================================
--- util/grub.d/00_header.in	(revision 1910)
+++ util/grub.d/00_header.in	(working copy)
@@ -22,6 +22,8 @@ prefix=@prefix@
 exec_prefix=@exec_prefix@
 libdir=@libdir@
 grub_prefix=`echo /boot/grub | sed ${transform}`
+target_cpu=@target_cpu@
+platform=@platform@
 
 . ${libdir}/grub/grub-mkconfig_lib
 
@@ -40,6 +42,18 @@ set default=${GRUB_DEFAULT}
 set timeout=${GRUB_TIMEOUT}
 EOF
 
+# Platform-specific overrides
+case ${target_cpu}-${platform} in
+  i386-ieee1275)
+    # AT keyboard is the only choice on OLPC anyway.
+    GRUB_TERMINAL_INPUT=${GRUB_TERMINAL_INPUT:-at_keyboard}
+  ;;
+  i386-pc)
+    # Garanteed to work (and sometimes avoids BIOS bugs)
+    GRUB_TERMINAL_OUTPUT=${GRUB_TERMINAL_OUTPUT:-vga_text}
+  ;;
+esac
+
 case ${GRUB_TERMINAL_INPUT}:${GRUB_TERMINAL_OUTPUT} in
   serial:* | *:serial)
     if ! test -e ${grub_prefix}/serial.mod ; then

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

* Re: [PATCH] default terminals on i386-pc / i386-ieee1275
  2008-11-12 18:11 [PATCH] default terminals on i386-pc / i386-ieee1275 Robert Millan
@ 2008-11-13 17:42 ` Vesa Jääskeläinen
  2008-11-22 19:57   ` Robert Millan
  0 siblings, 1 reply; 3+ messages in thread
From: Vesa Jääskeläinen @ 2008-11-13 17:42 UTC (permalink / raw)
  To: The development of GRUB 2

Robert Millan wrote:
> Hi,
> 
> I think it would be good to make at_keyboard the default input terminal on
> i386-ieee1275, after the kernel has loaded (via grub-mkconfig).  The AT
> keyboard is the only choice on OLPC anyway, and avoids ofconsole bugs
> (this used to be the old behaviour before the terminal split).
> 
> Also, I think it would be good to make vga_text the default output terminal
> on i386-pc, provided that gfxterm auto-setup (in grub-mkconfig.in) wasn't
> possible.  BIOS output is occasionally buggy (seen in a recent thread), and
> this way we avoid problems.

And how does this work with USB keyboards that would be supported by
BIOS if configured so... ?



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

* Re: [PATCH] default terminals on i386-pc / i386-ieee1275
  2008-11-13 17:42 ` Vesa Jääskeläinen
@ 2008-11-22 19:57   ` Robert Millan
  0 siblings, 0 replies; 3+ messages in thread
From: Robert Millan @ 2008-11-22 19:57 UTC (permalink / raw)
  To: The development of GRUB 2

On Thu, Nov 13, 2008 at 07:42:39PM +0200, Vesa Jääskeläinen wrote:
> Robert Millan wrote:
> > Hi,
> > 
> > I think it would be good to make at_keyboard the default input terminal on
> > i386-ieee1275, after the kernel has loaded (via grub-mkconfig).  The AT
> > keyboard is the only choice on OLPC anyway, and avoids ofconsole bugs
> > (this used to be the old behaviour before the terminal split).
> > 
> > Also, I think it would be good to make vga_text the default output terminal
> > on i386-pc, provided that gfxterm auto-setup (in grub-mkconfig.in) wasn't
> > possible.  BIOS output is occasionally buggy (seen in a recent thread), and
> > this way we avoid problems.
> 
> And how does this work with USB keyboards that would be supported by
> BIOS if configured so... ?

On i386-ieee1275, this doesn't really happen, because OFW shuts down USB when
handing control to GRUB.  Note that using at_keyboard was the existing behaviour
up untill recently (it reverted to ofconsole because of the terminal split).

On PC/BIOS, my proposed change would only affect terminal output.

-- 
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."



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

end of thread, other threads:[~2008-11-22 19:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-12 18:11 [PATCH] default terminals on i386-pc / i386-ieee1275 Robert Millan
2008-11-13 17:42 ` Vesa Jääskeläinen
2008-11-22 19:57   ` Robert Millan

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.