* Sugguestion: separate input and output driver
@ 2008-05-29 8:09 Bean
2008-05-29 9:46 ` Robert Millan
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Bean @ 2008-05-29 8:09 UTC (permalink / raw)
To: The development of GRUB 2
Currently, input and output are bundled together, this make it quite
difficult to extend.
Input:
Keyboard, Serial
Output:
Text mode, Video mode
Now, the binding is fixed using individual module:
Keyboard + Text = console
Keyboard + Video = gfxterm
Serial + Text = serial
Serial + Video = ?
And there are mixing as well.
If we separate them, it would make things much clear. For example, the
grub_term structure can be split into two mutually exclusive parts:
struct grub_term =
{
.name,
.init,
.fini,
.putchar,
.getcharwidth,
.checkkey,
.getkey,
.getwh,
.getxy,
.gotoxy,
.cls,
.setcolorstate,
.setcursor,
.flags,
.next
};
=>
struct grub_input
{
.name,
.init,
.fini,
.checkkey,
.getkey
.flags,
.next
}
+
struct grub_output
{
.name,
.init,
.fini,
.putchar,
.getcharwidth,
.getxy,
.gotoxy,
.cls,
.setcolorstate,
.setcursor,
.flags,
.next
}
Integration between input and output:
Input driver <=> console driver <=> Output driver
The console driver is the central part. It accepts virtual key from
the input driver, and write to the virtual screen provided by output
driver.
--
Bean
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Sugguestion: separate input and output driver
2008-05-29 8:09 Sugguestion: separate input and output driver Bean
@ 2008-05-29 9:46 ` Robert Millan
2008-05-29 9:59 ` Robert Millan
2008-05-29 11:45 ` Marco Gerards
2 siblings, 0 replies; 4+ messages in thread
From: Robert Millan @ 2008-05-29 9:46 UTC (permalink / raw)
To: The development of GRUB 2
On Thu, May 29, 2008 at 04:09:54PM +0800, Bean wrote:
> Currently, input and output are bundled together, this make it quite
> difficult to extend.
>
> Input:
> Keyboard, Serial
>
> Output:
> Text mode, Video mode
>
> Now, the binding is fixed using individual module:
>
> Keyboard + Text = console
> Keyboard + Video = gfxterm
> Serial + Text = serial
> Serial + Video = ?
>
> And there are mixing as well.
>
> If we separate them, it would make things much clear. For example, the
> grub_term structure can be split into two mutually exclusive parts:
I've been wanting to do this for a while, but never had time for it.
Other annoying situations this would solve are:
at_keyboard + ofconsole (currently done with an ifdef hack)
usb_keyboard + (vga_term | bios_console)
--
Robert Millan
<GPLv2> I know my rights; I want my phone call!
<DRM> What good is a phone call… if you are unable to speak?
(as seen on /.)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Sugguestion: separate input and output driver
2008-05-29 8:09 Sugguestion: separate input and output driver Bean
2008-05-29 9:46 ` Robert Millan
@ 2008-05-29 9:59 ` Robert Millan
2008-05-29 11:45 ` Marco Gerards
2 siblings, 0 replies; 4+ messages in thread
From: Robert Millan @ 2008-05-29 9:59 UTC (permalink / raw)
To: The development of GRUB 2
On Thu, May 29, 2008 at 04:09:54PM +0800, Bean wrote:
> struct grub_input
> {
> }
>
> +
>
> struct grub_output
> {
> }
I suggest grub_term_input / grub_term_output, to avoid confusion with disk I/O.
--
Robert Millan
<GPLv2> I know my rights; I want my phone call!
<DRM> What good is a phone call… if you are unable to speak?
(as seen on /.)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Sugguestion: separate input and output driver
2008-05-29 8:09 Sugguestion: separate input and output driver Bean
2008-05-29 9:46 ` Robert Millan
2008-05-29 9:59 ` Robert Millan
@ 2008-05-29 11:45 ` Marco Gerards
2 siblings, 0 replies; 4+ messages in thread
From: Marco Gerards @ 2008-05-29 11:45 UTC (permalink / raw)
To: The development of GRUB 2
Bean <bean123ch@gmail.com> writes:
> Currently, input and output are bundled together, this make it quite
> difficult to extend.
>
> Input:
> Keyboard, Serial
>
> Output:
> Text mode, Video mode
>
> Now, the binding is fixed using individual module:
>
> Keyboard + Text = console
> Keyboard + Video = gfxterm
> Serial + Text = serial
> Serial + Video = ?
What do you mean by text? For the PC console, output is different
than that of the serial console.
Besides that, this seams like a good plan. This is something we need,
but no one took the time to implement this.
--
Marco
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-05-29 11:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-29 8:09 Sugguestion: separate input and output driver Bean
2008-05-29 9:46 ` Robert Millan
2008-05-29 9:59 ` Robert Millan
2008-05-29 11:45 ` Marco Gerards
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.