Re: Bug-fix elf.c powerpc ieee1275

2008-11-02 Thread Robert Millan
On Sun, Nov 02, 2008 at 09:22:18PM +1100, peter cros wrote:
 Thanks for the explanation, but the bug has been a show stopper for
 powerpc GNU-linux users trying to evaluate grub-ieee1275 since 1509,
 and is still there in rev 1891.
 
 Please can someone apply the reversion now?

Bean, will you commit your patch soon?

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


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: too many commands, help output rolls of screen

2008-11-02 Thread Jordi Mallach
On Sat, Nov 01, 2008 at 01:46:10PM +0100, Robert Millan wrote:
  output will roll off the standard sized console. Please remove some
  commands so there aren't so many that they roll off the screen.
 'set pager=1' solves this.  Btw, should we make it the default?

totally, this is very annoying by default. :)

-- 
Jordi Mallach PĂ©rez  --  Debian developer http://www.debian.org/
[EMAIL PROTECTED] [EMAIL PROTECTED] http://www.sindominio.net/
GnuPG public key information available at http://oskuro.net/


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


[PATCH] terminal split

2008-11-02 Thread Robert Millan

Hi,

This patch splits terminal handling in input and output.  While at it, it
resolves/removes some of the kludges we had to work around this limitation.

For example, gfxterm/vga no longer need to assume the input is bios console,
at_keyboard can be used in combination with any output terminal, etc.

It will also be possible to turn vga_text.c into a standalone output term,
but this needs more work since it is currently sharing much code with the
bios console in console.c.

-- 
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.
Index: conf/i386.rmk
===
--- conf/i386.rmk	(revision 1891)
+++ conf/i386.rmk	(working copy)
@@ -1,8 +1,11 @@
 # -*- makefile -*-
 
 pkglib_MODULES += cpuid.mod
-
-# For cpuid.mod.
 cpuid_mod_SOURCES = commands/i386/cpuid.c
 cpuid_mod_CFLAGS = $(COMMON_CFLAGS)
 cpuid_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
+pkglib_MODULES += at_keyboard.mod
+at_keyboard_mod_SOURCES = term/i386/pc/at_keyboard.c
+at_keyboard_mod_CFLAGS = $(COMMON_CFLAGS)
+at_keyboard_mod_LDFLAGS = $(COMMON_LDFLAGS)
Index: conf/i386-ieee1275.rmk
===
--- conf/i386-ieee1275.rmk	(revision 1891)
+++ conf/i386-ieee1275.rmk	(working copy)
@@ -22,7 +22,7 @@
 	kern/time.c \
 	kern/generic/millisleep.c \
 	kern/ieee1275/ieee1275.c \
-	term/ieee1275/ofconsole.c term/i386/pc/at_keyboard.c \
+	term/ieee1275/ofconsole.c \
 	disk/ieee1275/ofdisk.c \
 	symlist.c
 kernel_elf_HEADERS = arg.h cache.h device.h disk.h dl.h elf.h elfload.h \
Index: kern/ieee1275/init.c
===
--- kern/ieee1275/init.c	(revision 1891)
+++ kern/ieee1275/init.c	(working copy)
@@ -217,7 +217,6 @@
   grub_console_init ();
 #ifdef __i386__
   grub_get_extended_memory ();
-  grub_keyboard_controller_init ();
 #endif
   grub_claim_heap ();
   grub_ofdisk_init ();
Index: kern/term.c
===
--- kern/term.c	(revision 1891)
+++ kern/term.c	(working copy)
@@ -23,10 +23,12 @@
 #include grub/env.h
 
 /* The list of terminals.  */
-static grub_term_t grub_term_list;
+static grub_term_input_t grub_term_list_input;
+static grub_term_output_t grub_term_list_output;
 
 /* The current terminal.  */
-static grub_term_t grub_cur_term;
+static grub_term_input_t grub_cur_term_input;
+static grub_term_output_t grub_cur_term_output;
 
 /* The amount of lines counted by the pager.  */
 static int grub_more_lines;
@@ -38,18 +40,25 @@
 static int cursor_state = 1;
 
 void
-grub_term_register (grub_term_t term)
+grub_term_register_input (grub_term_input_t term)
 {
-  term-next = grub_term_list;
-  grub_term_list = term;
+  term-next = grub_term_list_input;
+  grub_term_list_input = term;
 }
 
 void
-grub_term_unregister (grub_term_t term)
+grub_term_register_output (grub_term_output_t term)
 {
-  grub_term_t *p, q;
+  term-next = grub_term_list_output;
+  grub_term_list_output = term;
+}
+
+void
+grub_term_unregister_input (grub_term_input_t term)
+{
+  grub_term_input_t *p, q;
   
-  for (p = grub_term_list, q = *p; q; p = (q-next), q = q-next)
+  for (p = grub_term_list_input, q = *p; q; p = (q-next), q = q-next)
 if (q == term)
   {
 *p = q-next;
@@ -58,45 +67,87 @@
 }
 
 void
-grub_term_iterate (int (*hook) (grub_term_t term))
+grub_term_unregister_output (grub_term_output_t term)
 {
-  grub_term_t p;
+  grub_term_output_t *p, q;
   
-  for (p = grub_term_list; p; p = p-next)
+  for (p = grub_term_list_output, q = *p; q; p = (q-next), q = q-next)
+if (q == term)
+  {
+*p = q-next;
+	break;
+  }
+}
+
+void
+grub_term_iterate_input (int (*hook) (grub_term_input_t term))
+{
+  grub_term_input_t p;
+  
+  for (p = grub_term_list_input; p; p = p-next)
 if (hook (p))
   break;
 }
 
+void
+grub_term_iterate_output (int (*hook) (grub_term_output_t term))
+{
+  grub_term_output_t p;
+  
+  for (p = grub_term_list_output; p; p = p-next)
+if (hook (p))
+  break;
+}
+
 grub_err_t
-grub_term_set_current (grub_term_t term)
+grub_term_set_current_input (grub_term_input_t term)
 {
-  if (grub_cur_term  grub_cur_term-fini)
-if ((grub_cur_term-fini) () != GRUB_ERR_NONE)
+  if (grub_cur_term_input  grub_cur_term_input-fini)
+if ((grub_cur_term_input-fini) () != GRUB_ERR_NONE)
   return grub_errno;
 
   if (term-init)
 if ((term-init) () != GRUB_ERR_NONE)
   return grub_errno;
   
-  grub_cur_term = term;
-  grub_cls ();
-  grub_setcursor (grub_getcursor ());
+  grub_cur_term_input = term;
   return GRUB_ERR_NONE;
 }
 
-grub_term_t
-grub_term_get_current (void)
+grub_err_t
+grub_term_set_current_output (grub_term_output_t term)
 {
-  return grub_cur_term;
+  if (grub_cur_term_output  grub_cur_term_output-fini)
+

pager=1 as default? (Re: too many commands, help output rolls of screen)

2008-11-02 Thread Robert Millan
On Sun, Nov 02, 2008 at 06:07:30PM +0100, Jordi Mallach wrote:
 On Sat, Nov 01, 2008 at 01:46:10PM +0100, Robert Millan wrote:
   output will roll off the standard sized console. Please remove some
   commands so there aren't so many that they roll off the screen.
  'set pager=1' solves this.  Btw, should we make it the default?
 
 totally, this is very annoying by default. :)

Since this was intentional, I'd like to know what others (specially the
maintainers) think about this before proposing that it is changed...

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


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: pager=1 as default? (Re: too many commands, help output rolls of screen)

2008-11-02 Thread peter cros
Not yet, its not perfect just yet.

For me on an apple efi macbook, pager=1 works very nicely on grub-efi
(I did not know about it before), and can be unset, and it is great.

But for grub ieee1275 on an apple ibookG4, it is useful, but has some
erratic behaviour (garbling screen) and does not turn off with 'unset
pager', so you don't want to be stuck with it.

I don't know about grub-pc.


On Mon, Nov 3, 2008 at 5:41 AM, Robert Millan [EMAIL PROTECTED] wrote:
 Since this was intentional, I'd like to know what others (specially the
 maintainers) think about this before proposing that it is changed...

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


 ___
 Grub-devel mailing list
 Grub-devel@gnu.org
 http://lists.gnu.org/mailman/listinfo/grub-devel


peter cros


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel