]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2010-01-14 Robert Millan <rmh.grub@aybabtu.com>
authorRobert Millan <rmh@aybabtu.com>
Thu, 14 Jan 2010 21:08:31 +0000 (21:08 +0000)
committerRobert Millan <rmh@aybabtu.com>
Thu, 14 Jan 2010 21:08:31 +0000 (21:08 +0000)
* include/grub/i386/loader.h (grub_linux16_boot): Renamed to ...
(grub_linux16_real_boot): ... this.
* kern/i386/loader.S: Likewise.
* loader/i386/pc/linux.c: Include `<grub/video.h>' and `<grub/mm.h>'.
(grub_linux16_boot): New function.  Switches to text mode and calls
grub_linux16_real_boot().

* loader/i386/bsd.c: Include `<grub/video.h>'.
(grub_freebsd_boot, grub_openbsd_boot, grub_netbsd_boot): Switch to
text mode before calling grub_unix_real_boot().

* loader/i386/multiboot.c: Include `<grub/video.h>'.
(grub_multiboot_boot): Switch to text mode before calling
grub_relocator32_boot().

* loader/i386/pc/chainloader.c: Include `<grub/video.h>'.
(grub_chainloader_boot): Switch to text mode before calling
grub_chainloader_real_boot().

ChangeLog
include/grub/i386/loader.h
kern/i386/loader.S
loader/i386/bsd.c
loader/i386/multiboot.c
loader/i386/pc/chainloader.c
loader/i386/pc/linux.c

index 0fa70ecf622c2921f12e26c25fbbabac346f043b..652cc145a34ec698483c000e3ff4343f3b70a27d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2010-01-14  Robert Millan  <rmh.grub@aybabtu.com>
+
+       * include/grub/i386/loader.h (grub_linux16_boot): Renamed to ...
+       (grub_linux16_real_boot): ... this.
+       * kern/i386/loader.S: Likewise.
+       * loader/i386/pc/linux.c: Include `<grub/video.h>' and `<grub/mm.h>'.
+       (grub_linux16_boot): New function.  Switches to text mode and calls
+       grub_linux16_real_boot().
+
+       * loader/i386/bsd.c: Include `<grub/video.h>'.
+       (grub_freebsd_boot, grub_openbsd_boot, grub_netbsd_boot): Switch to
+       text mode before calling grub_unix_real_boot().
+
+       * loader/i386/multiboot.c: Include `<grub/video.h>'.
+       (grub_multiboot_boot): Switch to text mode before calling
+       grub_relocator32_boot().
+
+       * loader/i386/pc/chainloader.c: Include `<grub/video.h>'.
+       (grub_chainloader_boot): Switch to text mode before calling
+       grub_chainloader_real_boot().
+
 2010-01-05  Jordan Uggla  <jordan.uggla@gmail.com>
 2010-01-05  Colin Watson  <cjwatson@ubuntu.com>
 
index 0df5f757f8c4189e994578f653bc5f07ccfc704e..05954b6db7386db05371b2f6701dfc2bbb199c8d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2002,2003,2004,2007,2008,2009  Free Software Foundation, Inc.
+ *  Copyright (C) 2002,2003,2004,2007,2008,2009,2010  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
@@ -31,7 +31,7 @@ extern grub_uint32_t EXPORT_VAR(grub_linux_prot_size);
 extern char *EXPORT_VAR(grub_linux_tmp_addr);
 extern char *EXPORT_VAR(grub_linux_real_addr);
 extern grub_int32_t EXPORT_VAR(grub_linux_is_bzimage);
-grub_err_t EXPORT_FUNC(grub_linux16_boot) (void);
+grub_err_t EXPORT_FUNC(grub_linux16_real_boot) (void);
 #endif
 
 #endif /* ! GRUB_LOADER_CPU_HEADER */
index 3e9c713273e524bc06caf0439aca75b480f4c61e..ed57c43ca36ab3f1764d3b0b8f18d41d5ff6cad9 100644 (file)
@@ -59,7 +59,7 @@ VARIABLE(grub_linux_real_addr)
 VARIABLE(grub_linux_is_bzimage)
        .long   0
 
-FUNCTION(grub_linux16_boot)
+FUNCTION(grub_linux16_real_boot)
        /* Must be done before zImage copy.  */
        call    EXT_C(grub_dl_unload_all)
 
index 0785a3fc103758d8815c01f88a7f717945c75c40..49be758c64e4812c2fbfbd82391f95dfca3f93b1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2008, 2009  Free Software Foundation, Inc.
+ *  Copyright (C) 2008,2009,2010  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
@@ -35,7 +35,7 @@
 #include <grub/command.h>
 #include <grub/extcmd.h>
 #include <grub/i18n.h>
-
+#include <grub/video.h>
 #ifdef GRUB_MACHINE_PCBIOS
 #include <grub/machine/biosnum.h>
 #endif
@@ -509,6 +509,8 @@ grub_freebsd_boot (void)
 
   bi.bi_kernend = kern_end;
 
+  grub_video_set_mode ("text", NULL);
+
   if (is_64bit)
     {
       grub_uint32_t *gdt;
@@ -617,6 +619,8 @@ grub_openbsd_boot (void)
   pa->ba_type = OPENBSD_BOOTARG_END;
   pa++;
 
+  grub_video_set_mode ("text", NULL);
+
   grub_unix_real_boot (entry, bootflags, openbsd_root, OPENBSD_BOOTARG_APIVER,
                       0, (grub_uint32_t) (grub_mmap_get_upper () >> 10),
                       (grub_uint32_t) (grub_mmap_get_lower () >> 10),
@@ -713,6 +717,8 @@ grub_netbsd_boot (void)
       bootinfo->bi_data[0] = mmap;
     }
 
+  grub_video_set_mode ("text", NULL);
+
   grub_unix_real_boot (entry, bootflags, 0, bootinfo,
                       0, (grub_uint32_t) (grub_mmap_get_upper () >> 10),
                       (grub_uint32_t) (grub_mmap_get_lower () >> 10));
index 5dc30411777868209c962a33a3425d0b2c1c0aa0..4360e8a2cb58b67be3ce0d8d9991645de90ac248 100644 (file)
@@ -1,7 +1,7 @@
 /* multiboot.c - boot a multiboot OS image. */
 /*
  *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2007,2008,2009  Free Software Foundation, Inc.
+ *  Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2007,2008,2009,2010  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
@@ -46,6 +46,7 @@
 #include <grub/gzio.h>
 #include <grub/env.h>
 #include <grub/i386/relocator.h>
+#include <grub/video.h>
 
 extern grub_dl_t my_mod;
 static grub_size_t code_size, alloc_mbi;
@@ -89,6 +90,8 @@ grub_multiboot_boot (void)
   if (err)
     return err;
 
+  grub_video_set_mode ("text", NULL);
+
   grub_relocator32_boot (grub_multiboot_payload_orig,
                         grub_multiboot_payload_dest,
                         state);
index 81cfddac1ef0fc4ceaaac8530d24f057bb6df5b4..e28a4e7f9d6e4bcbfc90a1d7cf6f138ad72deeb1 100644 (file)
@@ -1,7 +1,7 @@
 /* chainloader.c - boot another boot loader */
 /*
  *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2002,2004,2007,2009  Free Software Foundation, Inc.
+ *  Copyright (C) 2002,2004,2007,2009,2010  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
@@ -33,6 +33,7 @@
 #include <grub/command.h>
 #include <grub/machine/biosnum.h>
 #include <grub/i18n.h>
+#include <grub/video.h>
 
 static grub_dl_t my_mod;
 static int boot_drive;
@@ -41,6 +42,7 @@ static void *boot_part_addr;
 static grub_err_t
 grub_chainloader_boot (void)
 {
+  grub_video_set_mode ("text", NULL);
   grub_chainloader_real_boot (boot_drive, boot_part_addr);
 
   /* Never reach here.  */
index 24bb395555e1381ebf453812c1768d0cc097627b..96973adb9037cfe078d8175e32df94c45c0db8e9 100644 (file)
@@ -1,7 +1,7 @@
 /* linux.c - boot Linux zImage or bzImage */
 /*
  *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2007,2008,2009  Free Software Foundation, Inc.
+ *  Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2007,2008,2009,2010  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
@@ -31,6 +31,8 @@
 #include <grub/cpu/linux.h>
 #include <grub/command.h>
 #include <grub/i18n.h>
+#include <grub/mm.h>
+#include <grub/video.h>
 
 #define GRUB_LINUX_CL_OFFSET           0x9000
 #define GRUB_LINUX_CL_END_OFFSET       0x90FF
@@ -48,6 +50,16 @@ grub_linux_unload (void)
   return GRUB_ERR_NONE;
 }
 
+static grub_err_t
+grub_linux16_boot (void)
+{
+  grub_video_set_mode ("text", NULL);
+  grub_linux16_real_boot ();
+
+  /* Not reached.  */
+  return GRUB_ERR_NONE;
+}
+
 static grub_err_t
 grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
                int argc, char *argv[])