All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Millan <rmh@aybabtu.com>
To: grub-devel@gnu.org
Subject: [PATCH] use at_keyboard.c on i386-ieee1275
Date: Wed, 23 Jan 2008 11:47:37 +0100	[thread overview]
Message-ID: <20080123104737.GA24943@thorin> (raw)

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


Taking into account that ofconsole on i386:

  - Has bugs with similar usability effect than at_keyboard.c (e.g. arrow keys
    not working).
  - In practice doesn't provide support for any keyboard other than AT
    (since OFW shuts down USB before transfering control to us).
  - Sharing code with other ports (CoreBoot, attow) is more efficient to get
    these bugs solved.

I propose to use at_keyboard.c as default for i386-ieee1275.

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)

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

diff -x '*~' -x '*.mk' -Nurp ../grub2/conf/i386-ieee1275.rmk ./conf/i386-ieee1275.rmk
--- ../grub2/conf/i386-ieee1275.rmk	2008-01-23 10:59:37.000000000 +0100
+++ ./conf/i386-ieee1275.rmk	2008-01-23 11:30:30.000000000 +0100
@@ -17,7 +17,8 @@ kernel_elf_SOURCES = kern/i386/ieee1275/
 	kern/i386/dl.c kern/parser.c kern/partition.c \
 	kern/env.c \
 	kern/ieee1275/ieee1275.c \
-	term/ieee1275/ofconsole.c disk/ieee1275/ofdisk.c \
+	term/ieee1275/ofconsole.c term/i386/pc/at_keyboard.c \
+	disk/ieee1275/ofdisk.c \
 	symlist.c
 kernel_elf_HEADERS = arg.h cache.h device.h disk.h dl.h elf.h elfload.h \
 	env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
diff -x '*~' -x '*.mk' -Nurp ../grub2/include/grub/i386/ieee1275/console.h ./include/grub/i386/ieee1275/console.h
--- ../grub2/include/grub/i386/ieee1275/console.h	2008-01-15 21:16:34.000000000 +0100
+++ ./include/grub/i386/ieee1275/console.h	2008-01-23 11:31:07.000000000 +0100
@@ -1 +1,28 @@
-#include <grub/powerpc/ieee1275/console.h>
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 2008  Free Software Foundation, Inc.
+ *
+ *  GRUB is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  GRUB is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GRUB_CONSOLE_MACHINE_HEADER
+#define GRUB_CONSOLE_MACHINE_HEADER 1
+
+#include <grub/symbol.h>
+
+void EXPORT_FUNC(grub_keyboard_controller_init) (void);
+int EXPORT_FUNC(grub_console_checkkey) (void);
+int EXPORT_FUNC(grub_console_getkey) (void);
+
+#endif /* ! GRUB_CONSOLE_MACHINE_HEADER */
diff -x '*~' -x '*.mk' -Nurp ../grub2/kern/powerpc/ieee1275/init.c ./kern/powerpc/ieee1275/init.c
--- ../grub2/kern/powerpc/ieee1275/init.c	2008-01-22 21:15:28.000000000 +0100
+++ ./kern/powerpc/ieee1275/init.c	2008-01-23 11:16:00.000000000 +0100
@@ -181,6 +181,9 @@ grub_machine_init (void)
   int actual;
 
   grub_console_init ();
+#ifdef __i386__
+  grub_keyboard_controller_init ();
+#endif
   grub_claim_heap ();
   grub_ofdisk_init ();
 
diff -x '*~' -x '*.mk' -Nurp ../grub2/term/ieee1275/ofconsole.c ./term/ieee1275/ofconsole.c
--- ../grub2/term/ieee1275/ofconsole.c	2008-01-21 15:21:43.000000000 +0100
+++ ./term/ieee1275/ofconsole.c	2008-01-23 11:17:45.000000000 +0100
@@ -358,8 +358,13 @@ static struct grub_term grub_ofconsole_t
     .fini = grub_ofconsole_fini,
     .putchar = grub_ofconsole_putchar,
     .getcharwidth = grub_ofconsole_getcharwidth,
+#ifdef __i386__
+    .checkkey = grub_console_checkkey,
+    .getkey = grub_console_getkey,
+#else
     .checkkey = grub_ofconsole_checkkey,
     .getkey = grub_ofconsole_getkey,
+#endif
     .getxy = grub_ofconsole_getxy,
     .getwh = grub_ofconsole_getwh,
     .gotoxy = grub_ofconsole_gotoxy,

             reply	other threads:[~2008-01-23 10:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-23 10:47 Robert Millan [this message]
2008-01-23 10:58 ` [PATCH] use at_keyboard.c on i386-ieee1275 Marco Gerards
2008-01-23 11:18   ` Robert Millan
2008-01-23 11:32     ` Marco Gerards
2008-01-23 11:56       ` Robert Millan
2008-01-24  8:40       ` Yoshinori K. Okuji
2008-01-24  9:10         ` Marco Gerards
2008-01-24 12:39         ` Robert Millan
2008-01-24 12:56           ` Marco Gerards
2008-01-24 21:26           ` Yoshinori K. Okuji
2008-01-24 21:55             ` Robert Millan
2008-01-25  8:56             ` Marco Gerards
2008-01-25 21:22               ` Yoshinori K. Okuji
2008-01-25 22:57                 ` next release & NEWS file (Re: [PATCH] use at_keyboard.c on i386-ieee1275) Robert Millan
2008-01-27  8:01                   ` Pavel Roskin
2008-01-27 22:03                     ` Robert Millan
2008-01-28  8:53                 ` [PATCH] use at_keyboard.c on i386-ieee1275 Marco Gerards

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080123104737.GA24943@thorin \
    --to=rmh@aybabtu.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.