]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Put terminfo into core on ieee1275 and yeeloong (needed for console).
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 30 Sep 2010 15:50:01 +0000 (17:50 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 30 Sep 2010 15:50:01 +0000 (17:50 +0200)
* gentpl.py: New groups terminfoinkernel and terminfomodule.
* grub-core/Makefile.am (KERNEL_HEADER_FILES): Include extcmd.h, arg.h
and terminfo.h when needed.
* grub-core/Makefile.core.def (kernel): Include term/terminfo.c,
term/tparm.c, commands/extcmd.c, lib/arg.c on terminfokernel.
(terminfo): Enable only on terminfokernel.
(extcmd): Likewise.
* include/grub/extcmd.h: Add missing EXPORT_FUNC.
* include/grub/lib/arg.h: Likewise.
* grub-core/term/ieee1275/ofconsole.c (grub_ofconsole_dimensions): Fix
incorrect usage of ->.

ChangeLog
gentpl.py
grub-core/Makefile.am
grub-core/Makefile.core.def
grub-core/term/ieee1275/ofconsole.c
include/grub/extcmd.h
include/grub/lib/arg.h

index ec2db19362db52c6e2d4118864344925928fcfed..197158f506d84b83e50906265ad6131826acca03 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2010-09-30  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       Put terminfo into core on ieee1275 and yeeloong (needed for console).
+
+       * gentpl.py: New groups terminfoinkernel and terminfomodule.
+       * grub-core/Makefile.am (KERNEL_HEADER_FILES): Include extcmd.h, arg.h
+       and terminfo.h when needed.
+       * grub-core/Makefile.core.def (kernel): Include term/terminfo.c,
+       term/tparm.c, commands/extcmd.c, lib/arg.c on terminfokernel.
+       (terminfo): Enable only on terminfokernel.
+       (extcmd): Likewise.
+       * include/grub/extcmd.h: Add missing EXPORT_FUNC.
+       * include/grub/lib/arg.h: Likewise.
+       * grub-core/term/ieee1275/ofconsole.c (grub_ofconsole_dimensions): Fix
+       incorrect usage of ->.
+
 2010-09-29  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/loader/multiboot_mbi2.c (grub_multiboot_make_mbi]
index 109ce7981e46b52350e7e0731bf8c68761d040d6..a42a6066748b22c4dca2b3a6c81eb74299fd6400 100644 (file)
--- a/gentpl.py
+++ b/gentpl.py
@@ -38,6 +38,11 @@ GROUPS["videoinkernel"] = ["mips_yeeloong"]
 GROUPS["videomodules"]   = GRUB_PLATFORMS[:];
 for i in GROUPS["videoinkernel"]: GROUPS["videomodules"].remove(i)
 
+# Similar for terminfo
+GROUPS["terminfoinkernel"] = ["mips_yeeloong"] + GROUPS["ieee1275"];
+GROUPS["terminfomodule"]   = GRUB_PLATFORMS[:];
+for i in GROUPS["terminfoinkernel"]: GROUPS["terminfomodule"].remove(i)
+
 # Miscelaneous groups schedulded to disappear in future
 GROUPS["nosparc64"] = GRUB_PLATFORMS[:]; GROUPS["nosparc64"].remove("sparc64_ieee1275")
 GROUPS["i386_coreboot_multiboot_qemu"] = ["i386_coreboot", "i386_multiboot", "i386_qemu"]
index f08bb765cfcab846bafd2042b972994795c996e8..9792dd97400e2171d6424170ba5985a93ff72d6c 100644 (file)
@@ -113,6 +113,8 @@ endif
 if COND_i386_ieee1275
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/ieee1275/ieee1275.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
 endif
 
@@ -138,15 +140,24 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/cs5536.h
 KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/pci.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/serial.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/loader.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
 endif
 
 if COND_powerpc_ieee1275
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/ieee1275/ieee1275.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
 endif
 
 if COND_sparc64_ieee1275
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/ieee1275/ieee1275.h
 KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/sparc64/ieee1275/ieee1275.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h
+KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/lib/arg.h
 endif
 
 if COND_emu
index 49628cb8437440d851bb3f62001e3ce8eb048ac1..8845c26ea43dd1ff723028d1c76272f5dabbe955 100644 (file)
@@ -92,10 +92,10 @@ kernel = {
   ieee1275 = kern/ieee1275/openfw.c;
   ieee1275 = term/ieee1275/ofconsole.c;
 
-  ieee1275 = term/terminfo.c;
-  ieee1275 = term/tparm.c;
-  mips = term/terminfo.c;
-  mips = term/tparm.c;
+  terminfoinkernel = term/terminfo.c;
+  terminfoinkernel = term/tparm.c;
+  terminfoinkernel = commands/extcmd.c;
+  terminfoinkernel = lib/arg.c;
 
   i386 = kern/i386/dl.c;
 
@@ -173,9 +173,7 @@ kernel = {
   emu = kern/emu/mm.c;
   emu = kern/emu/time.c;
 
-  videoinkernel = lib/arg.c;
   videoinkernel = term/gfxterm.c;
-  videoinkernel = commands/extcmd.c;
   videoinkernel = font/font.c;
   videoinkernel = font/font_cmd.c;
   videoinkernel = io/bufio.c;
@@ -542,6 +540,7 @@ module = {
   name = extcmd;
   common = commands/extcmd.c;
   common = lib/arg.c;
+  enable = terminfomodule;
 };
 
 module = {
@@ -1337,6 +1336,7 @@ module = {
   name = terminfo;
   common = term/terminfo.c;
   common = term/tparm.c;
+  enable = terminfomodule;
 };
 
 module = {
index 944056ba694e115cd08f10bc6f8d19be9ed4dc26..2b0bddbbb2bc6eff778703d96a904fe4b6fabd07 100644 (file)
@@ -90,7 +90,7 @@ grub_ofconsole_dimensions (void)
 
          if (! grub_ieee1275_get_property (options, "screen-#columns",
                                            val, lval, 0))
-           grub_ofconsole_terminfo_output->width
+           grub_ofconsole_terminfo_output.width
              = (grub_uint8_t) grub_strtoul (val, 0, 10);
        }
       if (! grub_ieee1275_get_property_length (options, "screen-#rows", &lval)
@@ -99,16 +99,16 @@ grub_ofconsole_dimensions (void)
          char val[lval];
          if (! grub_ieee1275_get_property (options, "screen-#rows",
                                            val, lval, 0))
-           grub_ofconsole_terminfo_output->height
+           grub_ofconsole_terminfo_output.height
              = (grub_uint8_t) grub_strtoul (val, 0, 10);
        }
     }
 
   /* Use a small console by default.  */
-  if (! grub_ofconsole_terminfo_output->width)
-    grub_ofconsole_terminfo_output->width = 80;
-  if (! grub_ofconsole_terminfo_output->height)
-    grub_ofconsole_terminfo_output->height = 24;
+  if (! grub_ofconsole_terminfo_output.width)
+    grub_ofconsole_terminfo_output.width = 80;
+  if (! grub_ofconsole_terminfo_output.height)
+    grub_ofconsole_terminfo_output.height = 24;
 }
 
 static void
index c34a1df665014e597b1c89c95dd396c26ef2d856..19fe592669ebbdf889af2cfdef6736d3f4953acd 100644 (file)
@@ -55,25 +55,25 @@ struct grub_extcmd_context
 };
 typedef struct grub_extcmd_context *grub_extcmd_context_t;
 
-grub_extcmd_t grub_register_extcmd (const char *name,
-                                   grub_extcmd_func_t func,
-                                   grub_command_flags_t flags,
-                                   const char *summary,
-                                   const char *description,
-                                   const struct grub_arg_option *parser);
-
-grub_extcmd_t grub_register_extcmd_prio (const char *name,
-                                        grub_extcmd_func_t func,
-                                        grub_command_flags_t flags,
-                                        const char *summary,
-                                        const char *description,
-                                        const struct grub_arg_option *parser,
-                                        int prio);
-
-void grub_unregister_extcmd (grub_extcmd_t cmd);
-
-grub_err_t
-grub_extcmd_dispatcher (struct grub_command *cmd, int argc, char **args,
-                       struct grub_script *script);
+grub_extcmd_t EXPORT_FUNC(grub_register_extcmd) (const char *name,
+                                                grub_extcmd_func_t func,
+                                                grub_command_flags_t flags,
+                                                const char *summary,
+                                                const char *description,
+                                                const struct grub_arg_option *parser);
+
+grub_extcmd_t EXPORT_FUNC(grub_register_extcmd_prio) (const char *name,
+                                                     grub_extcmd_func_t func,
+                                                     grub_command_flags_t flags,
+                                                     const char *summary,
+                                                     const char *description,
+                                                     const struct grub_arg_option *parser,
+                                                     int prio);
+
+void EXPORT_FUNC(grub_unregister_extcmd) (grub_extcmd_t cmd);
+
+grub_err_t EXPORT_FUNC(grub_extcmd_dispatcher) (struct grub_command *cmd,
+                                               int argc, char **args,
+                                               struct grub_script *script);
 
 #endif /* ! GRUB_EXTCMD_HEADER */
index 3bab277816560fbf6096385525c5888d68f5f209..b61f6f30e98591d13dcf646d3af6a565dc26a83e 100644 (file)
@@ -72,7 +72,7 @@ struct grub_extcmd;
 int grub_arg_parse (struct grub_extcmd *cmd, int argc, char **argv,
                    struct grub_arg_list *usr, char ***args, int *argnum);
 
-void grub_arg_show_help (struct grub_extcmd *cmd);
+void EXPORT_FUNC(grub_arg_show_help) (struct grub_extcmd *cmd);
 struct grub_arg_list* grub_arg_list_alloc (struct grub_extcmd *cmd,
                                           int argc, char *argv[]);