grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch proposal] cursor-on/off seems to me only available for olps


From: rubisher
Subject: [patch proposal] cursor-on/off seems to me only available for olps
Date: Wed, 04 Nov 2009 16:27:24 +0100
User-agent: Scarlet Webmail

Hello all,

In another thread, I was annoying by strange and annoying messages
"cursor-on cursor-on word unknown" when booting any grub2 trunk, branch or
what ever release >= 1.97~beta3 on my lpar

After few reading on OpenFirmware, I figure out that's just because those
'word' (in forth's terms of my OF) are not implemented (as most probably
not more on some other OBP).

This follwong patch proposal works fine for my env but may be not the
better way to work.

Tia for further attention,
    J.

--- ./include/grub/ieee1275/ieee1275.h.orig     2009-11-02 
13:45:57.000000000 +0000
+++ ./include/grub/ieee1275/ieee1275.h  2009-11-04 11:30:12.000000000 
+0000
@@ -67,6 +67,7 @@
 
 extern grub_ieee1275_phandle_t EXPORT_VAR(grub_ieee1275_chosen);
 extern grub_ieee1275_ihandle_t EXPORT_VAR(grub_ieee1275_mmu);
+extern int EXPORT_VAR(grub_ieee1275_is_olpc);
 extern int (* EXPORT_VAR(grub_ieee1275_entry_fn)) (void *);
 
 enum grub_ieee1275_flag
--- ./kern/ieee1275/cmain.c.orig        2009-11-04 12:33:27.000000000 
+0000
+++ ./kern/ieee1275/cmain.c     2009-11-04 12:35:21.000000000 +0000
@@ -27,6 +27,7 @@
 
 grub_ieee1275_phandle_t grub_ieee1275_chosen;
 grub_ieee1275_ihandle_t grub_ieee1275_mmu;
+int grub_ieee1275_is_olpc=0;
 
 static grub_uint32_t grub_ieee1275_flags;
 

@@ -58,7 +59,6 @@
   grub_uint32_t realmode = 0;
   char tmp[32];
   int is_smartfirmware = 0;
-  int is_olpc = 0;
 
   grub_ieee1275_finddevice ("/", &root);
   grub_ieee1275_finddevice ("/options", &options);
@@ -77,7 +77,7 @@
   rc = grub_ieee1275_get_property (root, "architecture",
                                   tmp, sizeof (tmp), 0);
   if (rc >= 0 && !grub_strcmp (tmp, "OLPC"))
-    is_olpc = 1;
+    grub_ieee1275_is_olpc = 1;
 
   if (is_smartfirmware)
     {
@@ -111,7 +111,7 @@
        }
     }
 
-  if (is_olpc)
+  if (grub_ieee1275_is_olpc)
     {
       /* OLPC / XO laptops have three kinds of storage devices:
 
--- term/ieee1275/ofconsole.c.orig      2009-11-02 13:45:58.000000000 
+0000
+++ term/ieee1275/ofconsole.c   2009-11-04 12:19:45.000000000 +0000
@@ -324,11 +324,14 @@
 static void
 grub_ofconsole_setcursor (int on)
 {
-  /* Understood by the Open Firmware flavour in OLPC.  */
-  if (on)
-    grub_ieee1275_interpret ("cursor-on", 0);
-  else
-    grub_ieee1275_interpret ("cursor-off", 0);
+  if (grub_ieee1275_is_olpc)
+    {
+      /* Understood by the Open Firmware flavour in OLPC.  */
+      if (on)
+        grub_ieee1275_interpret ("cursor-on", 0);
+      else
+        grub_ieee1275_interpret ("cursor-off", 0);
+    }
 }
 
 static void



--- ./util/grub-mkconfig_lib.in.orig        2009-11-04 10:34:27.000000000 +0000
+++ ./util/grub-mkconfig_lib.in        2009-11-04 10:42:01.000000000 +0000
@@ -32,7 +32,7 @@
 
 make_system_path_relative_to_its_root ()
 {
-  path = "`grub-mkrelpath $1`"
+  path="`grub-mkrelpath $1`"
 
   case "`uname 2>/dev/null`" in
     CYGWIN*)
=== <> ===

--- ./include/grub/ieee1275/ieee1275.h.orig        2009-11-02 13:45:57.000000000 +0000
+++ ./include/grub/ieee1275/ieee1275.h        2009-11-04 11:30:12.000000000 +0000
@@ -67,6 +67,7 @@
 
 extern grub_ieee1275_phandle_t EXPORT_VAR(grub_ieee1275_chosen);
 extern grub_ieee1275_ihandle_t EXPORT_VAR(grub_ieee1275_mmu);
+extern int EXPORT_VAR(grub_ieee1275_is_olpc);
 extern int (* EXPORT_VAR(grub_ieee1275_entry_fn)) (void *);
 
 enum grub_ieee1275_flag
--- ./kern/ieee1275/cmain.c.orig        2009-11-04 12:33:27.000000000 +0000
+++ ./kern/ieee1275/cmain.c        2009-11-04 12:35:21.000000000 +0000
@@ -27,6 +27,7 @@
 
 grub_ieee1275_phandle_t grub_ieee1275_chosen;
 grub_ieee1275_ihandle_t grub_ieee1275_mmu;
+int grub_ieee1275_is_olpc=0;
 
 static grub_uint32_t grub_ieee1275_flags;
 

@@ -58,7 +59,6 @@
   grub_uint32_t realmode = 0;
   char tmp[32];
   int is_smartfirmware = 0;
-  int is_olpc = 0;
 
   grub_ieee1275_finddevice ("/", &root);
   grub_ieee1275_finddevice ("/options", &options);
@@ -77,7 +77,7 @@
   rc = grub_ieee1275_get_property (root, "architecture",
                                    tmp,        sizeof (tmp), 0);
   if (rc >= 0 && !grub_strcmp (tmp, "OLPC"))
-    is_olpc = 1;
+    grub_ieee1275_is_olpc = 1;
 
   if (is_smartfirmware)
     {
@@ -111,7 +111,7 @@
         }
     }
 
-  if (is_olpc)
+  if (grub_ieee1275_is_olpc)
     {
       /* OLPC / XO laptops have three kinds of storage devices:
 
--- term/ieee1275/ofconsole.c.orig        2009-11-02 13:45:58.000000000 +0000
+++ term/ieee1275/ofconsole.c        2009-11-04 12:19:45.000000000 +0000
@@ -324,11 +324,14 @@
 static void
 grub_ofconsole_setcursor (int on)
 {
-  /* Understood by the Open Firmware flavour in OLPC.  */
-  if (on)
-    grub_ieee1275_interpret ("cursor-on", 0);
-  else
-    grub_ieee1275_interpret ("cursor-off", 0);
+  if (grub_ieee1275_is_olpc)
+    {
+      /* Understood by the Open Firmware flavour in OLPC.  */
+      if (on)
+        grub_ieee1275_interpret ("cursor-on", 0);
+      else
+        grub_ieee1275_interpret ("cursor-off", 0);
+    }
 }
 
 static void

CONFIDENTIALITY NOTICE
This e-mail message and any attachments are only for the use of the intended recipient and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient, any disclosure, distribution or other use of this e-mail message or attachments is prohibited. If you have received this e-mail message in error, please delete and notify the sender immediately. Thank you.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]