Update to grub-2.02~beta2

Signed-off-by: Peter Jones <pjones@redhat.com>
This commit is contained in:
Peter Jones 2014-01-06 11:39:16 -05:00
parent bf3e4ac5cb
commit 481bf3bbf7
495 changed files with 494 additions and 169250 deletions

View File

@ -1,612 +0,0 @@
From 8c5886df17cdfb148d4e17bddf38143ed65fe674 Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Thu, 28 Jun 2012 15:27:54 +0200
Subject: [PATCH 001/482] Add monochrome text support (mda_text, aka
`hercules' in grub-legacy).
* grub-core/Makefile.core.def (mda_text): New module.
* grub-core/lib/legacy_parse.c (grub_legacy_parse): Support `hercules'.
* grub-core/term/i386/vga_common.c (grub_console_cur_color): Moved to ..
* grub-core/term/i386/pc/vga_text.c (cur_color): ... here
* grub-core/term/i386/pc/console.c (grub_console_cur_color): ... and
here.
* grub-core/term/i386/vga_common.c (grub_console_getwh): Moved to ..
* grub-core/term/i386/pc/vga_text.c (grub_console_getwh): ... here
* grub-core/term/i386/pc/console.c (grub_console_getwh): ... and
here.
* grub-core/term/i386/vga_common.c (grub_console_setcolorstate): Moved
to ..
* grub-core/term/i386/pc/vga_text.c (grub_console_setcolorstate):
... here
* grub-core/term/i386/pc/console.c (grub_console_setcolorstate): ... and
here.
* grub-core/term/i386/vga_common.c: Removed.
* include/grub/i386/vga_common.h: Likewise.
* include/grub/vga.h (grub_vga_cr_bw_write): New function.
(grub_vga_cr_bw_read): Likewise.
* include/grub/vgaregs.h (GRUB_VGA_IO_CR_BW_INDEX): New enum value.
(GRUB_VGA_IO_CR_BW_DATA): Likewise.
* grub-core/term/i386/pc/vga_text.c [MODE_MDA]: Call
grub_vga_cr_bw_read/grub_vga_cr_bw_write instead of
grub_vga_cr_read/grub_vga_cr_write.
(grub_vga_text_setcolorstate) [MODE_MDA]: Ignore color.
---
ChangeLog | 31 +++++++++
grub-core/Makefile.core.def | 12 ++--
grub-core/lib/legacy_parse.c | 15 ++--
grub-core/term/i386/pc/console.c | 27 ++++++++
grub-core/term/i386/pc/vga_text.c | 141 +++++++++++++++++++++++++++++++++-----
grub-core/term/i386/vga_common.c | 48 -------------
include/grub/i386/pc/console.h | 1 -
include/grub/i386/vga_common.h | 32 ---------
include/grub/vga.h | 14 ++++
include/grub/vgaregs.h | 2 +
10 files changed, 213 insertions(+), 110 deletions(-)
delete mode 100644 grub-core/term/i386/vga_common.c
delete mode 100644 include/grub/i386/vga_common.h
diff --git a/ChangeLog b/ChangeLog
index 81bdae9..f6e864a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,34 @@
+2012-06-28 Vladimir Serbinenko <phcoder@gmail.com>
+
+ Add monochrome text support (mda_text, aka `hercules' in grub-legacy).
+
+ * grub-core/Makefile.core.def (mda_text): New module.
+ * grub-core/lib/legacy_parse.c (grub_legacy_parse): Support `hercules'.
+ * grub-core/term/i386/vga_common.c (grub_console_cur_color): Moved to ..
+ * grub-core/term/i386/pc/vga_text.c (cur_color): ... here
+ * grub-core/term/i386/pc/console.c (grub_console_cur_color): ... and
+ here.
+ * grub-core/term/i386/vga_common.c (grub_console_getwh): Moved to ..
+ * grub-core/term/i386/pc/vga_text.c (grub_console_getwh): ... here
+ * grub-core/term/i386/pc/console.c (grub_console_getwh): ... and
+ here.
+ * grub-core/term/i386/vga_common.c (grub_console_setcolorstate): Moved
+ to ..
+ * grub-core/term/i386/pc/vga_text.c (grub_console_setcolorstate):
+ ... here
+ * grub-core/term/i386/pc/console.c (grub_console_setcolorstate): ... and
+ here.
+ * grub-core/term/i386/vga_common.c: Removed.
+ * include/grub/i386/vga_common.h: Likewise.
+ * include/grub/vga.h (grub_vga_cr_bw_write): New function.
+ (grub_vga_cr_bw_read): Likewise.
+ * include/grub/vgaregs.h (GRUB_VGA_IO_CR_BW_INDEX): New enum value.
+ (GRUB_VGA_IO_CR_BW_DATA): Likewise.
+ * grub-core/term/i386/pc/vga_text.c [MODE_MDA]: Call
+ grub_vga_cr_bw_read/grub_vga_cr_bw_write instead of
+ grub_vga_cr_read/grub_vga_cr_write.
+ (grub_vga_text_setcolorstate) [MODE_MDA]: Ignore color.
+
2012-06-27 Vladimir Serbinenko <phcoder@gmail.com>
* configure.ac: Bump version to 2.00.
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index 39e77a4..5c2fcc2 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -123,9 +123,6 @@ kernel = {
i386_coreboot_multiboot_qemu = kern/i386/coreboot/init.c;
i386_coreboot_multiboot_qemu = term/i386/pc/vga_text.c;
- i386_coreboot_multiboot_qemu = term/i386/vga_common.c;
- i386_pc = term/i386/vga_common.c;
-
x86 = kern/i386/pit.c;
efi = disk/efi/efidisk.c;
@@ -175,7 +172,6 @@ kernel = {
mips_qemu_mips = term/at_keyboard.c;
mips_qemu_mips = commands/keylayouts.c;
mips_qemu_mips = term/i386/pc/vga_text.c;
- mips_qemu_mips = term/i386/vga_common.c;
mips_qemu_mips = kern/vga_init.c;
mips_arc = kern/mips/arc/init.c;
@@ -1591,11 +1587,17 @@ module = {
module = {
name = vga_text;
common = term/i386/pc/vga_text.c;
- common = term/i386/vga_common.c;
enable = i386_pc;
};
module = {
+ name = mda_text;
+ common = term/i386/pc/mda_text.c;
+ enable = i386_pc;
+ enable = i386_coreboot_multiboot_qemu;
+};
+
+module = {
name = video_cirrus;
x86 = video/cirrus.c;
enable = x86;
diff --git a/grub-core/lib/legacy_parse.c b/grub-core/lib/legacy_parse.c
index 775eaad..14768b8 100644
--- a/grub-core/lib/legacy_parse.c
+++ b/grub-core/lib/legacy_parse.c
@@ -1,6 +1,6 @@
/*
* GRUB -- GRand Unified Bootloader
- * Copyright (C) 1999,2000,2001,2002,2003,2004,2010 Free Software Foundation, Inc.
+ * Copyright (C) 1999,2000,2001,2002,2003,2004,2010,2012 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
@@ -290,7 +290,7 @@ static struct legacy_command legacy_commands[] =
" default values are COM1, 9600, 8N1."},
/* FIXME: setkey unsupported. */ /* NUL_TERMINATE */
/* NOTE: setup unsupported. */
- /* FIXME: --no-echo, --no-edit, hercules unsupported. */
+ /* FIXME: --no-echo, --no-edit unsupported. */
/* NOTE: both terminals are activated so --silent and --timeout
are useless. */
{"terminal", NULL, NULL, 0, 0, {}, FLAG_TERMINAL | FLAG_IGNORE_REST,
@@ -507,8 +507,8 @@ grub_legacy_parse (const char *buf, char **entryname, char **suffix)
int dumb = 0, lines = 24;
#ifdef TODO
int no_echo = 0, no_edit = 0;
- int hercules = 0;
#endif
+ int hercules = 0;
int console = 0, serial = 0;
/* Big enough for any possible resulting command. */
char outbuf[256] = "";
@@ -541,10 +541,8 @@ grub_legacy_parse (const char *buf, char **entryname, char **suffix)
if (grub_memcmp (ptr, "serial", sizeof ("serial") - 1) == 0)
serial = 1;
-#ifdef TODO
if (grub_memcmp (ptr, "hercules", sizeof ("hercules") - 1) == 0)
hercules = 1;
-#endif
while (*ptr && !grub_isspace (*ptr))
ptr++;
while (*ptr && grub_isspace (*ptr))
@@ -561,7 +559,7 @@ grub_legacy_parse (const char *buf, char **entryname, char **suffix)
grub_strcpy (outptr, "serial ");
outptr += grub_strlen (outptr);
}
- if (console)
+ if (console || hercules)
{
grub_strcpy (outptr, "console ");
outptr += grub_strlen (outptr);
@@ -578,6 +576,11 @@ grub_legacy_parse (const char *buf, char **entryname, char **suffix)
grub_strcpy (outptr, "console ");
outptr += grub_strlen (outptr);
}
+ if (hercules)
+ {
+ grub_strcpy (outptr, "mda_text ");
+ outptr += grub_strlen (outptr);
+ }
grub_strcpy (outptr, "; ");
outptr += grub_strlen (outptr);
if (serial)
diff --git a/grub-core/term/i386/pc/console.c b/grub-core/term/i386/pc/console.c
index 7cf5ffc..a681435 100644
--- a/grub-core/term/i386/pc/console.c
+++ b/grub-core/term/i386/pc/console.c
@@ -22,6 +22,8 @@
#include <grub/types.h>
#include <grub/machine/int.h>
+static grub_uint8_t grub_console_cur_color = 0x7;
+
static void
int10_9 (grub_uint8_t ch, grub_uint16_t n)
{
@@ -250,6 +252,31 @@ grub_console_getkeystatus (struct grub_term_input *term __attribute__ ((unused))
return bios_data_area->keyboard_flag_lower & ~0x80;
}
+static grub_uint16_t
+grub_console_getwh (struct grub_term_output *term __attribute__ ((unused)))
+{
+ return (80 << 8) | 25;
+}
+
+static void
+grub_console_setcolorstate (struct grub_term_output *term,
+ grub_term_color_state state)
+{
+ switch (state) {
+ case GRUB_TERM_COLOR_STANDARD:
+ grub_console_cur_color = GRUB_TERM_DEFAULT_STANDARD_COLOR & 0x7f;
+ break;
+ case GRUB_TERM_COLOR_NORMAL:
+ grub_console_cur_color = term->normal_color & 0x7f;
+ break;
+ case GRUB_TERM_COLOR_HIGHLIGHT:
+ grub_console_cur_color = term->highlight_color & 0x7f;
+ break;
+ default:
+ break;
+ }
+}
+
static struct grub_term_input grub_console_term_input =
{
.name = "console",
diff --git a/grub-core/term/i386/pc/vga_text.c b/grub-core/term/i386/pc/vga_text.c
index c934c68..d1e4ef9 100644
--- a/grub-core/term/i386/pc/vga_text.c
+++ b/grub-core/term/i386/pc/vga_text.c
@@ -17,10 +17,17 @@
*/
#include <grub/dl.h>
-#include <grub/i386/vga_common.h>
#include <grub/cpu/io.h>
#include <grub/types.h>
#include <grub/vga.h>
+#include <grub/term.h>
+
+/* MODESET is used for testing to force monochrome or colour mode.
+ You shouldn't use mda_text on vga.
+ */
+#ifdef MODESET
+#include <grub/machine/int.h>
+#endif
#if defined (GRUB_MACHINE_COREBOOT) || defined (GRUB_MACHINE_QEMU) || defined (GRUB_MACHINE_MIPS_QEMU_MIPS) || defined (GRUB_MACHINE_MULTIBOOT)
#include <grub/machine/console.h>
@@ -35,10 +42,21 @@ static int grub_curr_x, grub_curr_y;
#ifdef __mips__
#define VGA_TEXT_SCREEN ((grub_uint16_t *) 0xb00b8000)
+#define cr_read grub_vga_cr_read
+#define cr_write grub_vga_cr_write
+#elif defined (MODE_MDA)
+#define VGA_TEXT_SCREEN ((grub_uint16_t *) 0xb0000)
+#define cr_read grub_vga_cr_bw_read
+#define cr_write grub_vga_cr_bw_write
+static grub_uint8_t cur_color;
#else
#define VGA_TEXT_SCREEN ((grub_uint16_t *) 0xb8000)
+#define cr_read grub_vga_cr_read
+#define cr_write grub_vga_cr_write
#endif
+static grub_uint8_t cur_color = 0x7;
+
static void
screen_write_char (int x, int y, short c)
{
@@ -55,8 +73,8 @@ static void
update_cursor (void)
{
unsigned int pos = grub_curr_y * COLS + grub_curr_x;
- grub_vga_cr_write (pos >> 8, GRUB_VGA_CR_CURSOR_ADDR_HIGH);
- grub_vga_cr_write (pos & 0xFF, GRUB_VGA_CR_CURSOR_ADDR_LOW);
+ cr_write (pos >> 8, GRUB_VGA_CR_CURSOR_ADDR_HIGH);
+ cr_write (pos & 0xFF, GRUB_VGA_CR_CURSOR_ADDR_LOW);
}
static void
@@ -72,7 +90,7 @@ inc_y (void)
for (x = 0; x < COLS; x++)
screen_write_char (x, y, screen_read_char (x, y + 1));
for (x = 0; x < COLS; x++)
- screen_write_char (x, ROWS - 1, ' ' | (grub_console_cur_color << 8));
+ screen_write_char (x, ROWS - 1, ' ' | (cur_color << 8));
}
}
@@ -103,7 +121,7 @@ grub_vga_text_putchar (struct grub_term_output *term __attribute__ ((unused)),
break;
default:
screen_write_char (grub_curr_x, grub_curr_y,
- c->base | (grub_console_cur_color << 8));
+ c->base | (cur_color << 8));
inc_x ();
}
@@ -130,7 +148,7 @@ grub_vga_text_cls (struct grub_term_output *term)
{
int i;
for (i = 0; i < ROWS * COLS; i++)
- VGA_TEXT_SCREEN[i] = grub_cpu_to_le16 (' ' | (grub_console_cur_color << 8));
+ VGA_TEXT_SCREEN[i] = grub_cpu_to_le16 (' ' | (cur_color << 8));
grub_vga_text_gotoxy (term, 0, 0);
}
@@ -139,49 +157,136 @@ grub_vga_text_setcursor (struct grub_term_output *term __attribute__ ((unused)),
int on)
{
grub_uint8_t old;
- old = grub_vga_cr_read (GRUB_VGA_CR_CURSOR_START);
+ old = cr_read (GRUB_VGA_CR_CURSOR_START);
if (on)
- grub_vga_cr_write (old & ~GRUB_VGA_CR_CURSOR_START_DISABLE,
- GRUB_VGA_CR_CURSOR_START);
+ cr_write (old & ~GRUB_VGA_CR_CURSOR_START_DISABLE,
+ GRUB_VGA_CR_CURSOR_START);
else
- grub_vga_cr_write (old | GRUB_VGA_CR_CURSOR_START_DISABLE,
- GRUB_VGA_CR_CURSOR_START);
+ cr_write (old | GRUB_VGA_CR_CURSOR_START_DISABLE,
+ GRUB_VGA_CR_CURSOR_START);
}
static grub_err_t
-grub_vga_text_init_fini (struct grub_term_output *term)
+grub_vga_text_init (struct grub_term_output *term)
{
+#ifdef MODESET
+ struct grub_bios_int_registers regs;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+
+#ifdef MODE_MDA
+ regs.eax = 7;
+#else
+ regs.eax = 3;
+#endif
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x10, &regs);
+#endif
grub_vga_text_cls (term);
return 0;
}
+static grub_err_t
+grub_vga_text_fini (struct grub_term_output *term)
+{
+#ifdef MODESET
+ struct grub_bios_int_registers regs;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+
+ regs.eax = 3;
+ regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
+ grub_bios_interrupt (0x10, &regs);
+#endif
+ grub_vga_text_cls (term);
+ return 0;
+}
+
+static grub_uint16_t
+grub_vga_text_getwh (struct grub_term_output *term __attribute__ ((unused)))
+{
+ return (80 << 8) | 25;
+}
+
+#ifndef MODE_MDA
+
+static void
+grub_vga_text_setcolorstate (struct grub_term_output *term,
+ grub_term_color_state state)
+{
+ switch (state) {
+ case GRUB_TERM_COLOR_STANDARD:
+ cur_color = GRUB_TERM_DEFAULT_STANDARD_COLOR & 0x7f;
+ break;
+ case GRUB_TERM_COLOR_NORMAL:
+ cur_color = term->normal_color & 0x7f;
+ break;
+ case GRUB_TERM_COLOR_HIGHLIGHT:
+ cur_color = term->highlight_color & 0x7f;
+ break;
+ default:
+ break;
+ }
+}
+
+#else
+static void
+grub_vga_text_setcolorstate (struct grub_term_output *term __attribute__ ((unused)),
+ grub_term_color_state state)
+{
+ switch (state) {
+ case GRUB_TERM_COLOR_STANDARD:
+ cur_color = 0x07;
+ break;
+ case GRUB_TERM_COLOR_NORMAL:
+ cur_color = 0x07;
+ break;
+ case GRUB_TERM_COLOR_HIGHLIGHT:
+ cur_color = 0x70;
+ break;
+ default:
+ break;
+ }
+}
+#endif
+
static struct grub_term_output grub_vga_text_term =
{
+#ifdef MODE_MDA
+ .name = "mda_text",
+#else
.name = "vga_text",
- .init = grub_vga_text_init_fini,
- .fini = grub_vga_text_init_fini,
+#endif
+ .init = grub_vga_text_init,
+ .fini = grub_vga_text_fini,
.putchar = grub_vga_text_putchar,
- .getwh = grub_console_getwh,
+ .getwh = grub_vga_text_getwh,
.getxy = grub_vga_text_getxy,
.gotoxy = grub_vga_text_gotoxy,
.cls = grub_vga_text_cls,
- .setcolorstate = grub_console_setcolorstate,
+ .setcolorstate = grub_vga_text_setcolorstate,
.setcursor = grub_vga_text_setcursor,
.flags = GRUB_TERM_CODE_TYPE_CP437,
.normal_color = GRUB_TERM_DEFAULT_NORMAL_COLOR,
.highlight_color = GRUB_TERM_DEFAULT_HIGHLIGHT_COLOR,
};
-#if defined (GRUB_MACHINE_COREBOOT) || defined (GRUB_MACHINE_QEMU) || defined (GRUB_MACHINE_MIPS_QEMU_MIPS) || defined (GRUB_MACHINE_MULTIBOOT)
+#ifdef MODE_MDA
+GRUB_MOD_INIT(mda_text)
+#elif defined (GRUB_MACHINE_COREBOOT) || defined (GRUB_MACHINE_QEMU) || defined (GRUB_MACHINE_MIPS_QEMU_MIPS) || defined (GRUB_MACHINE_MULTIBOOT)
void grub_vga_text_init (void)
#else
GRUB_MOD_INIT(vga_text)
#endif
{
+#ifdef MODE_MDA
+ grub_term_register_output ("mda_text", &grub_vga_text_term);
+#else
grub_term_register_output ("vga_text", &grub_vga_text_term);
+#endif
}
-#if defined (GRUB_MACHINE_COREBOOT) || defined (GRUB_MACHINE_QEMU) || defined (GRUB_MACHINE_MIPS_QEMU_MIPS) || defined (GRUB_MACHINE_MULTIBOOT)
+#ifdef MODE_MDA
+GRUB_MOD_FINI(mda_text)
+#elif defined (GRUB_MACHINE_COREBOOT) || defined (GRUB_MACHINE_QEMU) || defined (GRUB_MACHINE_MIPS_QEMU_MIPS) || defined (GRUB_MACHINE_MULTIBOOT)
void grub_vga_text_fini (void)
#else
GRUB_MOD_FINI(vga_text)
diff --git a/grub-core/term/i386/vga_common.c b/grub-core/term/i386/vga_common.c
deleted file mode 100644
index 0c21769..0000000
--- a/grub-core/term/i386/vga_common.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * GRUB -- GRand Unified Bootloader
- * Copyright (C) 2002,2003,2005,2007,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/>.
- */
-
-#include <grub/i386/vga_common.h>
-#include <grub/term.h>
-#include <grub/types.h>
-
-grub_uint8_t grub_console_cur_color = 0x7;
-
-grub_uint16_t
-grub_console_getwh (struct grub_term_output *term __attribute__ ((unused)))
-{
- return (80 << 8) | 25;
-}
-
-void
-grub_console_setcolorstate (struct grub_term_output *term,
- grub_term_color_state state)
-{
- switch (state) {
- case GRUB_TERM_COLOR_STANDARD:
- grub_console_cur_color = GRUB_TERM_DEFAULT_STANDARD_COLOR & 0x7f;
- break;
- case GRUB_TERM_COLOR_NORMAL:
- grub_console_cur_color = term->normal_color & 0x7f;
- break;
- case GRUB_TERM_COLOR_HIGHLIGHT:
- grub_console_cur_color = term->highlight_color & 0x7f;
- break;
- default:
- break;
- }
-}
diff --git a/include/grub/i386/pc/console.h b/include/grub/i386/pc/console.h
index f752b9a..191964f 100644
--- a/include/grub/i386/pc/console.h
+++ b/include/grub/i386/pc/console.h
@@ -24,7 +24,6 @@
#include <grub/types.h>
#include <grub/symbol.h>
#include <grub/term.h>
-#include <grub/i386/vga_common.h>
/* Initialize the console system. */
void grub_console_init (void);
diff --git a/include/grub/i386/vga_common.h b/include/grub/i386/vga_common.h
deleted file mode 100644
index 8727903..0000000
--- a/include/grub/i386/vga_common.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * GRUB -- GRand Unified Bootloader
- * Copyright (C) 2002,2005,2007,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_VGA_COMMON_CPU_HEADER
-#define GRUB_VGA_COMMON_CPU_HEADER 1
-
-#include <grub/types.h>
-#include <grub/symbol.h>
-#include <grub/term.h>
-
-extern grub_uint8_t grub_console_cur_color;
-
-grub_uint16_t grub_console_getwh (struct grub_term_output *term);
-void grub_console_setcolorstate (struct grub_term_output *term,
- grub_term_color_state state);
-
-#endif /* ! GRUB_VGA_COMMON_CPU_HEADER */
diff --git a/include/grub/vga.h b/include/grub/vga.h
index 81d40a1..1d8449c 100644
--- a/include/grub/vga.h
+++ b/include/grub/vga.h
@@ -57,6 +57,20 @@ grub_vga_cr_read (grub_uint8_t addr)
}
static inline void
+grub_vga_cr_bw_write (grub_uint8_t val, grub_uint8_t addr)
+{
+ grub_outb (addr, GRUB_MACHINE_PCI_IO_BASE + GRUB_VGA_IO_CR_BW_INDEX);
+ grub_outb (val, GRUB_MACHINE_PCI_IO_BASE + GRUB_VGA_IO_CR_BW_DATA);
+}
+
+static inline grub_uint8_t
+grub_vga_cr_bw_read (grub_uint8_t addr)
+{
+ grub_outb (addr, GRUB_MACHINE_PCI_IO_BASE + GRUB_VGA_IO_CR_BW_INDEX);
+ return grub_inb (GRUB_MACHINE_PCI_IO_BASE + GRUB_VGA_IO_CR_BW_DATA);
+}
+
+static inline void
grub_vga_sr_write (grub_uint8_t val, grub_uint8_t addr)
{
grub_outb (addr, GRUB_MACHINE_PCI_IO_BASE + GRUB_VGA_IO_SR_INDEX);
diff --git a/include/grub/vgaregs.h b/include/grub/vgaregs.h
index a7b13ee..1a666a1 100644
--- a/include/grub/vgaregs.h
+++ b/include/grub/vgaregs.h
@@ -26,6 +26,8 @@
enum
{
+ GRUB_VGA_IO_CR_BW_INDEX = 0x3b4,
+ GRUB_VGA_IO_CR_BW_DATA = 0x3b5,
GRUB_VGA_IO_ARX = 0x3c0,
GRUB_VGA_IO_ARX_READ = 0x3c1,
GRUB_VGA_IO_MISC_WRITE = 0x3c2,
--
1.8.2.1

View File

@ -1,7 +1,7 @@
From 6605a6cdb0f92ddd2ed2bcd6ae55bd3b19d0d9c7 Mon Sep 17 00:00:00 2001
From be4a014a8024153e201eb1f79069ec1584001305 Mon Sep 17 00:00:00 2001
From: Mark Hamzy <hamzy@us.ibm.com>
Date: Wed, 28 Mar 2012 14:46:41 -0500
Subject: [PATCH 443/482] Migrate PPC from Yaboot to Grub2
Subject: [PATCH 01/37] Migrate PPC from Yaboot to Grub2
Add configuration support for serial terminal consoles. This will set the
maximum screen size so that text is not overwritten.
@ -12,10 +12,10 @@ maximum screen size so that text is not overwritten.
create mode 100644 util/grub.d/20_ppc_terminfo.in
diff --git a/Makefile.util.def b/Makefile.util.def
index dc621db..4614705 100644
index 985e76c..b88ce42 100644
--- a/Makefile.util.def
+++ b/Makefile.util.def
@@ -444,6 +444,13 @@ script = {
@@ -485,6 +485,13 @@ script = {
};
script = {
@ -150,5 +150,5 @@ index 0000000..10d6658
+ terminfo -g ${X}x${Y} ${TERMINAL}
+EOF
--
1.8.2.1
1.8.4.2

View File

@ -1,7 +1,7 @@
From dfb57206eb4beaa16b99e3dc69221d351b29c7c3 Mon Sep 17 00:00:00 2001
From 6759845abe79871a4241041915b56f617679e0b5 Mon Sep 17 00:00:00 2001
From: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
Date: Wed, 19 Sep 2012 21:22:55 -0300
Subject: [PATCH 444/482] Add fw_path variable (revised)
Subject: [PATCH 02/37] Add fw_path variable (revised)
This patch makes grub look for its config file on efi where the app was
found. It was originally written by Matthew Garrett, and adapted to fix the
@ -9,49 +9,42 @@ found. It was originally written by Matthew Garrett, and adapted to fix the
https://bugzilla.redhat.com/show_bug.cgi?id=857936
---
grub-core/kern/main.c | 16 ++++++++++++++--
grub-core/kern/main.c | 13 ++++++-------
grub-core/normal/main.c | 25 ++++++++++++++++++++++++-
2 files changed, 38 insertions(+), 3 deletions(-)
2 files changed, 30 insertions(+), 8 deletions(-)
diff --git a/grub-core/kern/main.c b/grub-core/kern/main.c
index 19dc988..8ab7794 100644
index 9cad0c4..8ab7794 100644
--- a/grub-core/kern/main.c
+++ b/grub-core/kern/main.c
@@ -125,6 +125,20 @@ grub_set_prefix_and_root (void)
@@ -127,16 +127,15 @@ grub_set_prefix_and_root (void)
grub_register_variable_hook ("root", 0, grub_env_write_root);
grub_machine_get_bootlocation (&fwdevice, &fwpath);
+ grub_machine_get_bootlocation (&fwdevice, &fwpath);
+
- if (fwdevice)
+ if (fwdevice && fwpath)
+ {
{
- char *cmdpath;
+ char *fw_path;
+
- cmdpath = grub_xasprintf ("(%s)%s", fwdevice, fwpath ? : "");
- if (cmdpath)
+ fw_path = grub_xasprintf ("(%s)/%s", fwdevice, fwpath);
+ if (fw_path)
+ {
{
- grub_env_set ("cmdpath", cmdpath);
- grub_env_export ("cmdpath");
- grub_free (cmdpath);
+ grub_env_set ("fw_path", fw_path);
+ grub_free (fw_path);
+ }
+ }
+
if (prefix)
{
char *pptr = NULL;
@@ -142,8 +156,6 @@ grub_set_prefix_and_root (void)
if (pptr[0])
path = grub_strdup (pptr);
}
}
- if ((!device || device[0] == ',' || !device[0]) || !path)
- grub_machine_get_bootlocation (&fwdevice, &fwpath);
if (!device && fwdevice)
device = fwdevice;
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
index ffc2cd2..a1d5589 100644
index c36663f..243b9d6 100644
--- a/grub-core/normal/main.c
+++ b/grub-core/normal/main.c
@@ -355,7 +355,30 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
@@ -311,7 +311,30 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
/* Guess the config filename. It is necessary to make CONFIG static,
so that it won't get broken by longjmp. */
char *config;
@ -84,5 +77,5 @@ index ffc2cd2..a1d5589 100644
prefix = grub_env_get ("prefix");
if (prefix)
--
1.8.2.1
1.8.4.2

View File

@ -1,28 +0,0 @@
From ebef39797bef17e7a28678f4b8370e6b63e10cc4 Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Tue, 7 May 2013 20:42:05 +0200
Subject: [PATCH 2/5] * configure.ac: Don't use extended registers on
x86_64. Reported by: Peter Jones.
---
ChangeLog | 5 +++++
configure.ac | 2 ++
2 files changed, 7 insertions(+)
diff --git a/configure.ac b/configure.ac
index 6c310f7..80549b0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -464,7 +464,9 @@ if test "x$target_cpu" = xi386; then
else
TARGET_CFLAGS="$TARGET_CFLAGS -malign-jumps=1 -malign-loops=1 -malign-functions=1"
fi
+fi
+if test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64; then
# Some toolchains enable these features by default, but they need
# registers that aren't set up properly in GRUB.
TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow"
--
1.8.2.1

View File

@ -1,22 +0,0 @@
From d72015266eb5f1cf712db5edec3aa6926447f668 Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Thu, 28 Jun 2012 15:36:48 +0200
Subject: [PATCH 002/482] missing file from last commit
---
grub-core/term/i386/pc/mda_text.c | 3 +++
1 file changed, 3 insertions(+)
create mode 100644 grub-core/term/i386/pc/mda_text.c
diff --git a/grub-core/term/i386/pc/mda_text.c b/grub-core/term/i386/pc/mda_text.c
new file mode 100644
index 0000000..907a36e
--- /dev/null
+++ b/grub-core/term/i386/pc/mda_text.c
@@ -0,0 +1,3 @@
+#define MODE_MDA 1
+#include "vga_text.c"
+
--
1.8.2.1

View File

@ -1,7 +1,7 @@
From 9f8104db535a8d2f9ef42824669431bdd86b3fe8 Mon Sep 17 00:00:00 2001
From c17e307b40695b73fd972a6a4526424e9a591310 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg@redhat.com>
Date: Tue, 10 Jul 2012 11:58:52 -0400
Subject: [PATCH 446/482] Add support for linuxefi
Subject: [PATCH 03/37] Add support for linuxefi
---
grub-core/Makefile.core.def | 8 +
@ -13,10 +13,10 @@ Subject: [PATCH 446/482] Add support for linuxefi
create mode 100644 grub-core/loader/i386/efi/linux.c
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index bb62dce..def6606 100644
index c916246..8c246c6 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -1534,6 +1534,14 @@ module = {
@@ -1706,6 +1706,14 @@ module = {
};
module = {
@ -32,10 +32,10 @@ index bb62dce..def6606 100644
efi = loader/efi/chainloader.c;
i386_pc = loader/i386/pc/chainloader.c;
diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
index 77c9384..025d665 100644
index be37afd..ddeca60 100644
--- a/grub-core/kern/efi/mm.c
+++ b/grub-core/kern/efi/mm.c
@@ -47,6 +47,38 @@ static grub_efi_uintn_t finish_desc_size;
@@ -49,6 +49,38 @@ static grub_efi_uintn_t finish_desc_size;
static grub_efi_uint32_t finish_desc_version;
int grub_efi_is_finished = 0;
@ -466,7 +466,7 @@ index 489cf9e..9370fd5 100644
grub_efi_uintn_t pages);
int
diff --git a/include/grub/i386/linux.h b/include/grub/i386/linux.h
index 9d064c8..c29c5af 100644
index da0ca3b..fc36bda 100644
--- a/include/grub/i386/linux.h
+++ b/include/grub/i386/linux.h
@@ -139,6 +139,7 @@ struct linux_kernel_header
@ -474,9 +474,9 @@ index 9d064c8..c29c5af 100644
grub_uint64_t pref_address;
grub_uint32_t init_size;
+ grub_uint32_t handover_offset;
} __attribute__ ((packed));
} GRUB_PACKED;
/* Boot parameters for Linux based on 2.6.12. This is used by the setup
--
1.8.2.1
1.8.4.2

View File

@ -1,27 +0,0 @@
From 780556c3e1047acbcdfa588980f52c73d9aae89a Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Wed, 8 May 2013 11:01:11 +0200
Subject: [PATCH 3/5] * configure.ac: Don't disable extended registers on
emu.
---
ChangeLog | 4 ++++
configure.ac | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 80549b0..fa0e00a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -466,7 +466,7 @@ if test "x$target_cpu" = xi386; then
fi
fi
-if test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64; then
+if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ) && test "x$platform" != xemu; then
# Some toolchains enable these features by default, but they need
# registers that aren't set up properly in GRUB.
TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow"
--
1.8.2.1

View File

@ -1,58 +0,0 @@
From ec6a8c449294b215a2c4019f42110a0c1f770ac2 Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Mon, 2 Jul 2012 11:14:37 +0200
Subject: [PATCH 003/482] * grub-core/loader/i386/linux.c
(find_efi_mmap_size): Don't decrease efi_mmap_size. Reported by: Stuart
Hayes.
---
ChangeLog | 6 ++++++
grub-core/loader/i386/linux.c | 7 +++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f6e864a..53ad372 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/loader/i386/linux.c (find_efi_mmap_size): Don't decrease
+ efi_mmap_size.
+ Reported by: Stuart Hayes.
+
2012-06-28 Vladimir Serbinenko <phcoder@gmail.com>
Add monochrome text support (mda_text, aka `hercules' in grub-legacy).
diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
index 62087cf..d34b2f8 100644
--- a/grub-core/loader/i386/linux.c
+++ b/grub-core/loader/i386/linux.c
@@ -118,12 +118,13 @@ find_efi_mmap_size (void)
int ret;
grub_efi_memory_descriptor_t *mmap;
grub_efi_uintn_t desc_size;
+ grub_efi_uintn_t cur_mmap_size = mmap_size;
- mmap = grub_malloc (mmap_size);
+ mmap = grub_malloc (cur_mmap_size);
if (! mmap)
return 0;
- ret = grub_efi_get_memory_map (&mmap_size, mmap, 0, &desc_size, 0);
+ ret = grub_efi_get_memory_map (&cur_mmap_size, mmap, 0, &desc_size, 0);
grub_free (mmap);
if (ret < 0)
@@ -134,6 +135,8 @@ find_efi_mmap_size (void)
else if (ret > 0)
break;
+ if (mmap_size < cur_mmap_size)
+ mmap_size = cur_mmap_size;
mmap_size += (1 << 12);
}
--
1.8.2.1

View File

@ -1,33 +1,37 @@
From abd3c20d447a3c3ed28b9e73b59b5862d3eddf2d Mon Sep 17 00:00:00 2001
From d663a99ed928038306d3db96de500bbf258f37cf Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg@redhat.com>
Date: Tue, 10 Jul 2012 11:58:52 -0400
Subject: [PATCH 447/482] Add support for crappy cd craparino
Subject: [PATCH 04/37] Add support for crappy cd craparino
---
grub-core/disk/efi/efidisk.c | 10 ++++++++++
1 file changed, 10 insertions(+)
grub-core/disk/efi/efidisk.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/grub-core/disk/efi/efidisk.c b/grub-core/disk/efi/efidisk.c
index ebd906e..08c303e 100644
index 3b12c34..9aaa01a 100644
--- a/grub-core/disk/efi/efidisk.c
+++ b/grub-core/disk/efi/efidisk.c
@@ -799,6 +799,16 @@ grub_efidisk_get_device_name (grub_efi_handle_t *handle)
@@ -799,6 +799,20 @@ grub_efidisk_get_device_name (grub_efi_handle_t *handle)
if (! ldp)
return 0;
+ if (GRUB_EFI_DEVICE_PATH_TYPE (ldp) == GRUB_EFI_MEDIA_DEVICE_PATH_TYPE &&
+ (GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp) == GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE))
+ {
+ grub_efi_uint8_t length[2];
+ ldp->type = GRUB_EFI_END_DEVICE_PATH_TYPE;
+ ldp->subtype = GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE;
+ ldp->length[0] = 4;
+ ldp->length[1] = 0;
+
+ length[0] = 4;
+ length[1] = 0;
+ grub_memcpy (&ldp->length, length, sizeof(ldp->length));
+
+ ldp = find_last_device_path(dp);
+ }
+
if (GRUB_EFI_DEVICE_PATH_TYPE (ldp) == GRUB_EFI_MEDIA_DEVICE_PATH_TYPE
&& (GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp)
== GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE))
&& (GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp) == GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE
|| GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp) == GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE))
--
1.8.2.1
1.8.4.2

View File

@ -1,48 +0,0 @@
From 5c6c289a6a6c939e7fb3f4a7ba8a737794875a44 Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Wed, 8 May 2013 11:05:37 +0200
Subject: [PATCH 4/5] * conf/Makefile.common: Poison float and double on
non-emu.
---
ChangeLog | 4 ++++
conf/Makefile.common | 5 +++++
util/import_gcry.py | 6 ++++++
3 files changed, 15 insertions(+)
diff --git a/conf/Makefile.common b/conf/Makefile.common
index c185a55..ca1cb17 100644
--- a/conf/Makefile.common
+++ b/conf/Makefile.common
@@ -40,6 +40,11 @@ endif
# Other options
+if ! COND_emu
+CFLAGS_PLATFORM += -Dfloat=__grub_poision
+CFLAGS_PLATFORM += -Ddouble=__grub_poision
+endif
+
CPPFLAGS_DEFAULT = -DGRUB_FILE=\"$(subst $(srcdir)/,,$<)\"
CPPFLAGS_DEFAULT += -I$(builddir)
CPPFLAGS_DEFAULT += -I$(srcdir)
diff --git a/util/import_gcry.py b/util/import_gcry.py
index 18f5253..afa8e69 100644
--- a/util/import_gcry.py
+++ b/util/import_gcry.py
@@ -488,6 +488,12 @@ for src in sorted (os.listdir (os.path.join (indir, "src"))):
fw.close ()
continue
f = codecs.open (infile, "r", "utf-8")
+ if src == "types.h":
+ fw.write (f.read ().replace ("float f;", "").replace ("double g;", ""))
+ f.close ()
+ fw.close ()
+ continue
+
fw.write (f.read ())
f.close ()
fw.close ()
--
1.8.2.1

View File

@ -1,61 +0,0 @@
From d2ccb3209c62de4292107df4207c02ee59dc11a9 Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Mon, 2 Jul 2012 11:19:22 +0200
Subject: [PATCH 004/482] * include/grub/list.h
(FOR_LIST_ELEMENTS_SAFE): New macro. * include/grub/command.h
(FOR_COMMANDS_SAFE): Likewise. * grub-core/commands/help.c
(grub_cmd_help): Use FOR_COMMANDS_SAFE.
---
grub-core/commands/help.c | 5 +++--
include/grub/command.h | 1 +
include/grub/list.h | 1 +
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/grub-core/commands/help.c b/grub-core/commands/help.c
index d64c289..f0be89b 100644
--- a/grub-core/commands/help.c
+++ b/grub-core/commands/help.c
@@ -99,12 +99,13 @@ grub_cmd_help (grub_extcmd_context_t ctxt __attribute__ ((unused)), int argc,
else
{
int i;
- grub_command_t cmd_iter, cmd;
+ grub_command_t cmd_iter, cmd, cmd_next;
for (i = 0; i < argc; i++)
{
currarg = args[i];
- FOR_COMMANDS(cmd_iter)
+
+ FOR_COMMANDS_SAFE (cmd_iter, cmd_next)
{
if (!(cmd_iter->prio & GRUB_COMMAND_FLAG_ACTIVE))
continue;
diff --git a/include/grub/command.h b/include/grub/command.h
index 6d43499..8705a63 100644
--- a/include/grub/command.h
+++ b/include/grub/command.h
@@ -121,6 +121,7 @@ grub_command_execute (const char *name, int argc, char **argv)
}
#define FOR_COMMANDS(var) FOR_LIST_ELEMENTS((var), grub_command_list)
+#define FOR_COMMANDS_SAFE(var, next) FOR_LIST_ELEMENTS_SAFE((var), (next), grub_command_list)
void grub_register_core_commands (void);
diff --git a/include/grub/list.h b/include/grub/list.h
index cadb2d9..6f6dec0 100644
--- a/include/grub/list.h
+++ b/include/grub/list.h
@@ -35,6 +35,7 @@ void EXPORT_FUNC(grub_list_push) (grub_list_t *head, grub_list_t item);
void EXPORT_FUNC(grub_list_remove) (grub_list_t item);
#define FOR_LIST_ELEMENTS(var, list) for ((var) = (list); (var); (var) = (var)->next)
+#define FOR_LIST_ELEMENTS_SAFE(var, nxt, list) for ((var) = (list), (nxt) = ((var) ? (var)->next : 0); (var); (var) = (nxt), (nxt) = (var)->next)
static inline void *
grub_bad_type_cast_real (int line, const char *file)
--
1.8.2.1

View File

@ -1,17 +1,17 @@
From a24ad28eaa52ea635643bf26456d731d18e208d5 Mon Sep 17 00:00:00 2001
From 421ff909d0735ae5b761b7b6707af3b3cdd50603 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Mon, 16 Jul 2012 18:57:11 -0400
Subject: [PATCH 448/482] Use "linuxefi" and "initrdefi" where appropriate.
Subject: [PATCH 05/37] Use "linuxefi" and "initrdefi" where appropriate.
---
util/grub.d/10_linux.in | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 368f609..4807d84 100644
index 00d1931..ad34cc0 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -133,17 +133,31 @@ linux_entry ()
@@ -127,17 +127,31 @@ linux_entry ()
printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
fi
message="$(gettext_printf "Loading Linux %s ..." ${version})"
@ -46,5 +46,5 @@ index 368f609..4807d84 100644
sed "s/^/$submenu_indentation/" << EOF
}
--
1.8.2.1
1.8.4.2

View File

@ -1,47 +0,0 @@
From 21c2f856cbdf4a98d015ed05bb6b9b16c021af9c Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Mon, 2 Jul 2012 11:20:51 +0200
Subject: [PATCH 005/482] * gentpl.py: Make mans depend on
grub-mkconfig_lib.
---
ChangeLog | 10 ++++++++++
gentpl.py | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 53ad372..aaeeb05 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
+ * gentpl.py: Make mans depend on grub-mkconfig_lib.
+
+2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * include/grub/list.h (FOR_LIST_ELEMENTS_SAFE): New macro.
+ * include/grub/command.h (FOR_COMMANDS_SAFE): Likewise.
+ * grub-core/commands/help.c (grub_cmd_help): Use FOR_COMMANDS_SAFE.
+
+2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
+
* grub-core/loader/i386/linux.c (find_efi_mmap_size): Don't decrease
efi_mmap_size.
Reported by: Stuart Hayes.
diff --git a/gentpl.py b/gentpl.py
index 13a6081..bab4a8a 100644
--- a/gentpl.py
+++ b/gentpl.py
@@ -487,7 +487,7 @@ def installdir(default="bin"):
def manpage():
r = "if COND_MAN_PAGES\n"
r += gvar_add("man_MANS", "[+ name +].[+ mansection +]\n")
- r += rule("[+ name +].[+ mansection +]", "[+ name +]", """
+ r += rule("[+ name +].[+ mansection +]", "[+ name +] grub-mkconfig_lib", """
chmod a+x [+ name +]
PATH=$(builddir):$$PATH pkgdatadir=$(builddir) $(HELP2MAN) --section=[+ mansection +] -i $(top_srcdir)/docs/man/[+ name +].h2m -o $@ [+ name +]
""")
--
1.8.2.1

View File

@ -1,7 +1,7 @@
From 29c89e27805f7a6a22bce11ed9bb430e19c972a9 Mon Sep 17 00:00:00 2001
From a4172844afe46b71dd999de13cc03dcafb4b193b Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@ubuntu.com>
Date: Tue, 23 Oct 2012 10:40:49 -0400
Subject: [PATCH 449/482] Don't allow insmod when secure boot is enabled.
Subject: [PATCH 06/37] Don't allow insmod when secure boot is enabled.
Hi,
@ -17,19 +17,23 @@ I'm currently test-building this patch (replacing your current
grub-2.00-no-insmod-on-sb.patch), but this should be more correct. It
moves the check into grub_dl_load_file.
---
grub-core/kern/dl.c | 17 +++++++++++++++++
grub-core/kern/dl.c | 21 +++++++++++++++++++++
grub-core/kern/efi/efi.c | 28 ++++++++++++++++++++++++++++
include/grub/efi/efi.h | 1 +
3 files changed, 46 insertions(+)
3 files changed, 50 insertions(+)
diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
index 6c086ad..5521463 100644
index 6850e04..b0b0405 100644
--- a/grub-core/kern/dl.c
+++ b/grub-core/kern/dl.c
@@ -42,6 +42,10 @@
#include <sys/mman.h>
@@ -38,6 +38,14 @@
#define GRUB_MODULES_MACHINE_READONLY
#endif
+#ifdef GRUB_MACHINE_EMU
+#include <sys/mman.h>
+#endif
+
+#ifdef GRUB_MACHINE_EFI
+#include <grub/efi/efi.h>
+#endif
@ -37,7 +41,7 @@ index 6c086ad..5521463 100644
#pragma GCC diagnostic ignored "-Wcast-align"
@@ -665,6 +669,19 @@ grub_dl_load_file (const char *filename)
@@ -680,6 +688,19 @@ grub_dl_load_file (const char *filename)
void *core = 0;
grub_dl_t mod = 0;
@ -54,11 +58,11 @@ index 6c086ad..5521463 100644
+ }
+#endif
+
grub_boot_time ("Loading module %s", filename);
file = grub_file_open (filename);
if (! file)
return 0;
diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
index e8a62ec..0f513e8 100644
index b253141..aa81322 100644
--- a/grub-core/kern/efi/efi.c
+++ b/grub-core/kern/efi/efi.c
@@ -259,6 +259,34 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid,
@ -109,5 +113,5 @@ index 9370fd5..a000c38 100644
EXPORT_FUNC (grub_efi_compare_device_paths) (const grub_efi_device_path_t *dp1,
const grub_efi_device_path_t *dp2);
--
1.8.2.1
1.8.4.2

View File

@ -1,53 +0,0 @@
From 8ec34c46a3cc4cacce65e3a2a671e08548c6a95e Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Mon, 2 Jul 2012 11:22:50 +0200
Subject: [PATCH 006/482] * grub-core/net/tftp.c (ack): Fix endianness
problem. (tftp_receive): Likewise. Reported by: Michael
Davidsaver.
---
ChangeLog | 6 ++++++
grub-core/net/tftp.c | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index aaeeb05..12de11f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
+ * grub-core/net/tftp.c (ack): Fix endianness problem.
+ (tftp_receive): Likewise.
+ Reported by: Michael Davidsaver.
+
+2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
+
* gentpl.py: Make mans depend on grub-mkconfig_lib.
2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
diff --git a/grub-core/net/tftp.c b/grub-core/net/tftp.c
index 9c70efb..d0f39ea 100644
--- a/grub-core/net/tftp.c
+++ b/grub-core/net/tftp.c
@@ -143,7 +143,7 @@ ack (tftp_data_t data, grub_uint16_t block)
tftph_ack = (struct tftphdr *) nb_ack.data;
tftph_ack->opcode = grub_cpu_to_be16 (TFTP_ACK);
- tftph_ack->u.ack.block = block;
+ tftph_ack->u.ack.block = grub_cpu_to_be16 (block);
err = grub_net_send_udp_packet (data->sock, &nb_ack);
if (err)
@@ -225,7 +225,7 @@ tftp_receive (grub_net_udp_socket_t sock __attribute__ ((unused)),
grub_priority_queue_pop (data->pq);
if (file->device->net->packs.count < 50)
- err = ack (data, tftph->u.data.block);
+ err = ack (data, data->block + 1);
else
{
file->device->net->stall = 1;
--
1.8.2.1

View File

@ -1,7 +1,7 @@
From 33749fa51f00213bab2a1db2b79a9539c8980731 Mon Sep 17 00:00:00 2001
From e8e559e2744559a89a53daf5508dd51f5e3d9374 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Mon, 1 Oct 2012 13:24:37 -0400
Subject: [PATCH 450/482] Pass "\x[[:hex:]][[:hex:]]" straight through
Subject: [PATCH 07/37] Pass "\x[[:hex:]][[:hex:]]" straight through
unmolested.
---
@ -45,7 +45,7 @@ index 2807f80..0f40e04 100644
*optr++ = iptr[1];
iptr += 2;
diff --git a/grub-core/lib/cmdline.c b/grub-core/lib/cmdline.c
index a702e64..c8605a7 100644
index d5e10ee..0a5b2af 100644
--- a/grub-core/lib/cmdline.c
+++ b/grub-core/lib/cmdline.c
@@ -20,6 +20,12 @@
@ -76,7 +76,7 @@ index a702e64..c8605a7 100644
size++;
else if (*c == ' ')
space = 1;
@@ -82,7 +94,25 @@ int grub_create_loader_cmdline (int argc, char *argv[], char *buf,
@@ -85,7 +97,25 @@ int grub_create_loader_cmdline (int argc, char *argv[], char *buf,
while (*c)
{
@ -104,7 +104,7 @@ index a702e64..c8605a7 100644
*buf++ = *c;
diff --git a/grub-core/script/execute.c b/grub-core/script/execute.c
index 9babbee..2b75169 100644
index afd5513..8f01c1b 100644
--- a/grub-core/script/execute.c
+++ b/grub-core/script/execute.c
@@ -52,6 +52,12 @@ static struct grub_script_scope *scope = 0;
@ -179,5 +179,5 @@ index 9babbee..2b75169 100644
case '$':
if (escaped)
--
1.8.2.1
1.8.4.2

View File

@ -1,182 +0,0 @@
From c545d0bb2fe87b5a8ea6a903e4e9c113595ccfff Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Mon, 2 Jul 2012 11:28:42 +0200
Subject: [PATCH 007/482] * grub-core/fs/ext2.c: Experimental support
for 64-bit.
---
ChangeLog | 4 ++++
grub-core/fs/ext2.c | 56 +++++++++++++++++++++++++++++++++++++++++------------
2 files changed, 48 insertions(+), 12 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 12de11f..93ad0ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
+ * grub-core/fs/ext2.c: Experimental support for 64-bit.
+
+2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
+
* grub-core/net/tftp.c (ack): Fix endianness problem.
(tftp_receive): Likewise.
Reported by: Michael Davidsaver.
diff --git a/grub-core/fs/ext2.c b/grub-core/fs/ext2.c
index c50e379..bd1ab24 100644
--- a/grub-core/fs/ext2.c
+++ b/grub-core/fs/ext2.c
@@ -65,7 +65,8 @@ GRUB_MOD_LICENSE ("GPLv3+");
/* The inode size. */
#define EXT2_INODE_SIZE(data) \
- (EXT2_REVISION (data) == EXT2_GOOD_OLD_REVISION \
+ (data->sblock.revision_level \
+ == grub_cpu_to_le32_compile_time (EXT2_GOOD_OLD_REVISION) \
? EXT2_GOOD_OLD_INODE_SIZE \
: grub_le_to_cpu16 (data->sblock.inode_size))
@@ -105,7 +106,8 @@ GRUB_MOD_LICENSE ("GPLv3+");
* flags here as the related features are implemented into the driver. */
#define EXT2_DRIVER_SUPPORTED_INCOMPAT ( EXT2_FEATURE_INCOMPAT_FILETYPE \
| EXT4_FEATURE_INCOMPAT_EXTENTS \
- | EXT4_FEATURE_INCOMPAT_FLEX_BG )
+ | EXT4_FEATURE_INCOMPAT_FLEX_BG \
+ | EXT4_FEATURE_INCOMPAT_64BIT)
/* List of rationales for the ignored "incompatible" features:
* needs_recovery: Not really back-incompatible - was added as such to forbid
* ext2 drivers from mounting an ext3 volume with a dirty
@@ -179,7 +181,7 @@ struct grub_ext2_sblock
grub_uint32_t hash_seed[4];
grub_uint8_t def_hash_version;
grub_uint8_t jnl_backup_type;
- grub_uint16_t reserved_word_pad;
+ grub_uint16_t group_desc_size;
grub_uint32_t default_mount_opts;
grub_uint32_t first_meta_bg;
grub_uint32_t mkfs_time;
@@ -197,6 +199,14 @@ struct grub_ext2_block_group
grub_uint16_t used_dirs;
grub_uint16_t pad;
grub_uint32_t reserved[3];
+ grub_uint32_t block_id_hi;
+ grub_uint32_t inode_id_hi;
+ grub_uint32_t inode_table_id_hi;
+ grub_uint16_t free_blocks_hi;
+ grub_uint16_t free_inodes_hi;
+ grub_uint16_t used_dirs_hi;
+ grub_uint16_t pad2;
+ grub_uint32_t reserved2[3];
};
/* The ext2 inode. */
@@ -310,6 +320,7 @@ struct grub_fshelp_node
struct grub_ext2_data
{
struct grub_ext2_sblock sblock;
+ int log_group_desc_size;
grub_disk_t disk;
struct grub_ext2_inode *inode;
struct grub_fshelp_node diropen;
@@ -328,7 +339,7 @@ grub_ext2_blockgroup (struct grub_ext2_data *data, int group,
return grub_disk_read (data->disk,
((grub_le_to_cpu32 (data->sblock.first_data_block) + 1)
<< LOG2_EXT2_BLOCK_SIZE (data)),
- group * sizeof (struct grub_ext2_block_group),
+ group << data->log_group_desc_size,
sizeof (struct grub_ext2_block_group), blkgrp);
}
@@ -362,7 +373,7 @@ grub_ext4_find_leaf (struct grub_ext2_data *data, grub_properly_aligned_t *buf,
return 0;
block = grub_le_to_cpu16 (index[i].leaf_hi);
- block = (block << 32) + grub_le_to_cpu32 (index[i].leaf);
+ block = (block << 32) | grub_le_to_cpu32 (index[i].leaf);
if (grub_disk_read (data->disk,
block << LOG2_EXT2_BLOCK_SIZE (data),
0, EXT2_BLOCK_SIZE(data), buf))
@@ -377,11 +388,11 @@ grub_ext2_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
{
struct grub_ext2_data *data = node->data;
struct grub_ext2_inode *inode = &node->inode;
- int blknr = -1;
+ grub_disk_addr_t blknr = -1;
unsigned int blksz = EXT2_BLOCK_SIZE (data);
int log2_blksz = LOG2_EXT2_BLOCK_SIZE (data);
- if (grub_le_to_cpu32(inode->flags) & EXT4_EXTENTS_FLAG)
+ if (inode->flags & grub_cpu_to_le32_compile_time (EXT4_EXTENTS_FLAG))
{
GRUB_PROPERLY_ALIGNED_ARRAY (buf, EXT2_BLOCK_SIZE(data));
struct grub_ext4_extent_header *leaf;
@@ -535,6 +546,7 @@ grub_ext2_read_inode (struct grub_ext2_data *data,
int inodes_per_block;
unsigned int blkno;
unsigned int blkoff;
+ grub_disk_addr_t base;
/* It is easier to calculate if the first inode is 0. */
ino--;
@@ -551,10 +563,14 @@ grub_ext2_read_inode (struct grub_ext2_data *data,
blkoff = (ino % grub_le_to_cpu32 (sblock->inodes_per_group))
% inodes_per_block;
+ base = grub_le_to_cpu32 (blkgrp.inode_table_id);
+ if (data->log_group_desc_size >= 6)
+ base |= (((grub_disk_addr_t) grub_le_to_cpu32 (blkgrp.inode_table_id_hi))
+ << 32);
+
/* Read the inode. */
if (grub_disk_read (data->disk,
- (((grub_disk_addr_t) grub_le_to_cpu32 (blkgrp.inode_table_id) + blkno)
- << LOG2_EXT2_BLOCK_SIZE (data)),
+ ((base + blkno) << LOG2_EXT2_BLOCK_SIZE (data)),
EXT2_INODE_SIZE (data) * blkoff,
sizeof (struct grub_ext2_inode), inode))
return grub_errno;
@@ -578,7 +594,7 @@ grub_ext2_mount (grub_disk_t disk)
goto fail;
/* Make sure this is an ext2 filesystem. */
- if (grub_le_to_cpu16 (data->sblock.magic) != EXT2_MAGIC
+ if (data->sblock.magic != grub_cpu_to_le16_compile_time (EXT2_MAGIC)
|| grub_le_to_cpu32 (data->sblock.log2_block_size) >= 16)
{
grub_error (GRUB_ERR_BAD_FS, "not an ext2 filesystem");
@@ -586,13 +602,29 @@ grub_ext2_mount (grub_disk_t disk)
}
/* Check the FS doesn't have feature bits enabled that we don't support. */
- if (grub_le_to_cpu32 (data->sblock.feature_incompat)
- & ~(EXT2_DRIVER_SUPPORTED_INCOMPAT | EXT2_DRIVER_IGNORED_INCOMPAT))
+ if (data->sblock.revision_level != grub_cpu_to_le32_compile_time (EXT2_GOOD_OLD_REVISION)
+ && (data->sblock.feature_incompat
+ & grub_cpu_to_le32_compile_time (~(EXT2_DRIVER_SUPPORTED_INCOMPAT
+ | EXT2_DRIVER_IGNORED_INCOMPAT))))
{
grub_error (GRUB_ERR_BAD_FS, "filesystem has unsupported incompatible features");
goto fail;
}
+ if (data->sblock.revision_level != grub_cpu_to_le32_compile_time (EXT2_GOOD_OLD_REVISION)
+ && (data->sblock.feature_incompat
+ & grub_cpu_to_le32_compile_time (EXT4_FEATURE_INCOMPAT_64BIT))
+ && data->sblock.group_desc_size != 0
+ && ((data->sblock.group_desc_size & (data->sblock.group_desc_size - 1))
+ == 0)
+ && (data->sblock.group_desc_size & grub_cpu_to_le16_compile_time (0x1fe0)))
+ {
+ grub_uint16_t b = grub_le_to_cpu16 (data->sblock.group_desc_size);
+ for (data->log_group_desc_size = 0; b != (1 << data->log_group_desc_size);
+ data->log_group_desc_size++);
+ }
+ else
+ data->log_group_desc_size = 5;
data->disk = disk;
--
1.8.2.1

View File

@ -1,7 +1,7 @@
From 6de9229ed963a2a06821ec1f588f7cc37307c946 Mon Sep 17 00:00:00 2001
From 8830ffe331bca6ea702b3273943eef9e12fc2085 Mon Sep 17 00:00:00 2001
From: Gustavo Luiz Duarte <gustavold@linux.vnet.ibm.com>
Date: Tue, 25 Sep 2012 18:40:55 -0400
Subject: [PATCH 451/482] Fix crash on http
Subject: [PATCH 08/37] Fix crash on http
Don't free file->data on receiving FIN flag since it is used all over without
checking. http_close() will be called later to free that memory.
@ -24,5 +24,5 @@ index 4684f8b..ef9538c 100644
if (!data->sock)
{
--
1.8.2.1
1.8.4.2

View File

@ -1,48 +0,0 @@
From 2cce795e46cef6c5f057d46bae9a845621ca4a95 Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Mon, 2 Jul 2012 11:30:04 +0200
Subject: [PATCH 008/482] * grub-core/term/efi/serial.c: Support 1.5
stop bits.
---
ChangeLog | 4 ++++
grub-core/term/efi/serial.c | 2 ++
2 files changed, 6 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 93ad0ac..5f73c88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
+ * grub-core/term/efi/serial.c: Support 1.5 stop bits.
+
+2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
+
* grub-core/fs/ext2.c: Experimental support for 64-bit.
2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
diff --git a/grub-core/term/efi/serial.c b/grub-core/term/efi/serial.c
index da8c3ce..dc5f33b 100644
--- a/grub-core/term/efi/serial.c
+++ b/grub-core/term/efi/serial.c
@@ -44,6 +44,7 @@ do_real_config (struct grub_serial_port *port)
};
const grub_efi_stop_bits_t stop_bits[] = {
[GRUB_SERIAL_STOP_BITS_1] = GRUB_EFI_SERIAL_1_STOP_BIT,
+ [GRUB_SERIAL_STOP_BITS_1_5] = GRUB_EFI_SERIAL_1_5_STOP_BITS,
[GRUB_SERIAL_STOP_BITS_2] = GRUB_EFI_SERIAL_2_STOP_BITS,
};
@@ -111,6 +112,7 @@ serial_hw_configure (struct grub_serial_port *port,
N_("unsupported serial port parity"));
if (config->stop_bits != GRUB_SERIAL_STOP_BITS_1
+ && config->stop_bits != GRUB_SERIAL_STOP_BITS_1_5
&& config->stop_bits != GRUB_SERIAL_STOP_BITS_2)
return grub_error (GRUB_ERR_BAD_ARGUMENT,
N_("unsupported serial port stop bits number"));
--
1.8.2.1

View File

@ -1,7 +1,7 @@
From fdc81da57166837eaf7c3d76b5f865ee7dd5c594 Mon Sep 17 00:00:00 2001
From fea52b34314b75378a3f5dac9f6ecd7218a83e9b Mon Sep 17 00:00:00 2001
From: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
Date: Thu, 20 Sep 2012 18:07:39 -0300
Subject: [PATCH 453/482] IBM client architecture (CAS) reboot support
Subject: [PATCH 09/37] IBM client architecture (CAS) reboot support
This is an implementation of IBM client architecture (CAS) reboot for GRUB.
@ -25,7 +25,7 @@ parameters
4 files changed, 91 insertions(+)
diff --git a/grub-core/kern/ieee1275/openfw.c b/grub-core/kern/ieee1275/openfw.c
index 07c90f7..09e9e57 100644
index ddb7783..2f7fbda 100644
--- a/grub-core/kern/ieee1275/openfw.c
+++ b/grub-core/kern/ieee1275/openfw.c
@@ -561,3 +561,66 @@ grub_ieee1275_canonicalise_devname (const char *path)
@ -96,7 +96,7 @@ index 07c90f7..09e9e57 100644
+}
+
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
index a1d5589..77b4720 100644
index 243b9d6..4ce71fc 100644
--- a/grub-core/normal/main.c
+++ b/grub-core/normal/main.c
@@ -32,6 +32,9 @@
@ -109,7 +109,7 @@ index a1d5589..77b4720 100644
GRUB_MOD_LICENSE ("GPLv3+");
@@ -311,6 +314,22 @@ grub_normal_execute (const char *config, int nested, int batch)
@@ -267,6 +270,22 @@ grub_normal_execute (const char *config, int nested, int batch)
{
menu = read_config_file (config);
@ -133,7 +133,7 @@ index a1d5589..77b4720 100644
grub_errno = GRUB_ERR_NONE;
}
diff --git a/grub-core/script/execute.c b/grub-core/script/execute.c
index 2b75169..b6becd7 100644
index 8f01c1b..cec9539 100644
--- a/grub-core/script/execute.c
+++ b/grub-core/script/execute.c
@@ -27,6 +27,9 @@
@ -146,9 +146,9 @@ index 2b75169..b6becd7 100644
/* Max digits for a char is 3 (0xFF is 255), similarly for an int it
is sizeof (int) * 3, and one extra for a possible -ve sign. */
@@ -901,6 +904,10 @@ grub_script_execute_sourcecode (const char *source, int argc, char **args)
old_scope = scope;
scope = &new_scope;
@@ -892,6 +895,10 @@ grub_script_execute_sourcecode (const char *source)
grub_err_t ret = 0;
struct grub_script *parsed_script;
+#ifdef GRUB_MACHINE_IEEE1275
+ grub_ieee1275_set_boot_last_label (source);
@ -158,10 +158,10 @@ index 2b75169..b6becd7 100644
{
char *line;
diff --git a/include/grub/ieee1275/ieee1275.h b/include/grub/ieee1275/ieee1275.h
index 1b240d3..eabbe9b 100644
index dc54bea..35618f4 100644
--- a/include/grub/ieee1275/ieee1275.h
+++ b/include/grub/ieee1275/ieee1275.h
@@ -227,6 +227,8 @@ int EXPORT_FUNC(grub_ieee1275_devalias_next) (struct grub_ieee1275_devalias *ali
@@ -233,6 +233,8 @@ int EXPORT_FUNC(grub_ieee1275_devalias_next) (struct grub_ieee1275_devalias *ali
void EXPORT_FUNC(grub_ieee1275_children_peer) (struct grub_ieee1275_devalias *alias);
void EXPORT_FUNC(grub_ieee1275_children_first) (const char *devpath,
struct grub_ieee1275_devalias *alias);
@ -171,5 +171,5 @@ index 1b240d3..eabbe9b 100644
#define FOR_IEEE1275_DEVALIASES(alias) for (grub_ieee1275_devalias_init_iterator (&(alias)); grub_ieee1275_devalias_next (&(alias));)
--
1.8.2.1
1.8.4.2

View File

@ -1,107 +0,0 @@
From 134e4df1335b0498684d093b55332f87c2e8a301 Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Mon, 2 Jul 2012 11:31:31 +0200
Subject: [PATCH 009/482] * grub-core/lib/legacy_parse.c: Support clear
and testload.
---
ChangeLog | 4 ++++
grub-core/lib/legacy_parse.c | 14 +++++++++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 5f73c88..e606116 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
+ * grub-core/lib/legacy_parse.c: Support clear and testload.
+
+2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
+
* grub-core/term/efi/serial.c: Support 1.5 stop bits.
2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
diff --git a/grub-core/lib/legacy_parse.c b/grub-core/lib/legacy_parse.c
index 14768b8..ddfaec4 100644
--- a/grub-core/lib/legacy_parse.c
+++ b/grub-core/lib/legacy_parse.c
@@ -65,6 +65,7 @@ struct legacy_command
*/
static struct legacy_command legacy_commands[] =
{
+ /* FIXME: background unsupported. */
{"blocklist", "blocklist '%s'\n", NULL, 0, 1, {TYPE_FILE}, 0, "FILE",
"Print the blocklist notation of the file FILE."},
{"boot", "boot\n", NULL, 0, 0, {}, 0, 0,
@@ -82,6 +83,8 @@ static struct legacy_command legacy_commands[] =
2, {TYPE_FORCE_OPTION, TYPE_FILE}, 0, "[--force] FILE",
"Load the chain-loader FILE. If --force is specified, then load it"
" forcibly, whether the boot loader signature is present or not."},
+ {"clear", "clear\n", NULL, 0, 0, {}, 0, 0,
+ "Clear the screen."},
{"cmp", "cmp '%s' '%s'\n", NULL, 0,
2, {TYPE_FILE, TYPE_FILE}, FLAG_IGNORE_REST, "FILE1 FILE2",
"Compare the file FILE1 with the FILE2 and inform the different values"
@@ -125,6 +128,7 @@ static struct legacy_command legacy_commands[] =
{"displaymem", "lsmmap\n", NULL, 0, 0, {}, 0, 0,
"Display what GRUB thinks the system address space map of the"
" machine is, including all regions of physical RAM installed."},
+ /* FIXME: device and efimap unsupported. */
/* NOTE: embed unsupported. */
{"fallback", "set fallback='%s'\n", NULL, 0,
1, {TYPE_VERBATIM}, 0, "NUM...",
@@ -136,6 +140,8 @@ static struct legacy_command legacy_commands[] =
{"find", "search -f '%s'\n", NULL, 0, 1, {TYPE_FILE}, 0, "FILENAME",
"Search for the filename FILENAME in all of partitions and print the list of"
" the devices which contain the file."},
+ /* FIXME: findiso unsupported. */
+ /* FIXME: foreground unsupported. */
/* FIXME: fstest unsupported. */
/* NOTE: The obsolete C/H/S geometry isn't shown anymore. */
{"geometry", "insmod regexp; ls -l (%s*)\n", NULL, 0, 1, {TYPE_VERBATIM}, 0, "DRIVE",
@@ -243,6 +249,7 @@ static struct legacy_command legacy_commands[] =
{"pause", "echo %s; if ! sleep -i 60; then return; fi\n", NULL, 0, 1,
{TYPE_REST_VERBATIM}, 0,
"[MESSAGE ...]", "Print MESSAGE, then wait until a key is pressed."},
+ /* FIXME: quit unsupported. */
/* FIXME: rarp unsupported. */
{"read", "read_dword %s\n", NULL, 0, 1, {TYPE_INT}, 0, "ADDR",
"Read a 32-bit value from memory at address ADDR and"
@@ -288,11 +295,14 @@ static struct legacy_command legacy_commands[] =
" STOP is the length of stop bit(s). The option --device can be used only"
" in the grub shell, which specifies the file name of a tty device. The"
" default values are COM1, 9600, 8N1."},
+ /* FIXME: silent unsupported. */
+ /* FIXME: splashimage unsupported. */
/* FIXME: setkey unsupported. */ /* NUL_TERMINATE */
/* NOTE: setup unsupported. */
/* FIXME: --no-echo, --no-edit unsupported. */
/* NOTE: both terminals are activated so --silent and --timeout
are useless. */
+ /* FIXME: graphics unsupported. */
{"terminal", NULL, NULL, 0, 0, {}, FLAG_TERMINAL | FLAG_IGNORE_REST,
"[--dumb] [--no-echo] [--no-edit] [--timeout=SECS] [--lines=LINES] "
"[--silent] [console] [serial] [hercules]",
@@ -307,7 +317,7 @@ static struct legacy_command legacy_commands[] =
" seconds. The option --lines specifies the maximum number of lines."
" The option --silent is used to suppress messages."},
/* FIXME: terminfo unsupported. */ /* NUL_TERMINATE */
- {"testload", "cat '%s'\n", NULL, 0, 1, {TYPE_FILE}, 0, "FILE",
+ {"testload", "testload '%s'\n", NULL, 0, 1, {TYPE_FILE}, 0, "FILE",
"Read the entire contents of FILE in several different ways and"
" compares them, to test the filesystem code. "
" If this test succeeds, then a good next"
@@ -334,6 +344,8 @@ static struct legacy_command legacy_commands[] =
" the information about only the mode."},
{"vbeprobe", "insmod vbe; videoinfo\n", NULL, 0, 0, {},
FLAG_FALLBACK, NULL, NULL}
+ /* FIXME: verbose unsupported. */
+ /* FIXME: version unsupported. */
};
char *
--
1.8.2.1

View File

@ -1,7 +1,7 @@
From de04741fe79fc4d2c65a9ea5f4d9ef40bd36ae21 Mon Sep 17 00:00:00 2001
From 9dc8eb2c40952b40c77053ac4134e97264687761 Mon Sep 17 00:00:00 2001
From: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
Date: Tue, 30 Oct 2012 15:19:39 -0200
Subject: [PATCH 454/482] Add vlan-tag support
Subject: [PATCH 10/37] Add vlan-tag support
This patch adds support for virtual LAN (VLAN) tagging. VLAN tagging allows
multiple VLANs in a bridged network to share the same physical network link but
@ -20,10 +20,10 @@ https://bugzilla.redhat.com/show_bug.cgi?id=871563
5 files changed, 73 insertions(+), 3 deletions(-)
diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c
index ce8eadb..3af15d8 100644
index 89b2822..f43f6b9 100644
--- a/grub-core/kern/ieee1275/init.c
+++ b/grub-core/kern/ieee1275/init.c
@@ -117,6 +117,7 @@ grub_machine_get_bootlocation (char **device, char **path)
@@ -118,6 +118,7 @@ grub_machine_get_bootlocation (char **device, char **path)
char *dev, *canon;
char *ptr;
dev = grub_ieee1275_get_aliasdevname (bootpath);
@ -32,7 +32,7 @@ index ce8eadb..3af15d8 100644
ptr = canon + grub_strlen (canon) - 1;
while (ptr > canon && (*ptr == ',' || *ptr == ':'))
diff --git a/grub-core/kern/ieee1275/openfw.c b/grub-core/kern/ieee1275/openfw.c
index 09e9e57..2a01146 100644
index 2f7fbda..086f119 100644
--- a/grub-core/kern/ieee1275/openfw.c
+++ b/grub-core/kern/ieee1275/openfw.c
@@ -23,6 +23,7 @@
@ -80,7 +80,7 @@ index 09e9e57..2a01146 100644
grub_ieee1275_get_device_type (const char *path)
{
diff --git a/grub-core/net/ethernet.c b/grub-core/net/ethernet.c
index b38e2c8..5e45d46 100644
index c397b1b..faaca67 100644
--- a/grub-core/net/ethernet.c
+++ b/grub-core/net/ethernet.c
@@ -23,6 +23,7 @@
@ -159,10 +159,10 @@ index b38e2c8..5e45d46 100644
return err;
diff --git a/include/grub/ieee1275/ieee1275.h b/include/grub/ieee1275/ieee1275.h
index eabbe9b..61d5769 100644
index 35618f4..2b64a92 100644
--- a/include/grub/ieee1275/ieee1275.h
+++ b/include/grub/ieee1275/ieee1275.h
@@ -229,6 +229,7 @@ void EXPORT_FUNC(grub_ieee1275_children_first) (const char *devpath,
@@ -235,6 +235,7 @@ void EXPORT_FUNC(grub_ieee1275_children_first) (const char *devpath,
struct grub_ieee1275_devalias *alias);
int EXPORT_FUNC(grub_ieee1275_cas_reboot) (char *script);
int EXPORT_FUNC(grub_ieee1275_set_boot_last_label) (const char *text);
@ -171,7 +171,7 @@ index eabbe9b..61d5769 100644
#define FOR_IEEE1275_DEVALIASES(alias) for (grub_ieee1275_devalias_init_iterator (&(alias)); grub_ieee1275_devalias_next (&(alias));)
diff --git a/include/grub/net.h b/include/grub/net.h
index e677246..fe29b16 100644
index de6259e..c8ce8db 100644
--- a/include/grub/net.h
+++ b/include/grub/net.h
@@ -533,4 +533,6 @@ extern char *grub_net_default_server;
@ -182,5 +182,5 @@ index e677246..fe29b16 100644
+
#endif /* ! GRUB_NET_HEADER */
--
1.8.2.1
1.8.4.2

View File

@ -1,39 +0,0 @@
From f1c2b05162cc583ec64ae0b3cdf5ef128d2ca05c Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Sat, 7 Jul 2012 14:29:01 +0200
Subject: [PATCH 010/482] * grub-core/Makefile.am: Fix path to
boot/i386/pc/startup_raw.S.
---
ChangeLog | 4 ++++
grub-core/Makefile.am | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index e606116..5e54eda 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-07-07 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/Makefile.am: Fix path to boot/i386/pc/startup_raw.S.
+
2012-07-02 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/lib/legacy_parse.c: Support clear and testload.
diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
index 7dc2519..cc4fb68 100644
--- a/grub-core/Makefile.am
+++ b/grub-core/Makefile.am
@@ -63,7 +63,7 @@ grub_script.yy.c: grub_script.yy.h
rs_decoder.S: $(srcdir)/lib/reed_solomon.c
$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Os -I$(top_builddir) -S -DSTANDALONE -o $@ $< -g0 -mregparm=3 -ffreestanding
-kern/i386/pc/startup.S: $(builddir)/rs_decoder.S
+boot/i386/pc/startup_raw.S: $(builddir)/rs_decoder.S
boot/mips/loongson/fwstart.S: $(builddir)/sm712_start.S
CLEANFILES += grub_script.yy.c grub_script.yy.h
--
1.8.2.1

View File

@ -1,18 +1,18 @@
From 2a71d2434b01daaafa64cd340ea441def459d880 Mon Sep 17 00:00:00 2001
From 760216796286cb0b26cba17f1097a9a492a574d9 Mon Sep 17 00:00:00 2001
From: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
Date: Tue, 27 Nov 2012 16:58:39 -0200
Subject: [PATCH 455/482] Add %X option to printf functions.
Subject: [PATCH 11/37] Add %X option to printf functions.
---
grub-core/kern/misc.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c
index 94b88a3..d5ca312 100644
index 54db2e1..50f7f53 100644
--- a/grub-core/kern/misc.c
+++ b/grub-core/kern/misc.c
@@ -596,7 +596,7 @@ grub_divmod64 (grub_uint64_t n, grub_uint64_t d, grub_uint64_t *r)
static char *
@@ -759,7 +759,7 @@ __umoddi3 (grub_uint64_t a, grub_uint64_t b)
static inline char *
grub_lltoa (char *str, int c, unsigned long long n)
{
- unsigned base = (c == 'x') ? 16 : 10;
@ -20,7 +20,7 @@ index 94b88a3..d5ca312 100644
char *p;
if ((long long) n < 0 && c == 'd')
@@ -611,7 +611,7 @@ grub_lltoa (char *str, int c, unsigned long long n)
@@ -774,7 +774,7 @@ grub_lltoa (char *str, int c, unsigned long long n)
do
{
unsigned d = (unsigned) (n & 0xf);
@ -29,7 +29,7 @@ index 94b88a3..d5ca312 100644
}
while (n >>= 4);
else
@@ -702,6 +702,7 @@ grub_vsnprintf_real (char *str, grub_size_t max_len, const char *fmt0, va_list a
@@ -847,6 +847,7 @@ parse_printf_args (const char *fmt0, struct printf_args *args,
{
case 'p':
case 'x':
@ -37,22 +37,22 @@ index 94b88a3..d5ca312 100644
case 'u':
case 'd':
case 'c':
@@ -780,6 +781,7 @@ grub_vsnprintf_real (char *str, grub_size_t max_len, const char *fmt0, va_list a
@@ -927,6 +928,7 @@ parse_printf_args (const char *fmt0, struct printf_args *args,
switch (c)
{
case 'x':
+ case 'X':
case 'u':
case 'd':
if (longlongfmt)
@@ -921,6 +923,7 @@ grub_vsnprintf_real (char *str, grub_size_t max_len, const char *fmt0, va_list a
longlongfmt |= (sizeof (void *) == sizeof (long long));
args->ptr[curn].type = UNSIGNED_INT + longfmt;
break;
@@ -1064,6 +1066,7 @@ grub_vsnprintf_real (char *str, grub_size_t max_len, const char *fmt0,
c = 'x';
/* Fall through. */
case 'x':
+ case 'X':
case 'u':
unsig = 1;
/* Fall through. */
case 'd':
{
--
1.8.2.1
1.8.4.2

View File

@ -1,67 +0,0 @@
From a7fa3c8e8c7b2dab5a704493b7965bbc60f84bed Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Sun, 22 Jul 2012 16:21:24 +0200
Subject: [PATCH 011/482] Fix coreboot compilation.
* grub-core/term/i386/pc/vga_text.c (grub_vga_text_init): Rename to ...
(grub_vga_text_init_real): ... this.
(grub_vga_text_fini): Rename to ...
(grub_vga_text_fini_real): ... this.
---
ChangeLog | 9 +++++++++
grub-core/term/i386/pc/vga_text.c | 8 ++++----
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5e54eda..35e76af 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-07-22 Vladimir Serbinenko <phcoder@gmail.com>
+
+ Fix coreboot compilation.
+
+ * grub-core/term/i386/pc/vga_text.c (grub_vga_text_init): Rename to ...
+ (grub_vga_text_init_real): ... this.
+ (grub_vga_text_fini): Rename to ...
+ (grub_vga_text_fini_real): ... this.
+
2012-07-07 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/Makefile.am: Fix path to boot/i386/pc/startup_raw.S.
diff --git a/grub-core/term/i386/pc/vga_text.c b/grub-core/term/i386/pc/vga_text.c
index d1e4ef9..74c155c 100644
--- a/grub-core/term/i386/pc/vga_text.c
+++ b/grub-core/term/i386/pc/vga_text.c
@@ -167,7 +167,7 @@ grub_vga_text_setcursor (struct grub_term_output *term __attribute__ ((unused)),
}
static grub_err_t
-grub_vga_text_init (struct grub_term_output *term)
+grub_vga_text_init_real (struct grub_term_output *term)
{
#ifdef MODESET
struct grub_bios_int_registers regs;
@@ -186,7 +186,7 @@ grub_vga_text_init (struct grub_term_output *term)
}
static grub_err_t
-grub_vga_text_fini (struct grub_term_output *term)
+grub_vga_text_fini_real (struct grub_term_output *term)
{
#ifdef MODESET
struct grub_bios_int_registers regs;
@@ -255,8 +255,8 @@ static struct grub_term_output grub_vga_text_term =
#else
.name = "vga_text",
#endif
- .init = grub_vga_text_init,
- .fini = grub_vga_text_fini,
+ .init = grub_vga_text_init_real,
+ .fini = grub_vga_text_fini_real,
.putchar = grub_vga_text_putchar,
.getwh = grub_vga_text_getwh,
.getxy = grub_vga_text_getxy,
--
1.8.2.1

View File

@ -1,7 +1,7 @@
From af13434ca0de9ef01b5f77fb85d5b3ac6c3d1d91 Mon Sep 17 00:00:00 2001
From 9f1046ff402e991679bbe00d2bec34d12580a497 Mon Sep 17 00:00:00 2001
From: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
Date: Tue, 27 Nov 2012 17:18:53 -0200
Subject: [PATCH 456/482] DHCP client ID and UUID options added.
Subject: [PATCH 12/37] DHCP client ID and UUID options added.
---
grub-core/net/bootp.c | 52 +++++++++++++++++++++++++++++++++++++++++++--------
@ -9,11 +9,11 @@ Subject: [PATCH 456/482] DHCP client ID and UUID options added.
2 files changed, 46 insertions(+), 8 deletions(-)
diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c
index c8ef4d6..af3cb62 100644
index c14e9de..656bb71 100644
--- a/grub-core/net/bootp.c
+++ b/grub-core/net/bootp.c
@@ -51,6 +51,14 @@ set_env_limn_ro (const char *intername, const char *suffix,
grub_register_variable_hook (varname, 0, grub_env_write_readonly);
@@ -60,6 +60,14 @@ set_env_limn_ro (const char *intername, const char *suffix,
grub_free (varvalue);
}
+static char
@ -25,9 +25,9 @@ index c8ef4d6..af3cb62 100644
+}
+
static void
parse_dhcp_vendor (const char *name, void *vend, int limit, int *mask)
parse_dhcp_vendor (const char *name, const void *vend, int limit, int *mask)
{
@@ -81,6 +89,9 @@ parse_dhcp_vendor (const char *name, void *vend, int limit, int *mask)
@@ -90,6 +98,9 @@ parse_dhcp_vendor (const char *name, const void *vend, int limit, int *mask)
taglength = *ptr++;
@ -37,8 +37,8 @@ index c8ef4d6..af3cb62 100644
switch (tagtype)
{
case GRUB_NET_BOOTP_NETMASK:
@@ -139,6 +150,39 @@ parse_dhcp_vendor (const char *name, void *vend, int limit, int *mask)
set_env_limn_ro (name, "extensionspath", (char *) ptr, taglength);
@@ -151,6 +162,39 @@ parse_dhcp_vendor (const char *name, const void *vend, int limit, int *mask)
set_env_limn_ro (name, "extensionspath", (const char *) ptr, taglength);
break;
+ case GRUB_NET_BOOTP_CLIENT_ID:
@ -77,7 +77,7 @@ index c8ef4d6..af3cb62 100644
/* If you need any other options please contact GRUB
development team. */
}
@@ -302,14 +346,6 @@ grub_net_process_dhcp (struct grub_net_buff *nb,
@@ -319,14 +363,6 @@ grub_net_process_dhcp (struct grub_net_buff *nb,
}
}
@ -93,10 +93,10 @@ index c8ef4d6..af3cb62 100644
grub_cmd_dhcpopt (struct grub_command *cmd __attribute__ ((unused)),
int argc, char **args)
diff --git a/include/grub/net.h b/include/grub/net.h
index fe29b16..36ac906 100644
index c8ce8db..ea4978d 100644
--- a/include/grub/net.h
+++ b/include/grub/net.h
@@ -424,6 +424,8 @@ enum
@@ -433,6 +433,8 @@ enum
GRUB_NET_BOOTP_DOMAIN = 0x0f,
GRUB_NET_BOOTP_ROOT_PATH = 0x11,
GRUB_NET_BOOTP_EXTENSIONS_PATH = 0x12,
@ -106,5 +106,5 @@ index fe29b16..36ac906 100644
};
--
1.8.2.1
1.8.4.2

View File

@ -1,68 +0,0 @@
From 1f75c529d5309defb33c8c216422003eee1248a5 Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Sun, 22 Jul 2012 16:23:46 +0200
Subject: [PATCH 012/482] * grub-core/normal/autofs.c
(autoload_fs_module): Save and restore filter state.
---
ChangeLog | 5 +++++
grub-core/normal/autofs.c | 17 +++++++++++++++--
2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 35e76af..38374a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2012-07-22 Vladimir Serbinenko <phcoder@gmail.com>
+ * grub-core/normal/autofs.c (autoload_fs_module): Save and restore
+ filter state.
+
+2012-07-22 Vladimir Serbinenko <phcoder@gmail.com>
+
Fix coreboot compilation.
* grub-core/term/i386/pc/vga_text.c (grub_vga_text_init): Rename to ...
diff --git a/grub-core/normal/autofs.c b/grub-core/normal/autofs.c
index 0b27abf..721b9c3 100644
--- a/grub-core/normal/autofs.c
+++ b/grub-core/normal/autofs.c
@@ -32,11 +32,21 @@ static int
autoload_fs_module (void)
{
grub_named_list_t p;
+ int ret = 0;
+ grub_file_filter_t grub_file_filters_was[GRUB_FILE_FILTER_MAX];
+
+ grub_memcpy (grub_file_filters_was, grub_file_filters_enabled,
+ sizeof (grub_file_filters_enabled));
+ grub_memcpy (grub_file_filters_enabled, grub_file_filters_all,
+ sizeof (grub_file_filters_enabled));
while ((p = fs_module_list) != NULL)
{
if (! grub_dl_get (p->name) && grub_dl_load (p->name))
- return 1;
+ {
+ ret = 1;
+ break;
+ }
if (grub_errno)
grub_print_error ();
@@ -46,7 +56,10 @@ autoload_fs_module (void)
grub_free (p);
}
- return 0;
+ grub_memcpy (grub_file_filters_enabled, grub_file_filters_was,
+ sizeof (grub_file_filters_enabled));
+
+ return ret;
}
/* Read the file fs.lst for auto-loading. */
--
1.8.2.1

View File

@ -1,7 +1,7 @@
From f746bbc8a74f7a2d3bf14752fa14a9f50b35d38f Mon Sep 17 00:00:00 2001
From b90ea8ede5b4b817a80a92fe11fca64535a6ce44 Mon Sep 17 00:00:00 2001
From: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
Date: Tue, 27 Nov 2012 17:22:07 -0200
Subject: [PATCH 457/482] Search for specific config file for netboot
Subject: [PATCH 13/37] Search for specific config file for netboot
This patch implements a search for a specific configuration when the config
file is on a remoteserver. It uses the following order:
@ -22,10 +22,10 @@ https://bugzilla.redhat.com/show_bug.cgi?id=873406
3 files changed, 135 insertions(+), 4 deletions(-)
diff --git a/grub-core/net/net.c b/grub-core/net/net.c
index 8ea6906..b7d749d 100644
index 0e57e93..f1eefe0 100644
--- a/grub-core/net/net.c
+++ b/grub-core/net/net.c
@@ -1611,6 +1611,124 @@ grub_net_restore_hw (void)
@@ -1663,6 +1663,124 @@ grub_net_restore_hw (void)
return GRUB_ERR_NONE;
}
@ -151,7 +151,7 @@ index 8ea6906..b7d749d 100644
static grub_command_t cmd_addaddr, cmd_deladdr, cmd_addroute, cmd_delroute;
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
index 77b4720..48bb708 100644
index 4ce71fc..ac4ee63 100644
--- a/grub-core/normal/main.c
+++ b/grub-core/normal/main.c
@@ -32,6 +32,7 @@
@ -162,7 +162,7 @@ index 77b4720..48bb708 100644
#ifdef GRUB_MACHINE_IEEE1275
#include <grub/ieee1275/ieee1275.h>
#endif
@@ -401,10 +402,19 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
@@ -357,10 +358,19 @@ grub_cmd_normal (struct grub_command *cmd __attribute__ ((unused)),
prefix = grub_env_get ("prefix");
if (prefix)
@ -187,7 +187,7 @@ index 77b4720..48bb708 100644
grub_enter_normal_mode (config);
grub_free (config);
diff --git a/include/grub/net.h b/include/grub/net.h
index 36ac906..c7d5ce0 100644
index ea4978d..314a610 100644
--- a/include/grub/net.h
+++ b/include/grub/net.h
@@ -537,4 +537,7 @@ extern char *grub_net_default_server;
@ -199,5 +199,5 @@ index 36ac906..c7d5ce0 100644
+
#endif /* ! GRUB_NET_HEADER */
--
1.8.2.1
1.8.4.2

View File

@ -1,73 +0,0 @@
From 4942f9b133e52828d2441309beea0e9278e8b80c Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Sun, 22 Jul 2012 16:27:03 +0200
Subject: [PATCH 013/482] * grub-core/lib/xzembed/xz_dec_stream.c
(hash_validate): Fix behaviour if hash function is unavailable.
(dec_stream_header): Likewise.
---
ChangeLog | 6 ++++++
grub-core/lib/xzembed/xz_dec_stream.c | 15 ++++++++++-----
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 38374a3..892d31b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2012-07-22 Vladimir Serbinenko <phcoder@gmail.com>
+ * grub-core/lib/xzembed/xz_dec_stream.c (hash_validate): Fix behaviour
+ if hash function is unavailable.
+ (dec_stream_header): Likewise.
+
+2012-07-22 Vladimir Serbinenko <phcoder@gmail.com>
+
* grub-core/normal/autofs.c (autoload_fs_module): Save and restore
filter state.
diff --git a/grub-core/lib/xzembed/xz_dec_stream.c b/grub-core/lib/xzembed/xz_dec_stream.c
index 0d79b1f..6170b0c 100644
--- a/grub-core/lib/xzembed/xz_dec_stream.c
+++ b/grub-core/lib/xzembed/xz_dec_stream.c
@@ -403,18 +403,25 @@ static enum xz_ret hash_validate(struct xz_dec *s, struct xz_buf *b,
}
#endif
- do {
+ if (b->in_pos == b->in_size)
+ return XZ_OK;
+
+ if (!crc32 && s->hash_size == 0)
+ s->pos += 8;
+
+ while (s->pos < (crc32 ? 32 : s->hash_size * 8)) {
if (b->in_pos == b->in_size)
return XZ_OK;
#ifndef GRUB_EMBED_DECOMPRESSOR
- if (hash && s->hash_value[s->pos / 8] != b->in[b->in_pos++])
+ if (hash && s->hash_value[s->pos / 8] != b->in[b->in_pos])
return XZ_DATA_ERROR;
#endif
+ b->in_pos++;
s->pos += 8;
- } while (s->pos < (crc32 ? 32 : s->hash_size * 8));
+ }
#ifndef GRUB_EMBED_DECOMPRESSOR
if (s->hash)
@@ -529,8 +536,6 @@ static enum xz_ret dec_stream_header(struct xz_dec *s)
s->hash->init(s->index.hash.hash_context);
s->hash->init(s->block.hash.hash_context);
}
- if (!s->hash)
- return XZ_OPTIONS_ERROR;
#endif
}
else
--
1.8.2.1

View File

@ -1,7 +1,7 @@
From a2780be06f7de35a0dd4cc19a68b151176707ae7 Mon Sep 17 00:00:00 2001
From f7fd503bbed499c02eaf13b2e44b6d3ec06eb6a6 Mon Sep 17 00:00:00 2001
From: Fedora Ninjas <grub2-owner@fedoraproject.org>
Date: Fri, 14 Dec 2012 20:10:21 -0200
Subject: [PATCH 458/482] Add bootpath device to the list
Subject: [PATCH 14/37] Add bootpath device to the list
When scanning the devices, always check (and add) the bootpath device if it
isn't in the device list.
@ -10,10 +10,10 @@ isn't in the device list.
1 file changed, 32 insertions(+)
diff --git a/grub-core/disk/ieee1275/ofdisk.c b/grub-core/disk/ieee1275/ofdisk.c
index 2a31ecd..a940771 100644
index 6870b39..f13c4bb 100644
--- a/grub-core/disk/ieee1275/ofdisk.c
+++ b/grub-core/disk/ieee1275/ofdisk.c
@@ -229,6 +229,10 @@ dev_iterate (const struct grub_ieee1275_devalias *alias)
@@ -274,6 +274,10 @@ dev_iterate (const struct grub_ieee1275_devalias *alias)
static void
scan (void)
{
@ -24,7 +24,7 @@ index 2a31ecd..a940771 100644
struct grub_ieee1275_devalias alias;
FOR_IEEE1275_DEVALIASES(alias)
{
@@ -239,6 +243,34 @@ scan (void)
@@ -284,6 +288,34 @@ scan (void)
FOR_IEEE1275_DEVCHILDREN("/", alias)
dev_iterate (&alias);
@ -60,5 +60,5 @@ index 2a31ecd..a940771 100644
static int
--
1.8.2.1
1.8.4.2

View File

@ -1,83 +0,0 @@
From 6a6140eac9a2d0889dcf6d118979d4af242b8060 Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Sun, 22 Jul 2012 16:30:48 +0200
Subject: [PATCH 014/482] * grub-core/loader/i386/bsd.c
(grub_bsd_elf32_size_hook): Fix mask. (grub_bsd_elf32_hook): Likewise.
(grub_bsd_elf64_size_hook): Likewise. (grub_bsd_elf64_hook): Likewise.
(grub_bsd_load_elf): Likewise.
---
ChangeLog | 8 ++++++++
grub-core/loader/i386/bsd.c | 10 +++++-----
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 892d31b..f514465 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2012-07-22 Vladimir Serbinenko <phcoder@gmail.com>
+ * grub-core/loader/i386/bsd.c (grub_bsd_elf32_size_hook): Fix mask.
+ (grub_bsd_elf32_hook): Likewise.
+ (grub_bsd_elf64_size_hook): Likewise.
+ (grub_bsd_elf64_hook): Likewise.
+ (grub_bsd_load_elf): Likewise.
+
+2012-07-22 Vladimir Serbinenko <phcoder@gmail.com>
+
* grub-core/lib/xzembed/xz_dec_stream.c (hash_validate): Fix behaviour
if hash function is unavailable.
(dec_stream_header): Likewise.
diff --git a/grub-core/loader/i386/bsd.c b/grub-core/loader/i386/bsd.c
index 0fd4df0..6e024e4 100644
--- a/grub-core/loader/i386/bsd.c
+++ b/grub-core/loader/i386/bsd.c
@@ -1309,7 +1309,7 @@ grub_bsd_elf32_size_hook (grub_elf_t elf __attribute__ ((unused)),
&& phdr->p_type != PT_DYNAMIC)
return 0;
- paddr = phdr->p_paddr & 0xFFFFFF;
+ paddr = phdr->p_paddr & 0xFFFFFFF;
if (paddr < kern_start)
kern_start = paddr;
@@ -1333,7 +1333,7 @@ grub_bsd_elf32_hook (Elf32_Phdr * phdr, grub_addr_t * addr, int *do_load)
}
*do_load = 1;
- phdr->p_paddr &= 0xFFFFFF;
+ phdr->p_paddr &= 0xFFFFFFF;
paddr = phdr->p_paddr;
*addr = (grub_addr_t) (paddr - kern_start + (grub_uint8_t *) kern_chunk_src);
@@ -1351,7 +1351,7 @@ grub_bsd_elf64_size_hook (grub_elf_t elf __attribute__ ((unused)),
&& phdr->p_type != PT_DYNAMIC)
return 0;
- paddr = phdr->p_paddr & 0xffffff;
+ paddr = phdr->p_paddr & 0xfffffff;
if (paddr < kern_start)
kern_start = paddr;
@@ -1375,7 +1375,7 @@ grub_bsd_elf64_hook (Elf64_Phdr * phdr, grub_addr_t * addr, int *do_load)
}
*do_load = 1;
- paddr = phdr->p_paddr & 0xffffff;
+ paddr = phdr->p_paddr & 0xfffffff;
*addr = (grub_addr_t) (paddr - kern_start + (grub_uint8_t *) kern_chunk_src);
@@ -1394,7 +1394,7 @@ grub_bsd_load_elf (grub_elf_t elf, const char *filename)
{
grub_relocator_chunk_t ch;
- entry = elf->ehdr.ehdr32.e_entry & 0xFFFFFF;
+ entry = elf->ehdr.ehdr32.e_entry & 0xFFFFFFF;
err = grub_elf32_phdr_iterate (elf, filename,
grub_bsd_elf32_size_hook, NULL);
if (err)
--
1.8.2.1

View File

@ -1,368 +0,0 @@
From c0be2c2099805c621f27d5b3ced224db437a582c Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Sun, 22 Jul 2012 19:59:06 +0200
Subject: [PATCH 015/482] New command `lsefi'.
* grub-core/Makefile.core.def (lsefi): New module.
* grub-core/commands/efi/lsefi.c: New file.
* include/grub/efi/api.h: Add more GUIDs.
---
ChangeLog | 8 +++
grub-core/Makefile.core.def | 6 ++
grub-core/commands/efi/lsefi.c | 153 +++++++++++++++++++++++++++++++++++++++++
include/grub/efi/api.h | 142 +++++++++++++++++++++++++++++++++++++-
4 files changed, 308 insertions(+), 1 deletion(-)
create mode 100644 grub-core/commands/efi/lsefi.c
diff --git a/ChangeLog b/ChangeLog
index f514465..a21708c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2012-07-22 Vladimir Serbinenko <phcoder@gmail.com>
+ New command `lsefi'.
+
+ * grub-core/Makefile.core.def (lsefi): New module.
+ * grub-core/commands/efi/lsefi.c: New file.
+ * include/grub/efi/api.h: Add more GUIDs.
+
+2012-07-22 Vladimir Serbinenko <phcoder@gmail.com>
+
* grub-core/loader/i386/bsd.c (grub_bsd_elf32_size_hook): Fix mask.
(grub_bsd_elf32_hook): Likewise.
(grub_bsd_elf64_size_hook): Likewise.
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index 5c2fcc2..de702d6 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -569,6 +569,12 @@ module = {
};
module = {
+ name = lsefi;
+ common = commands/efi/lsefi.c;
+ enable = efi;
+};
+
+module = {
name = blocklist;
common = commands/blocklist.c;
};
diff --git a/grub-core/commands/efi/lsefi.c b/grub-core/commands/efi/lsefi.c
new file mode 100644
index 0000000..8dffbdc
--- /dev/null
+++ b/grub-core/commands/efi/lsefi.c
@@ -0,0 +1,153 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2012 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/>.
+ */
+#include <grub/types.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/efi/api.h>
+#include <grub/efi/edid.h>
+#include <grub/efi/pci.h>
+#include <grub/efi/efi.h>
+#include <grub/efi/uga_draw.h>
+#include <grub/efi/graphics_output.h>
+#include <grub/efi/console_control.h>
+#include <grub/command.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+struct known_protocol
+{
+ grub_efi_guid_t guid;
+ const char *name;
+} known_protocols[] =
+ {
+ { GRUB_EFI_DISK_IO_GUID, "disk" },
+ { GRUB_EFI_BLOCK_IO_GUID, "block" },
+ { GRUB_EFI_SERIAL_IO_GUID, "serial" },
+ { GRUB_EFI_SIMPLE_NETWORK_GUID, "network" },
+ { GRUB_EFI_PXE_GUID, "pxe" },
+ { GRUB_EFI_DEVICE_PATH_GUID, "device path" },
+ { GRUB_EFI_PCI_IO_GUID, "PCI" },
+ { GRUB_EFI_PCI_ROOT_IO_GUID, "PCI root" },
+ { GRUB_EFI_EDID_ACTIVE_GUID, "active EDID" },
+ { GRUB_EFI_EDID_DISCOVERED_GUID, "discovered EDID" },
+ { GRUB_EFI_EDID_OVERRIDE_GUID, "override EDID" },
+ { GRUB_EFI_GOP_GUID, "GOP" },
+ { GRUB_EFI_UGA_DRAW_GUID, "UGA draw" },
+ { GRUB_EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID, "simple text output" },
+ { GRUB_EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID, "simple text input" },
+ { GRUB_EFI_SIMPLE_POINTER_PROTOCOL_GUID, "simple pointer" },
+ { GRUB_EFI_CONSOLE_CONTROL_GUID, "console control" },
+ { GRUB_EFI_ABSOLUTE_POINTER_PROTOCOL_GUID, "absolute pointer" },
+ { GRUB_EFI_DRIVER_BINDING_PROTOCOL_GUID, "EFI driver binding" },
+ { GRUB_EFI_LOAD_FILE_PROTOCOL_GUID, "load file" },
+ { GRUB_EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID, "simple FS" },
+ { GRUB_EFI_TAPE_IO_PROTOCOL_GUID, "tape I/O" },
+ { GRUB_EFI_UNICODE_COLLATION_PROTOCOL_GUID, "unicode collation" },
+ { GRUB_EFI_SCSI_IO_PROTOCOL_GUID, "SCSI I/O" },
+ { GRUB_EFI_USB2_HC_PROTOCOL_GUID, "USB host" },
+ { GRUB_EFI_DEBUG_SUPPORT_PROTOCOL_GUID, "debug support" },
+ { GRUB_EFI_DEBUGPORT_PROTOCOL_GUID, "debug port" },
+ { GRUB_EFI_DECOMPRESS_PROTOCOL_GUID, "decompress" },
+ { GRUB_EFI_LOADED_IMAGE_PROTOCOL_GUID, "loaded image" },
+ { GRUB_EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID, "device path to text" },
+ { GRUB_EFI_DEVICE_PATH_UTILITIES_PROTOCOL_GUID, "device path utilities" },
+ { GRUB_EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL_GUID, "device path from text" },
+ { GRUB_EFI_HII_CONFIG_ROUTING_PROTOCOL_GUID, "HII config routing" },
+ { GRUB_EFI_HII_DATABASE_PROTOCOL_GUID, "HII database" },
+ { GRUB_EFI_HII_STRING_PROTOCOL_GUID, "HII string" },
+ { GRUB_EFI_HII_IMAGE_PROTOCOL_GUID, "HII image" },
+ { GRUB_EFI_HII_FONT_PROTOCOL_GUID, "HII font" },
+ { GRUB_EFI_COMPONENT_NAME2_PROTOCOL_GUID, "component name 2" },
+ { GRUB_EFI_HII_CONFIGURATION_ACCESS_PROTOCOL_GUID,
+ "HII configuration access" },
+ { GRUB_EFI_USB_IO_PROTOCOL_GUID, "USB I/O" },
+ };
+
+static grub_err_t
+grub_cmd_lsefi (grub_command_t cmd __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char **args __attribute__ ((unused)))
+{
+ grub_efi_handle_t *handles;
+ grub_efi_uintn_t num_handles;
+ unsigned i, j, k;
+
+ handles = grub_efi_locate_handle (GRUB_EFI_ALL_HANDLES,
+ NULL, NULL, &num_handles);
+
+ for (i = 0; i < num_handles; i++)
+ {
+ grub_efi_handle_t handle = handles[i];
+ grub_efi_status_t status;
+ grub_efi_uintn_t num_protocols;
+ grub_efi_guid_t **protocols;
+ grub_efi_device_path_t *dp;
+
+ grub_printf ("Handle %p\n", handle);
+
+ dp = grub_efi_get_device_path (handle);
+ if (dp)
+ {
+ grub_printf (" ");
+ grub_efi_print_device_path (dp);
+ }
+
+ status = efi_call_3 (grub_efi_system_table->boot_services->protocols_per_handle,
+ handle, &protocols, &num_protocols);
+ if (status != GRUB_EFI_SUCCESS)
+ grub_printf ("Unable to retrieve protocols\n");
+ for (j = 0; j < num_protocols; j++)
+ {
+ for (k = 0; k < ARRAY_SIZE (known_protocols); k++)
+ if (grub_memcmp (protocols[j], &known_protocols[k].guid,
+ sizeof (known_protocols[k].guid)) == 0)
+ break;
+ if (k < ARRAY_SIZE (known_protocols))
+ grub_printf (" %s\n", known_protocols[k].name);
+ else
+ grub_printf (" %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x\n",
+ protocols[j]->data1,
+ protocols[j]->data2,
+ protocols[j]->data3,
+ (unsigned) protocols[j]->data4[0],
+ (unsigned) protocols[j]->data4[1],
+ (unsigned) protocols[j]->data4[2],
+ (unsigned) protocols[j]->data4[3],
+ (unsigned) protocols[j]->data4[4],
+ (unsigned) protocols[j]->data4[5],
+ (unsigned) protocols[j]->data4[6],
+ (unsigned) protocols[j]->data4[7]);
+ }
+
+ }
+
+ return 0;
+}
+
+static grub_command_t cmd;
+
+GRUB_MOD_INIT(lsefi)
+{
+ cmd = grub_register_command ("lsefi", grub_cmd_lsefi,
+ NULL, "Display EFI handles.");
+}
+
+GRUB_MOD_FINI(lsefi)
+{
+ grub_unregister_command (cmd);
+}
diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
index 26127de..9e7a8d8 100644
--- a/include/grub/efi/api.h
+++ b/include/grub/efi/api.h
@@ -104,9 +104,149 @@
{ 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
}
+#define GRUB_EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID \
+ { 0x387477c1, 0x69c7, 0x11d2, \
+ { 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
+ }
+
+#define EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID \
+ { 0xdd9e7534, 0x7762, 0x4698, \
+ { 0x8c, 0x14, 0xf5, 0x85, 0x17, 0xa6, 0x25, 0xaa } \
+ }
+
+#define GRUB_EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID \
+ { 0x387477c2, 0x69c7, 0x11d2, \
+ { 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
+ }
+
+#define GRUB_EFI_SIMPLE_POINTER_PROTOCOL_GUID \
+ { 0x31878c87, 0xb75, 0x11d5, \
+ { 0x9a, 0x4f, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
+ }
+
+#define GRUB_EFI_ABSOLUTE_POINTER_PROTOCOL_GUID \
+ { 0x8D59D32B, 0xC655, 0x4AE9, \
+ { 0x9B, 0x15, 0xF2, 0x59, 0x04, 0x99, 0x2A, 0x43 } \
+ }
+
+#define GRUB_EFI_DRIVER_BINDING_PROTOCOL_GUID \
+ { 0x18A031AB, 0xB443, 0x4D1A, \
+ { 0xA5, 0xC0, 0x0C, 0x09, 0x26, 0x1E, 0x9F, 0x71 } \
+ }
+
+#define GRUB_EFI_LOADED_IMAGE_PROTOCOL_GUID \
+ { 0x5B1B31A1, 0x9562, 0x11d2, \
+ { 0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B } \
+ }
+
+#define GRUB_EFI_LOAD_FILE_PROTOCOL_GUID \
+ { 0x56EC3091, 0x954C, 0x11d2, \
+ { 0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B } \
+ }
+
+#define GRUB_EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID \
+ { 0x0964e5b22, 0x6459, 0x11d2, \
+ { 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
+ }
+
+#define GRUB_EFI_TAPE_IO_PROTOCOL_GUID \
+ { 0x1e93e633, 0xd65a, 0x459e, \
+ { 0xab, 0x84, 0x93, 0xd9, 0xec, 0x26, 0x6d, 0x18 } \
+ }
+
+#define GRUB_EFI_UNICODE_COLLATION_PROTOCOL_GUID \
+ { 0x1d85cd7f, 0xf43d, 0x11d2, \
+ { 0x9a, 0x0c, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
+ }
+
+#define GRUB_EFI_SCSI_IO_PROTOCOL_GUID \
+ { 0x932f47e6, 0x2362, 0x4002, \
+ { 0x80, 0x3e, 0x3c, 0xd5, 0x4b, 0x13, 0x8f, 0x85 } \
+ }
+
+#define GRUB_EFI_USB2_HC_PROTOCOL_GUID \
+ { 0x3e745226, 0x9818, 0x45b6, \
+ { 0xa2, 0xac, 0xd7, 0xcd, 0x0e, 0x8b, 0xa2, 0xbc } \
+ }
+
+#define GRUB_EFI_DEBUG_SUPPORT_PROTOCOL_GUID \
+ { 0x2755590C, 0x6F3C, 0x42FA, \
+ { 0x9E, 0xA4, 0xA3, 0xBA, 0x54, 0x3C, 0xDA, 0x25 } \
+ }
+
+#define GRUB_EFI_DEBUGPORT_PROTOCOL_GUID \
+ { 0xEBA4E8D2, 0x3858, 0x41EC, \
+ { 0xA2, 0x81, 0x26, 0x47, 0xBA, 0x96, 0x60, 0xD0 } \
+ }
+
+#define GRUB_EFI_DECOMPRESS_PROTOCOL_GUID \
+ { 0xd8117cfe, 0x94a6, 0x11d4, \
+ { 0x9a, 0x3a, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
+ }
+
+#define GRUB_EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID \
+ { 0x8b843e20, 0x8132, 0x4852, \
+ { 0x90, 0xcc, 0x55, 0x1a, 0x4e, 0x4a, 0x7f, 0x1c } \
+ }
+
+#define GRUB_EFI_DEVICE_PATH_UTILITIES_PROTOCOL_GUID \
+ { 0x379be4e, 0xd706, 0x437d, \
+ { 0xb0, 0x37, 0xed, 0xb8, 0x2f, 0xb7, 0x72, 0xa4 } \
+ }
+
+#define GRUB_EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL_GUID \
+ { 0x5c99a21, 0xc70f, 0x4ad2, \
+ { 0x8a, 0x5f, 0x35, 0xdf, 0x33, 0x43, 0xf5, 0x1e } \
+ }
+
+#define GRUB_EFI_ACPI_TABLE_PROTOCOL_GUID \
+ { 0xffe06bdd, 0x6107, 0x46a6, \
+ { 0x7b, 0xb2, 0x5a, 0x9c, 0x7e, 0xc5, 0x27, 0x5c} \
+ }
+
+#define GRUB_EFI_HII_CONFIG_ROUTING_PROTOCOL_GUID \
+ { 0x587e72d7, 0xcc50, 0x4f79, \
+ { 0x82, 0x09, 0xca, 0x29, 0x1f, 0xc1, 0xa1, 0x0f } \
+ }
+
+#define GRUB_EFI_HII_DATABASE_PROTOCOL_GUID \
+ { 0xef9fc172, 0xa1b2, 0x4693, \
+ { 0xb3, 0x27, 0x6d, 0x32, 0xfc, 0x41, 0x60, 0x42 } \
+ }
+
+#define GRUB_EFI_HII_STRING_PROTOCOL_GUID \
+ { 0xfd96974, 0x23aa, 0x4cdc, \
+ { 0xb9, 0xcb, 0x98, 0xd1, 0x77, 0x50, 0x32, 0x2a } \
+ }
+
+#define GRUB_EFI_HII_IMAGE_PROTOCOL_GUID \
+ { 0x31a6406a, 0x6bdf, 0x4e46, \
+ { 0xb2, 0xa2, 0xeb, 0xaa, 0x89, 0xc4, 0x9, 0x20 } \
+ }
+
+#define GRUB_EFI_HII_FONT_PROTOCOL_GUID \
+ { 0xe9ca4775, 0x8657, 0x47fc, \
+ { 0x97, 0xe7, 0x7e, 0xd6, 0x5a, 0x8, 0x43, 0x24 } \
+ }
+
+#define GRUB_EFI_HII_CONFIGURATION_ACCESS_PROTOCOL_GUID \
+ { 0x330d4706, 0xf2a0, 0x4e4f, \
+ { 0xa3, 0x69, 0xb6, 0x6f, 0xa8, 0xd5, 0x43, 0x85 } \
+ }
+
+#define GRUB_EFI_COMPONENT_NAME2_PROTOCOL_GUID \
+ { 0x6a7a5cff, 0xe8d9, 0x4f70, \
+ { 0xba, 0xda, 0x75, 0xab, 0x30, 0x25, 0xce, 0x14} \
+ }
+
+#define GRUB_EFI_USB_IO_PROTOCOL_GUID \
+ { 0x2B2F68D6, 0x0CD2, 0x44cf, \
+ { 0x8E, 0x8B, 0xBB, 0xA2, 0x0B, 0x1B, 0x5B, 0x75 } \
+ }
+
#define GRUB_EFI_MPS_TABLE_GUID \
{ 0xeb9d2d2f, 0x2d88, 0x11d3, \
- { 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
+ { 0x9a, 0x16, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
}
#define GRUB_EFI_ACPI_TABLE_GUID \
--
1.8.2.1

View File

@ -1,7 +1,7 @@
From 86e2916cbfa955b04b86b19bb92a29be42368d39 Mon Sep 17 00:00:00 2001
From 9b34a37fc2eb0192a7340a48bbcf189053564af1 Mon Sep 17 00:00:00 2001
From: Fedora Ninjas <grub2-owner@fedoraproject.org>
Date: Tue, 22 Jan 2013 06:31:38 +0100
Subject: [PATCH 460/482] blscfg: add blscfg module to parse Boot Loader
Subject: [PATCH 15/37] blscfg: add blscfg module to parse Boot Loader
Specification snippets
http://www.freedesktop.org/wiki/Specifications/BootLoaderSpec
@ -21,10 +21,10 @@ Signed-off-by: Peter Jones <grub2-owner@fedoraproject.org>
create mode 100644 grub-core/commands/blscfg.c
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index def6606..08089de 100644
index 8c246c6..25d80ee 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -653,6 +653,14 @@ module = {
@@ -747,6 +747,14 @@ module = {
};
module = {
@ -247,5 +247,5 @@ index 0000000..4274aca
+ grub_unregister_extcmd (cmd);
+}
--
1.8.2.1
1.8.4.2

View File

@ -1,7 +1,7 @@
From 17f4b0bf7a491395a97beb8df4261fb76a755d16 Mon Sep 17 00:00:00 2001
From 8d4fad25f19d30bcefa35faac58e8409faba5e95 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Wed, 3 Apr 2013 14:35:34 -0400
Subject: [PATCH 461/482] Move bash completion script (#922997)
Subject: [PATCH 16/37] Move bash completion script (#922997)
Apparently these go in a new place now.
---
@ -22,5 +22,5 @@ index 136287c..0bcdb06 100644
$(bash_completion_script): $(bash_completion_source) $(top_builddir)/config.status
--
1.8.2.1
1.8.4.2

View File

@ -1,162 +0,0 @@
From 14589a819717d1d6614687202159a0070bba1f8f Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Sun, 22 Jul 2012 20:02:17 +0200
Subject: [PATCH 016/482] * util/grub-mkconfig_lib.in (grub_quote):
Remove extra layer of escape. * util/grub.d/10_hurd.in: Add missing quoting.
* util/grub.d/10_illumos.in: Likewise. * util/grub.d/10_kfreebsd.in:
Likewise. * util/grub.d/10_linux.in: Likewise. *
util/grub.d/20_linux_xen.in: Likewise.
---
ChangeLog | 9 +++++++++
util/grub-mkconfig_lib.in | 10 +++++-----
util/grub.d/10_hurd.in | 4 ++--
util/grub.d/10_illumos.in | 1 +
util/grub.d/10_kfreebsd.in | 2 +-
util/grub.d/10_linux.in | 4 ++--
util/grub.d/20_linux_xen.in | 6 +++---
7 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a21708c..0db6239 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2012-07-22 Vladimir Serbinenko <phcoder@gmail.com>
+ * util/grub-mkconfig_lib.in (grub_quote): Remove extra layer of escape.
+ * util/grub.d/10_hurd.in: Add missing quoting.
+ * util/grub.d/10_illumos.in: Likewise.
+ * util/grub.d/10_kfreebsd.in: Likewise.
+ * util/grub.d/10_linux.in: Likewise.
+ * util/grub.d/20_linux_xen.in: Likewise.
+
+2012-07-22 Vladimir Serbinenko <phcoder@gmail.com>
+
New command `lsefi'.
* grub-core/Makefile.core.def (lsefi): New module.
diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
index 76133b4..beb52ee 100644
--- a/util/grub-mkconfig_lib.in
+++ b/util/grub-mkconfig_lib.in
@@ -255,19 +255,19 @@ version_find_latest ()
echo "$version_find_latest_a"
}
-# One layer of quotation is eaten by "", the second by sed, and the third by
-# printf; so this turns ' into \'. Note that you must use the output of
+# One layer of quotation is eaten by "" and the second by
+# sed; so this turns ' into \'. Note that you must use the output of
# this function in a printf format string.
grub_quote () {
- sed "s/'/'\\\\\\\\''/g"
+ sed "s/'/'\\\\''/g"
}
gettext_quoted () {
- gettext "$@" | sed "s/'/'\\\\\\\\''/g"
+ gettext "$@" | grub_quote
}
-# Run the first argument through gettext_quoted, and then pass that and all
+# Run the first argument through gettext, and then pass that and all
# remaining arguments to printf. This is a useful abbreviation and tends to
# be easier to type.
gettext_printf () {
diff --git a/util/grub.d/10_hurd.in b/util/grub.d/10_hurd.in
index 6451060..45f0ad3 100644
--- a/util/grub.d/10_hurd.in
+++ b/util/grub.d/10_hurd.in
@@ -117,7 +117,7 @@ EOF
opts=
fi
sed "s/^/$submenu_indentation/" << EOF
- echo '$message'
+ echo '$(echo "$message" | grub_quote)'
multiboot ${kernel} root=device:${GRUB_DEVICE#/dev/} $opts ${GRUB_CMDLINE_GNUMACH}
EOF
@@ -133,7 +133,7 @@ EOF
fi
sed "s/^/$submenu_indentation/" << EOF
- echo '$message'
+ echo '$(echo "$message" | grub_quote)'
module /hurd/${hurd_fs}.static ${hurd_fs} $opts \\
--multiboot-command-line='\${kernel-command-line}' \\
--host-priv-port='\${host-port}' \\
diff --git a/util/grub.d/10_illumos.in b/util/grub.d/10_illumos.in
index 422d56f..2477466 100644
--- a/util/grub.d/10_illumos.in
+++ b/util/grub.d/10_illumos.in
@@ -46,6 +46,7 @@ message="$(gettext_printf "Loading kernel of Illumos ...")"
ISADIR=
fi
zfs-bootfs $($grub_mkrelpath /) ZFS_BOOTFS
+ echo '$(echo "$message" | grub_quote)'
multiboot $($grub_mkrelpath /platform/i86pc/kernel)/\$ISADIR/unix /platform/i86pc/kernel/\$ISADIR/unix -B \$ZFS_BOOTFS,console=text
module $($grub_mkrelpath /platform/i86pc)/\$ISADIR/boot_archive /platform/i86pc/\$ISADIR/boot_archive
}
diff --git a/util/grub.d/10_kfreebsd.in b/util/grub.d/10_kfreebsd.in
index 93405a6..b0e84e2 100644
--- a/util/grub.d/10_kfreebsd.in
+++ b/util/grub.d/10_kfreebsd.in
@@ -100,7 +100,7 @@ kfreebsd_entry ()
printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
message="$(gettext_printf "Loading kernel of FreeBSD %s ..." ${version})"
sed "s/^/$submenu_indentation/" << EOF
- echo '$message'
+ echo '$(echo "$message" | grub_quote)'
kfreebsd ${rel_dirname}/${basename} ${args}
EOF
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 14402e8..35f7a83 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -134,14 +134,14 @@ linux_entry ()
fi
message="$(gettext_printf "Loading Linux %s ..." ${version})"
sed "s/^/$submenu_indentation/" << EOF
- echo '$message'
+ echo '$(echo "$message" | grub_quote)'
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
EOF
if test -n "${initrd}" ; then
# TRANSLATORS: ramdisk isn't identifier. Should be translated.
message="$(gettext_printf "Loading initial ramdisk ...")"
sed "s/^/$submenu_indentation/" << EOF
- echo '$message'
+ echo '$(echo "$message" | grub_quote)'
initrd ${rel_dirname}/${initrd}
EOF
fi
diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
index 1d94502..33f1592 100644
--- a/util/grub.d/20_linux_xen.in
+++ b/util/grub.d/20_linux_xen.in
@@ -120,16 +120,16 @@ linux_entry ()
xmessage="$(gettext_printf "Loading Xen %s ..." ${xen_version})"
lmessage="$(gettext_printf "Loading Linux %s ..." ${version})"
sed "s/^/$submenu_indentation/" << EOF
- echo '$xmessage'
+ echo '$(echo "$xmessage" | grub_quote)'
multiboot ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args}
- echo '$lmessage'
+ echo '$(echo "$lmessage" | grub_quote)'
module ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args}
EOF
if test -n "${initrd}" ; then
# TRANSLATORS: ramdisk isn't identifier. Should be translated.
message="$(gettext_printf "Loading initial ramdisk ...")"
sed "s/^/$submenu_indentation/" << EOF
- echo '$message'
+ echo '$(echo "$message" | grub_quote)'
module ${rel_dirname}/${initrd}
EOF
fi
--
1.8.2.1

View File

@ -1,59 +0,0 @@
From 6054ac4ca1ce5f3e4589bfead3c9c05af89f9ace Mon Sep 17 00:00:00 2001
From: starous <starous@pracovna>
Date: Sun, 22 Jul 2012 21:09:30 +0200
Subject: [PATCH 017/482] EHCI and OHCI PCI bus master
---
ChangeLog | 5 +++++
grub-core/bus/usb/ehci.c | 5 +++++
grub-core/bus/usb/ohci.c | 5 +++++
3 files changed, 15 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 0db6239..01d4f92 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-07-22 Ales Nesrsta <starous@volny.cz>
+
+ * grub-core/bus/usb/ehci.c: PCI iter. - added PCI bus master setting.
+ * grub-core/bus/usb/ohci.c: PCI iter. - added PCI bus master setting.
+
2012-07-22 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-mkconfig_lib.in (grub_quote): Remove extra layer of escape.
diff --git a/grub-core/bus/usb/ehci.c b/grub-core/bus/usb/ehci.c
index b700519..d99a4be 100644
--- a/grub-core/bus/usb/ehci.c
+++ b/grub-core/bus/usb/ehci.c
@@ -533,6 +533,11 @@ grub_ehci_pci_iter (grub_pci_device_t dev,
"EHCI grub_ehci_pci_iter: registers above 4G are not supported\n");
return 0;
}
+
+ /* Set bus master - needed for coreboot, VMware, broken BIOSes etc. */
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_COMMAND);
+ grub_pci_write_word(addr,
+ GRUB_PCI_COMMAND_BUS_MASTER | grub_pci_read_word(addr));
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: 32-bit EHCI OK\n");
}
diff --git a/grub-core/bus/usb/ohci.c b/grub-core/bus/usb/ohci.c
index 23cf631..6fabb4b 100644
--- a/grub-core/bus/usb/ohci.c
+++ b/grub-core/bus/usb/ohci.c
@@ -270,6 +270,11 @@ grub_ohci_pci_iter (grub_pci_device_t dev,
return 0;
#endif
+ /* Set bus master - needed for coreboot, VMware, broken BIOSes etc. */
+ addr = grub_pci_make_address (dev, GRUB_PCI_REG_COMMAND);
+ grub_pci_write_word(addr,
+ GRUB_PCI_COMMAND_BUS_MASTER | grub_pci_read_word(addr));
+
grub_dprintf ("ohci", "class=0x%02x 0x%02x interface 0x%02x\n",
class, subclass, interf);
}
--
1.8.2.1

View File

@ -1,7 +1,7 @@
From bc2c9699fa4a023894b7a72b649ebf39caab2882 Mon Sep 17 00:00:00 2001
From 7bbad98fa473db677f40d073e6c2d7a74b382537 Mon Sep 17 00:00:00 2001
From: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
Date: Wed, 24 Apr 2013 10:51:48 -0300
Subject: [PATCH 462/482] for ppc, reset console display attr when clear screen
Subject: [PATCH 17/37] for ppc, reset console display attr when clear screen
This should fix this bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=908519
@ -10,7 +10,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=908519
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/term/terminfo.c b/grub-core/term/terminfo.c
index a46bb4b..fee475b 100644
index 3d48b19..0825ca2 100644
--- a/grub-core/term/terminfo.c
+++ b/grub-core/term/terminfo.c
@@ -151,7 +151,7 @@ grub_terminfo_set_current (struct grub_term_output *term,
@ -23,5 +23,5 @@ index a46bb4b..fee475b 100644
data->reverse_video_off = grub_strdup ("\e[m");
if (grub_strcmp ("ieee1275", str) == 0)
--
1.8.2.1
1.8.4.2

View File

@ -1,7 +1,7 @@
From 4bd4022c48a2086b78725859f4c6f61aac5660c6 Mon Sep 17 00:00:00 2001
From 36b986f8d93282b139e3d0785fd16ddfd4b6759c Mon Sep 17 00:00:00 2001
From: William Jon McCann <william.jon.mccann@gmail.com>
Date: Wed, 15 May 2013 13:30:20 -0400
Subject: [PATCH 468/482] Don't write messages to the screen
Subject: [PATCH 18/37] Don't write messages to the screen
Writing messages to the screen before the menus or boot splash
happens so quickly it looks like something is wrong and isn't
@ -15,10 +15,10 @@ very appealing.
5 files changed, 35 deletions(-)
diff --git a/grub-core/boot/i386/pc/boot.S b/grub-core/boot/i386/pc/boot.S
index c0880c6..f45b982 100644
index b4975e2..432a472 100644
--- a/grub-core/boot/i386/pc/boot.S
+++ b/grub-core/boot/i386/pc/boot.S
@@ -242,9 +242,6 @@ real_start:
@@ -249,9 +249,6 @@ real_start:
/* save drive reference first thing! */
pushw %dx
@ -45,10 +45,10 @@ index d030a14..a494d02 100644
movw $LOCAL(firstlist), %di
diff --git a/grub-core/gettext/gettext.c b/grub-core/gettext/gettext.c
index 259251d..c06358c 100644
index 4880cef..1e5c21d 100644
--- a/grub-core/gettext/gettext.c
+++ b/grub-core/gettext/gettext.c
@@ -433,13 +433,9 @@ grub_gettext_env_write_lang (struct grub_env_var *var
@@ -437,13 +437,9 @@ grub_gettext_env_write_lang (struct grub_env_var *var
grub_err_t err;
err = grub_gettext_init_ext (&main_context, val, grub_env_get ("locale_dir"),
grub_env_get ("prefix"));
@ -62,7 +62,7 @@ index 259251d..c06358c 100644
return grub_strdup (val);
}
@@ -451,8 +447,6 @@ grub_gettext_reread_prefix (const char *val)
@@ -455,8 +451,6 @@ grub_gettext_reread_prefix (const char *val)
err = grub_gettext_init_ext (&main_context, grub_env_get ("lang"),
grub_env_get ("locale_dir"),
val);
@ -71,7 +71,7 @@ index 259251d..c06358c 100644
}
static char *
@@ -462,8 +456,6 @@ read_main (struct grub_env_var *var
@@ -466,8 +460,6 @@ read_main (struct grub_env_var *var
grub_err_t err;
err = grub_gettext_init_ext (&main_context, grub_env_get ("lang"), val,
grub_env_get ("prefix"));
@ -80,7 +80,7 @@ index 259251d..c06358c 100644
return grub_strdup (val);
}
@@ -474,9 +466,6 @@ read_secondary (struct grub_env_var *var
@@ -478,9 +470,6 @@ read_secondary (struct grub_env_var *var
grub_err_t err;
err = grub_gettext_init_ext (&secondary_context, grub_env_get ("lang"), val,
0);
@ -90,7 +90,7 @@ index 259251d..c06358c 100644
return grub_strdup (val);
}
@@ -502,12 +491,8 @@ GRUB_MOD_INIT (gettext)
@@ -506,12 +495,8 @@ GRUB_MOD_INIT (gettext)
err = grub_gettext_init_ext (&main_context, lang, grub_env_get ("locale_dir"),
grub_env_get ("prefix"));
@ -120,10 +120,10 @@ index 8ab7794..da47b18 100644
grub_boot_time ("Before loading embedded modules.");
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index d7ea670..5ed7695 100644
index ad34cc0..e762e1f 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -132,29 +132,22 @@ linux_entry ()
@@ -126,29 +126,22 @@ linux_entry ()
fi
printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
fi
@ -154,5 +154,5 @@ index d7ea670..5ed7695 100644
EOF
fi
--
1.8.2.1
1.8.4.2

View File

@ -1,115 +0,0 @@
From 8d7ed36e113b21de18a1b4a2bf81d218d79114d2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gr=C3=A9goire=20Sutre?= <gregoire.sutre@gmail.com>
Date: Wed, 1 Aug 2012 00:18:57 +0200
Subject: [PATCH 018/482] Update manual NetBSD-wise.
---
ChangeLog | 5 +++++
docs/grub.texi | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
2 files changed, 67 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 01d4f92..b246d4e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-07-31 Grégoire Sutre <gregoire.sutre@gmail.com>
+
+ * docs/grub.texi: Note that NetBSD/i386 is Multiboot-compliant.
+ (NetBSD): New subsection.
+
2012-07-22 Ales Nesrsta <starous@volny.cz>
* grub-core/bus/usb/ehci.c: PCI iter. - added PCI bus master setting.
diff --git a/docs/grub.texi b/docs/grub.texi
index b5954da..b0e7f59 100644
--- a/docs/grub.texi
+++ b/docs/grub.texi
@@ -311,8 +311,10 @@ tables are also loaded.
@item Support non-Multiboot kernels
Support many of the various free 32-bit kernels that lack Multiboot
-compliance (primarily FreeBSD, NetBSD, OpenBSD, and
-Linux). Chain-loading of other boot loaders is also supported.
+compliance (primarily FreeBSD, NetBSD@footnote{The NetBSD/i386 kernel
+is Multiboot-compliant, but lacks support for Multiboot modules.},
+OpenBSD, and Linux). Chain-loading of other boot loaders is also
+supported.
@item Load multiples modules
Fully support the Multiboot feature of loading multiple modules.
@@ -897,6 +899,7 @@ Here, we describe some caveats on several operating systems.
@menu
* GNU/Hurd::
* GNU/Linux::
+* NetBSD::
* DOS/Windows::
@end menu
@@ -997,6 +1000,63 @@ the size, run the command @command{uppermem} @emph{before} loading the
kernel. @xref{uppermem}, for more information.
+@node NetBSD
+@subsection NetBSD
+
+Booting a NetBSD kernel from GRUB is also relatively easy: first set
+GRUB's root device, then load the kernel and the modules, and finally
+run @command{boot}.
+
+@enumerate
+@item
+Set GRUB's root device to the partition holding the NetBSD root file
+system. For a disk with a NetBSD disk label, this is usually the first
+partition (a:). In that case, and assuming that the partition is on the
+first hard disk, set GRUB's root device as follows:
+
+@example
+grub> @kbd{insmod part_bsd}
+grub> @kbd{set root=(hd0,netbsd1)}
+@end example
+
+For a disk with a GUID Partition Table (GPT), and assuming that the
+NetBSD root partition is the third GPT partition, do this:
+
+@example
+grub> @kbd{insmod part_gpt}
+grub> @kbd{set root=(hd0,gpt3)}
+@end example
+
+@item
+Load the kernel using the command @command{knetbsd}:
+
+@example
+grub> @kbd{knetbsd /netbsd}
+@end example
+
+Various options may be given to @command{knetbsd}. These options are,
+for the most part, the same as in the NetBSD boot loader. For instance,
+to boot the system in single-user mode and with verbose messages, do
+this:
+
+@example
+grub> @kbd{knetbsd /netbsd -s -v}
+@end example
+
+@item
+If needed, load kernel modules with the command
+@command{knetbsd_module_elf}. A typical example is the module for the
+root file system:
+
+@example
+grub> @kbd{knetbsd_module_elf /stand/amd64/6.0/modules/ffs/ffs.kmod}
+@end example
+
+@item
+Finally, run the command @command{boot} (@pxref{boot}).
+@end enumerate
+
+
@node DOS/Windows
@subsection DOS/Windows
--
1.8.2.1

View File

@ -1,7 +1,7 @@
From e600b91cdae6a5e2bbf93f4062a2d005cd5681f3 Mon Sep 17 00:00:00 2001
From 2ddca048faf3d14cac3137693f05baa43814ddab Mon Sep 17 00:00:00 2001
From: William Jon McCann <william.jon.mccann@gmail.com>
Date: Wed, 15 May 2013 13:53:48 -0400
Subject: [PATCH 469/482] Don't print GNU GRUB header
Subject: [PATCH 19/37] Don't print GNU GRUB header
No one cares.
---
@ -9,18 +9,18 @@ No one cares.
1 file changed, 2 insertions(+)
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
index 70f6162..3344e0a 100644
index ac4ee63..3edb687 100644
--- a/grub-core/normal/main.c
+++ b/grub-core/normal/main.c
@@ -251,6 +251,7 @@ grub_normal_init_page (struct grub_term_output *term,
@@ -204,6 +204,7 @@ grub_normal_init_page (struct grub_term_output *term,
grub_term_cls (term);
+#if 0
msg_formatted = grub_xasprintf (msg, PACKAGE_VERSION);
msg_formatted = grub_xasprintf (_("GNU GRUB version %s"), PACKAGE_VERSION);
if (!msg_formatted)
return;
@@ -274,6 +275,7 @@ grub_normal_init_page (struct grub_term_output *term,
@@ -227,6 +228,7 @@ grub_normal_init_page (struct grub_term_output *term,
grub_putcode ('\n', term);
grub_putcode ('\n', term);
grub_free (unicode_msg);
@ -29,5 +29,5 @@ index 70f6162..3344e0a 100644
static void
--
1.8.2.1
1.8.4.2

View File

@ -1,68 +0,0 @@
From 8b2ef54da3e28cf66637a09c2a2afad9ee56a535 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gr=C3=A9goire=20Sutre?= <gregoire.sutre@gmail.com>
Date: Wed, 1 Aug 2012 01:06:53 +0200
Subject: [PATCH 019/482] Regenerate po/POTFILES.in with the following commmand
in a clean tree:
export LC_ALL=en_US.UTF-8
find . -iname '*.[ch]' | sort > po/POTFILES.in
---
ChangeLog | 4 ++++
po/POTFILES.in | 5 +++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b246d4e..dd1fda8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2012-07-31 Grégoire Sutre <gregoire.sutre@gmail.com>
+ * po/POTFILES.in: Regenerated.
+
+2012-07-31 Grégoire Sutre <gregoire.sutre@gmail.com>
+
* docs/grub.texi: Note that NetBSD/i386 is Multiboot-compliant.
(NetBSD): New subsection.
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 987b37a..01cc53c 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -32,6 +32,7 @@
./grub-core/commands/efi/acpi.c
./grub-core/commands/efi/fixvideo.c
./grub-core/commands/efi/loadbios.c
+./grub-core/commands/efi/lsefi.c
./grub-core/commands/efi/lsefimmap.c
./grub-core/commands/efi/lsefisystab.c
./grub-core/commands/efi/lssal.c
@@ -558,8 +559,8 @@
./grub-core/term/emu/console.c
./grub-core/term/gfxterm.c
./grub-core/term/i386/pc/console.c
+./grub-core/term/i386/pc/mda_text.c
./grub-core/term/i386/pc/vga_text.c
-./grub-core/term/i386/vga_common.c
./grub-core/term/ieee1275/console.c
./grub-core/term/ieee1275/escc.c
./grub-core/term/ieee1275/serial.c
@@ -730,7 +731,6 @@
./include/grub/i386/time.h
./include/grub/i386/tsc.h
./include/grub/i386/types.h
-./include/grub/i386/vga_common.h
./include/grub/i386/xnu.h
./include/grub/ia64/efi/memory.h
./include/grub/ia64/efi/time.h
@@ -867,6 +867,7 @@
./include/grub/util/ofpath.h
./include/grub/util/resolve.h
./include/grub/vga.h
+./include/grub/vgaregs.h
./include/grub/video_fb.h
./include/grub/video.h
./include/grub/x86_64/at_keyboard.h
--
1.8.2.1

View File

@ -1,7 +1,7 @@
From 86ce8133e947621554f185ce50af44a7b599479d Mon Sep 17 00:00:00 2001
From fcb74241d96bd86f0ecb50eba27421078251d769 Mon Sep 17 00:00:00 2001
From: William Jon McCann <william.jon.mccann@gmail.com>
Date: Wed, 15 May 2013 17:49:45 -0400
Subject: [PATCH 471/482] Don't add '*' to highlighted row
Subject: [PATCH 20/37] Don't add '*' to highlighted row
It is already highlighted.
---
@ -9,10 +9,10 @@ It is already highlighted.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
index faf1d3e..3bf8a53 100644
index 2ff2941..daf92b5 100644
--- a/grub-core/normal/menu_text.c
+++ b/grub-core/normal/menu_text.c
@@ -200,7 +200,7 @@ print_entry (int y, int highlight, grub_menu_entry_t entry,
@@ -242,7 +242,7 @@ print_entry (int y, int highlight, grub_menu_entry_t entry,
unicode_title[i] = ' ';
if (data->geo.num_entries > 1)
@ -22,5 +22,5 @@ index faf1d3e..3bf8a53 100644
grub_print_ucs4_menu (unicode_title,
unicode_title + len,
--
1.8.2.1
1.8.4.2

View File

@ -1,38 +0,0 @@
From cb6d50b03d383cae32b0fbe308acc76c9d041fc6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gr=C3=A9goire=20Sutre?= <gregoire.sutre@gmail.com>
Date: Sun, 5 Aug 2012 16:49:03 +0200
Subject: [PATCH 020/482] Strengthen the configure test for working -nostdinc
-isystem.
---
ChangeLog | 4 ++++
configure.ac | 1 +
2 files changed, 5 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index dd1fda8..a0a81b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-08-05 Grégoire Sutre <gregoire.sutre@gmail.com>
+
+ * configure.ac: Strengthen the test for working -nostdinc -isystem.
+
2012-07-31 Grégoire Sutre <gregoire.sutre@gmail.com>
* po/POTFILES.in: Regenerated.
diff --git a/configure.ac b/configure.ac
index 91b36d0..190665d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -717,6 +717,7 @@ AC_CACHE_CHECK([whether -nostdinc -isystem works], [grub_cv_cc_isystem], [
SAVED_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$TARGET_CPPFLAGS -nostdinc -isystem `$TARGET_CC -print-file-name=include`"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
+#include <stddef.h>
int va_arg_func (int fixed, va_list args);]], [[]])],
[grub_cv_cc_isystem=yes],
[grub_cv_cc_isystem=no])
--
1.8.2.1

View File

@ -1,55 +0,0 @@
From 96aea00a1794415ecc4f01d3e05569927df19420 Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@ubuntu.com>
Date: Tue, 4 Sep 2012 18:33:33 +0100
Subject: [PATCH 021/482] * .bzrignore: Add grub-bios-setup, grub-ofpathname,
and grub-sparc64-setup.
---
.bzrignore | 3 +++
ChangeLog | 5 +++++
2 files changed, 8 insertions(+)
diff --git a/.bzrignore b/.bzrignore
index 64aa4c9..e05e5d9 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -34,6 +34,7 @@ genkernsyms.sh
gensymlist.sh
gentrigtables
grub-bin2h
+grub-bios-setup
grub_cmd_echo
grub_cmd_regexp
grub-editenv
@@ -49,6 +50,7 @@ grub-macho2img
grub-menulst2cfg
grub-mk*
grub-mount
+grub-ofpathname
grub-pe2elf
grub-probe
grub_probe_init.c
@@ -86,6 +88,7 @@ grub_setup_init.c
grub_setup_init.h
grub-shell
grub-shell-tester
+grub-sparc64-setup
*.img
*.image
include/grub/cpu
diff --git a/ChangeLog b/ChangeLog
index a0a81b1..ed23d17 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-09-04 Colin Watson <cjwatson@ubuntu.com>
+
+ * .bzrignore: Add grub-bios-setup, grub-ofpathname, and
+ grub-sparc64-setup.
+
2012-08-05 Grégoire Sutre <gregoire.sutre@gmail.com>
* configure.ac: Strengthen the test for working -nostdinc -isystem.
--
1.8.2.1

View File

@ -1,7 +1,7 @@
From 4ecfec1a77fbb402caa1bb8a2794fe76f40ff1bf Mon Sep 17 00:00:00 2001
From 844d6d3e0095ce2601ea1681b25445b83d69c202 Mon Sep 17 00:00:00 2001
From: William Jon McCann <william.jon.mccann@gmail.com>
Date: Wed, 15 May 2013 17:49:45 -0400
Subject: [PATCH 472/482] Don't add '*' to highlighted row
Subject: [PATCH 21/37] Don't add '*' to highlighted row
It is already highlighted.
---
@ -9,10 +9,10 @@ It is already highlighted.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
index 3bf8a53..be803b2 100644
index daf92b5..2f84fcc 100644
--- a/grub-core/normal/menu_text.c
+++ b/grub-core/normal/menu_text.c
@@ -200,7 +200,7 @@ print_entry (int y, int highlight, grub_menu_entry_t entry,
@@ -242,7 +242,7 @@ print_entry (int y, int highlight, grub_menu_entry_t entry,
unicode_title[i] = ' ';
if (data->geo.num_entries > 1)
@ -22,5 +22,5 @@ index 3bf8a53..be803b2 100644
grub_print_ucs4_menu (unicode_title,
unicode_title + len,
--
1.8.2.1
1.8.4.2

View File

@ -1,18 +1,18 @@
From 394e83c86e75fadbbdeda4651f52fd2013df6a6b Mon Sep 17 00:00:00 2001
From 1ead3c560c50ad3a391331dc441c5a7f04baf8f9 Mon Sep 17 00:00:00 2001
From: William Jon McCann <william.jon.mccann@gmail.com>
Date: Fri, 7 Jun 2013 11:09:04 -0400
Subject: [PATCH 474/482] Message string cleanups
Subject: [PATCH 22/37] Message string cleanups
Make use of terminology consistent. Remove jargon.
---
grub-core/normal/menu_text.c | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
grub-core/normal/menu_text.c | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
index 5f6654f..d304e2f 100644
index 2f84fcc..9d20c6b 100644
--- a/grub-core/normal/menu_text.c
+++ b/grub-core/normal/menu_text.c
@@ -116,16 +116,14 @@ print_message (int nested, int edit, struct grub_term_output *term, int dry_run)
@@ -157,9 +157,8 @@ print_message (int nested, int edit, struct grub_term_output *term, int dry_run)
if (edit)
{
@ -24,15 +24,18 @@ index 5f6654f..d304e2f 100644
STANDARD_MARGIN, STANDARD_MARGIN,
term, dry_run);
}
else
@@ -167,8 +166,8 @@ command-line or ESC to discard edits and return to the GRUB menu."),
{
- const char *msg = _("Use the %C and %C keys to select which "
- "entry is highlighted.");
+ const char *msg = _("Use the %C and %C keys to change the selection.");
char *msg_translated;
msg_translated = grub_xasprintf (msg, GRUB_UNICODE_UPARROW,
@@ -140,17 +138,15 @@ command-line or ESC to discard edits and return to the GRUB menu."),
- msg_translated = grub_xasprintf (_("Use the %C and %C keys to select which "
- "entry is highlighted."),
+ msg_translated = grub_xasprintf (_("Use the %C and %C keys to change the "
+ "selection."),
GRUB_UNICODE_UPARROW,
GRUB_UNICODE_DOWNARROW);
if (!msg_translated)
@@ -181,17 +180,15 @@ command-line or ESC to discard edits and return to the GRUB menu."),
if (nested)
{
ret += grub_print_message_indented_real
@ -54,15 +57,15 @@ index 5f6654f..d304e2f 100644
STANDARD_MARGIN, STANDARD_MARGIN, term, dry_run);
}
}
@@ -381,7 +377,7 @@ static void
menu_text_print_timeout (int timeout, void *dataptr)
{
const char *msg =
- _("The highlighted entry will be executed automatically in %ds.");
+ _("The selected entry will be started automatically in %d seconds.");
const char *msg_terse = _("%ds");
struct menu_viewer_data *data = dataptr;
char *msg_translated = 0;
@@ -440,7 +437,7 @@ menu_text_print_timeout (int timeout, void *dataptr)
|| data->timeout_msg == TIMEOUT_TERSE_NO_MARGIN)
msg_translated = grub_xasprintf (_("%ds"), timeout);
else
- msg_translated = grub_xasprintf (_("The highlighted entry will be executed automatically in %ds."), timeout);
+ msg_translated = grub_xasprintf (_("The selected entry will be started automatically in %ds."), timeout);
if (!msg_translated)
{
grub_print_error ();
--
1.8.2.1
1.8.4.2

View File

@ -1,38 +0,0 @@
From cec2f4441396afd4c6abad10e51e5f0fe1dad686 Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@ubuntu.com>
Date: Tue, 4 Sep 2012 18:39:40 +0100
Subject: [PATCH 022/482] * docs/man/grub-mkdevicemap.h2m: Remove, since
grub-mkdevicemap is gone.
---
ChangeLog | 5 +++++
docs/man/grub-mkdevicemap.h2m | 4 ----
2 files changed, 5 insertions(+), 4 deletions(-)
delete mode 100644 docs/man/grub-mkdevicemap.h2m
diff --git a/ChangeLog b/ChangeLog
index ed23d17..09ffe65 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-09-04 Colin Watson <cjwatson@debian.org>
+
+ * docs/man/grub-mkdevicemap.h2m: Remove, since grub-mkdevicemap is
+ gone.
+
2012-09-04 Colin Watson <cjwatson@ubuntu.com>
* .bzrignore: Add grub-bios-setup, grub-ofpathname, and
diff --git a/docs/man/grub-mkdevicemap.h2m b/docs/man/grub-mkdevicemap.h2m
deleted file mode 100644
index 3ef8e97..0000000
--- a/docs/man/grub-mkdevicemap.h2m
+++ /dev/null
@@ -1,4 +0,0 @@
-[NAME]
-grub-mkdevicemap \- generate a GRUB device map file automatically
-[SEE ALSO]
-.BR grub-install (8)
--
1.8.2.1

View File

@ -1,17 +1,17 @@
From 5695900965cfaccf5e60625d03d4e5b1894ed2e2 Mon Sep 17 00:00:00 2001
From 05a286de64f28457140082caef238a83cc9465bd Mon Sep 17 00:00:00 2001
From: William Jon McCann <william.jon.mccann@gmail.com>
Date: Fri, 7 Jun 2013 14:08:23 -0400
Subject: [PATCH 475/482] Fix border spacing now that we aren't displaying it
Subject: [PATCH 23/37] Fix border spacing now that we aren't displaying it
---
grub-core/normal/menu_text.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
index d304e2f..e30aaa9 100644
index 9d20c6b..aa3454f 100644
--- a/grub-core/normal/menu_text.c
+++ b/grub-core/normal/menu_text.c
@@ -283,12 +283,12 @@ grub_menu_init_page (int nested, int edit,
@@ -331,12 +331,12 @@ grub_menu_init_page (int nested, int edit,
int empty_lines = 1;
int version_msg = 1;
@ -28,5 +28,5 @@ index d304e2f..e30aaa9 100644
geo->timeout_lines = 2;
--
1.8.2.1
1.8.4.2

View File

@ -1,27 +0,0 @@
From 9023fdb4b0f75d3c8e1d0e1b0199ecd416a18c59 Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@ubuntu.com>
Date: Tue, 4 Sep 2012 18:56:13 +0100
Subject: [PATCH 023/482] * grub-core/mmap/mips/loongson: Remove empty
directory.
---
ChangeLog | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 09ffe65..5a938ae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
-2012-09-04 Colin Watson <cjwatson@debian.org>
+2012-09-04 Colin Watson <cjwatson@ubuntu.com>
+
+ * grub-core/mmap/mips/loongson: Remove empty directory.
+
+2012-09-04 Colin Watson <cjwatson@ubuntu.com>
* docs/man/grub-mkdevicemap.h2m: Remove, since grub-mkdevicemap is
gone.
--
1.8.2.1

View File

@ -1,46 +0,0 @@
From 75887218d652d578af29494dd54cd8733643653b Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@ubuntu.com>
Date: Tue, 4 Sep 2012 18:59:41 +0100
Subject: [PATCH 024/482] * Makefile.am (EXTRA_DIST): Add
grub-core/tests/boot/linux.init-mips.S,
grub-core/tests/boot/linux.init-ppc.S, and
grub-core/tests/boot/linux-ppc.cfg.
---
ChangeLog | 7 +++++++
Makefile.am | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 5a938ae..b1950ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2012-09-04 Colin Watson <cjwatson@ubuntu.com>
+ * Makefile.am (EXTRA_DIST): Add
+ grub-core/tests/boot/linux.init-mips.S,
+ grub-core/tests/boot/linux.init-ppc.S, and
+ grub-core/tests/boot/linux-ppc.cfg.
+
+2012-09-04 Colin Watson <cjwatson@ubuntu.com>
+
* grub-core/mmap/mips/loongson: Remove empty directory.
2012-09-04 Colin Watson <cjwatson@ubuntu.com>
diff --git a/Makefile.am b/Makefile.am
index db9e930..3bb911c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -377,7 +377,7 @@ if COND_powerpc_ieee1275
BOOTCHECKS = bootcheck-linux-ppc
endif
-EXTRA_DIST += grub-core/tests/boot/kbsd.init-i386.S grub-core/tests/boot/kbsd.init-x86_64.S grub-core/tests/boot/kbsd.spec.txt grub-core/tests/boot/kernel-8086.S grub-core/tests/boot/kernel-i386.S grub-core/tests/boot/kfreebsd-aout.cfg grub-core/tests/boot/kfreebsd.cfg grub-core/tests/boot/kfreebsd.init-i386.S grub-core/tests/boot/kfreebsd.init-x86_64.S grub-core/tests/boot/knetbsd.cfg grub-core/tests/boot/kopenbsd.cfg grub-core/tests/boot/kopenbsdlabel.txt grub-core/tests/boot/linux16.cfg grub-core/tests/boot/linux.cfg grub-core/tests/boot/linux.init-i386.S grub-core/tests/boot/linux.init-x86_64.S grub-core/tests/boot/multiboot2.cfg grub-core/tests/boot/multiboot.cfg grub-core/tests/boot/ntldr.cfg grub-core/tests/boot/pc-chainloader.cfg
+EXTRA_DIST += grub-core/tests/boot/kbsd.init-i386.S grub-core/tests/boot/kbsd.init-x86_64.S grub-core/tests/boot/kbsd.spec.txt grub-core/tests/boot/kernel-8086.S grub-core/tests/boot/kernel-i386.S grub-core/tests/boot/kfreebsd-aout.cfg grub-core/tests/boot/kfreebsd.cfg grub-core/tests/boot/kfreebsd.init-i386.S grub-core/tests/boot/kfreebsd.init-x86_64.S grub-core/tests/boot/knetbsd.cfg grub-core/tests/boot/kopenbsd.cfg grub-core/tests/boot/kopenbsdlabel.txt grub-core/tests/boot/linux16.cfg grub-core/tests/boot/linux.cfg grub-core/tests/boot/linux.init-i386.S grub-core/tests/boot/linux.init-mips.S grub-core/tests/boot/linux.init-ppc.S grub-core/tests/boot/linux.init-x86_64.S grub-core/tests/boot/linux-ppc.cfg grub-core/tests/boot/multiboot2.cfg grub-core/tests/boot/multiboot.cfg grub-core/tests/boot/ntldr.cfg grub-core/tests/boot/pc-chainloader.cfg
.PHONY: bootcheck-linux-i386 bootcheck-linux-x86_64 \
bootcheck-kfreebsd-i386 bootcheck-kfreebsd-x86_64 \
--
1.8.2.1

View File

@ -1,7 +1,7 @@
From 808d9cbac57e2aa8bbff22720dec833a1e69722b Mon Sep 17 00:00:00 2001
From 47844331e2f4d8599f5a1f702600c7933cc04b0f Mon Sep 17 00:00:00 2001
From: William Jon McCann <william.jon.mccann@gmail.com>
Date: Fri, 7 Jun 2013 14:08:49 -0400
Subject: [PATCH 476/482] Use the correct indentation for the term help text
Subject: [PATCH 24/37] Use the correct indentation for the term help text
That is consistent with the menu help text
---
@ -9,10 +9,10 @@ That is consistent with the menu help text
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
index 3344e0a..f04d6f8 100644
index 3edb687..6c24a07 100644
--- a/grub-core/normal/main.c
+++ b/grub-core/normal/main.c
@@ -465,8 +465,8 @@ grub_normal_reader_init (int nested)
@@ -418,8 +418,8 @@ grub_normal_reader_init (int nested)
grub_normal_init_page (term, 1);
grub_term_setcursor (term, 1);
@ -24,5 +24,5 @@ index 3344e0a..f04d6f8 100644
grub_print_message_indented (msg_formatted, 0, 0, term);
grub_putcode ('\n', term);
--
1.8.2.1
1.8.4.2

View File

@ -1,17 +1,17 @@
From 217d15e1a80e72ba7a9c643111e74ff4e3ffa803 Mon Sep 17 00:00:00 2001
From 1e7cb9ee6de26aea57bd7921543abe0d601d7f98 Mon Sep 17 00:00:00 2001
From: William Jon McCann <william.jon.mccann@gmail.com>
Date: Fri, 7 Jun 2013 14:30:55 -0400
Subject: [PATCH 477/482] Indent menu entries
Subject: [PATCH 25/37] Indent menu entries
---
grub-core/normal/menu_text.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
index e30aaa9..88cd9d0 100644
index aa3454f..01b6f1c 100644
--- a/grub-core/normal/menu_text.c
+++ b/grub-core/normal/menu_text.c
@@ -196,7 +196,8 @@ print_entry (int y, int highlight, grub_menu_entry_t entry,
@@ -239,7 +239,8 @@ print_entry (int y, int highlight, grub_menu_entry_t entry,
unicode_title[i] = ' ';
if (data->geo.num_entries > 1)
@ -22,5 +22,5 @@ index e30aaa9..88cd9d0 100644
grub_print_ucs4_menu (unicode_title,
unicode_title + len,
--
1.8.2.1
1.8.4.2

View File

@ -1,45 +0,0 @@
From e8ec492c1f16328149e2e2c1eed6c300529bcb7a Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@ubuntu.com>
Date: Tue, 4 Sep 2012 23:35:38 +0100
Subject: [PATCH 025/482] * Makefile.am (EXTRA_DIST): Add linguas.sh. It's
only strictly required for checkouts from bzr, but it may be useful for users
or distributors wishing to update translations against a tarball
distribution, and it can be helpful for the tarball to be a superset of
what's in bzr.
---
ChangeLog | 8 ++++++++
Makefile.am | 2 ++
2 files changed, 10 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index b1950ab..fbef0c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2012-09-04 Colin Watson <cjwatson@ubuntu.com>
+ * Makefile.am (EXTRA_DIST): Add linguas.sh. It's only strictly
+ required for checkouts from bzr, but it may be useful for users or
+ distributors wishing to update translations against a tarball
+ distribution, and it can be helpful for the tarball to be a superset
+ of what's in bzr.
+
+2012-09-04 Colin Watson <cjwatson@ubuntu.com>
+
* Makefile.am (EXTRA_DIST): Add
grub-core/tests/boot/linux.init-mips.S,
grub-core/tests/boot/linux.init-ppc.S, and
diff --git a/Makefile.am b/Makefile.am
index 3bb911c..30aa5a7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -390,3 +390,5 @@ SUCCESSFUL_BOOT_STRING=3e49994fd5d82b7c9298d672d774080d
BOOTCHECK_TIMEOUT=180
bootcheck: $(BOOTCHECKS)
+
+EXTRA_DIST += linguas.sh
--
1.8.2.1

View File

@ -1,17 +1,17 @@
From f59bafe400a33ebf4e72b1f7979894680b92ee03 Mon Sep 17 00:00:00 2001
From b46a40849da48fd70dde9253a55c80c1a0fe1216 Mon Sep 17 00:00:00 2001
From: William Jon McCann <william.jon.mccann@gmail.com>
Date: Fri, 7 Jun 2013 14:59:36 -0400
Subject: [PATCH 478/482] Fix margins
Subject: [PATCH 26/37] Fix margins
---
grub-core/normal/menu_text.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
index 88cd9d0..851ed13 100644
index 01b6f1c..ead3391 100644
--- a/grub-core/normal/menu_text.c
+++ b/grub-core/normal/menu_text.c
@@ -285,17 +285,15 @@ grub_menu_init_page (int nested, int edit,
@@ -333,17 +333,15 @@ grub_menu_init_page (int nested, int edit,
int version_msg = 1;
geo->border = 0;
@ -33,5 +33,5 @@ index 88cd9d0..851ed13 100644
- geo->timeout_lines /* timeout */
- 1 /* empty final line */;
--
1.8.2.1
1.8.4.2

View File

@ -1,39 +0,0 @@
From 981361e1db432371d895ac1339cc4a940cd6830e Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Wed, 5 Sep 2012 08:45:07 +0200
Subject: [PATCH 026/482] * grub-core/fs/xfs.c (grub_xfs_read_block):
Make keys a const pointer.
---
ChangeLog | 4 ++++
grub-core/fs/xfs.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index fbef0c3..0cf6bea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-09-05 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/fs/xfs.c (grub_xfs_read_block): Make keys a const pointer.
+
2012-09-04 Colin Watson <cjwatson@ubuntu.com>
* Makefile.am (EXTRA_DIST): Add linguas.sh. It's only strictly
diff --git a/grub-core/fs/xfs.c b/grub-core/fs/xfs.c
index 2c6b00c..1ed048f 100644
--- a/grub-core/fs/xfs.c
+++ b/grub-core/fs/xfs.c
@@ -285,7 +285,7 @@ grub_xfs_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
if (node->inode.format == XFS_INODE_FORMAT_BTREE)
{
- grub_uint64_t *keys;
+ const grub_uint64_t *keys;
int recoffset;
leaf = grub_malloc (node->data->bsize);
--
1.8.2.1

View File

@ -1,7 +1,7 @@
From ec4b06bcd18d2df965df4a8d53c44ed034cd2d21 Mon Sep 17 00:00:00 2001
From 90fbb113660ba7157f0f3f8b89fccf1259c7ebcc Mon Sep 17 00:00:00 2001
From: Matthew Garrett <matthew.garrett@nebula.com>
Date: Wed, 12 Jun 2013 11:51:49 -0400
Subject: [PATCH 479/482] Add support for UEFI operating systems returned by
Subject: [PATCH 27/37] Add support for UEFI operating systems returned by
os-prober
os-prober returns UEFI operating systems in the form:
@ -15,10 +15,10 @@ contrast to legacy OSes, where path is the device string. Handle this case.
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
index 04f32a1..f8ae241 100644
index 0470e66..8650a79 100644
--- a/util/grub.d/30_os-prober.in
+++ b/util/grub.d/30_os-prober.in
@@ -274,9 +274,23 @@ EOF
@@ -319,9 +319,23 @@ EOF
EOF
;;
*)
@ -47,5 +47,5 @@ index 04f32a1..f8ae241 100644
esac
done
--
1.8.2.1
1.8.4.2

View File

@ -1,41 +0,0 @@
From 33437c4676de37bf30679b5874813af38e5c00c2 Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Wed, 5 Sep 2012 08:47:39 +0200
Subject: [PATCH 027/482] * grub-core/partmap/dvh.c (grub_dvh_is_valid):
Add missing byteswap.
---
ChangeLog | 4 ++++
grub-core/partmap/dvh.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 0cf6bea..70f0c86 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2012-09-05 Vladimir Serbinenko <phcoder@gmail.com>
+ * grub-core/partmap/dvh.c (grub_dvh_is_valid): Add missing byteswap.
+
+2012-09-05 Vladimir Serbinenko <phcoder@gmail.com>
+
* grub-core/fs/xfs.c (grub_xfs_read_block): Make keys a const pointer.
2012-09-04 Colin Watson <cjwatson@ubuntu.com>
diff --git a/grub-core/partmap/dvh.c b/grub-core/partmap/dvh.c
index c8f467e..79ec01b 100644
--- a/grub-core/partmap/dvh.c
+++ b/grub-core/partmap/dvh.c
@@ -57,7 +57,7 @@ grub_dvh_is_valid (grub_uint32_t *label)
for (pos = label;
pos < (label + sizeof (struct grub_dvh_block) / 4);
pos++)
- sum += *pos;
+ sum += grub_be_to_cpu32 (*pos);
return ! sum;
}
--
1.8.2.1

View File

@ -1,7 +1,7 @@
From 243ef12c384dc0e9c71fd7894f2359a96e0c833d Mon Sep 17 00:00:00 2001
From e9c924a04e94f3fcc743fd297f183ade261ed717 Mon Sep 17 00:00:00 2001
From: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
Date: Tue, 11 Jun 2013 15:14:05 -0300
Subject: [PATCH 480/482] Disable GRUB video support for IBM power machines
Subject: [PATCH 28/37] Disable GRUB video support for IBM power machines
Should fix the problem in bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=973205
@ -12,7 +12,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=973205
3 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/grub-core/kern/ieee1275/cmain.c b/grub-core/kern/ieee1275/cmain.c
index abd1ca9..22a931e 100644
index d92ae14..409c922 100644
--- a/grub-core/kern/ieee1275/cmain.c
+++ b/grub-core/kern/ieee1275/cmain.c
@@ -88,7 +88,10 @@ grub_ieee1275_find_options (void)
@ -28,10 +28,10 @@ index abd1ca9..22a931e 100644
/* Old Macs have no key repeat, newer ones have fully working one.
The ones inbetween when repeated key generates an escaoe sequence
diff --git a/grub-core/video/ieee1275.c b/grub-core/video/ieee1275.c
index 5c58702..298662d 100644
index 0b150ec..813ab38 100644
--- a/grub-core/video/ieee1275.c
+++ b/grub-core/video/ieee1275.c
@@ -347,9 +347,12 @@ static struct grub_video_adapter grub_video_ieee1275_adapter =
@@ -351,9 +351,12 @@ static struct grub_video_adapter grub_video_ieee1275_adapter =
GRUB_MOD_INIT(ieee1275_fb)
{
@ -48,10 +48,10 @@ index 5c58702..298662d 100644
GRUB_MOD_FINI(ieee1275_fb)
diff --git a/include/grub/ieee1275/ieee1275.h b/include/grub/ieee1275/ieee1275.h
index 61d5769..b08a30d 100644
index 2b64a92..29f3a1d 100644
--- a/include/grub/ieee1275/ieee1275.h
+++ b/include/grub/ieee1275/ieee1275.h
@@ -139,6 +139,8 @@ enum grub_ieee1275_flag
@@ -145,6 +145,8 @@ enum grub_ieee1275_flag
GRUB_IEEE1275_FLAG_BROKEN_REPEAT,
GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN,
@ -61,5 +61,5 @@ index 61d5769..b08a30d 100644
extern int EXPORT_FUNC(grub_ieee1275_test_flag) (enum grub_ieee1275_flag flag);
--
1.8.2.1
1.8.4.2

View File

@ -1,42 +0,0 @@
From b7ae222dae310111f17da6e1fc072237977ac417 Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Wed, 5 Sep 2012 08:51:31 +0200
Subject: [PATCH 028/482] * grub-core/script/yylex.l: Ignore
unused-function and sign-compare warnings.
---
ChangeLog | 5 +++++
grub-core/script/yylex.l | 2 ++
2 files changed, 7 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 70f0c86..66a0245 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2012-09-05 Vladimir Serbinenko <phcoder@gmail.com>
+ * grub-core/script/yylex.l: Ignore unused-function and sign-compare
+ warnings.
+
+2012-09-05 Vladimir Serbinenko <phcoder@gmail.com>
+
* grub-core/partmap/dvh.c (grub_dvh_is_valid): Add missing byteswap.
2012-09-05 Vladimir Serbinenko <phcoder@gmail.com>
diff --git a/grub-core/script/yylex.l b/grub-core/script/yylex.l
index f6a39c5..8fdcfef 100644
--- a/grub-core/script/yylex.l
+++ b/grub-core/script/yylex.l
@@ -29,6 +29,8 @@
#pragma GCC diagnostic ignored "-Wmissing-prototypes"
#pragma GCC diagnostic ignored "-Wmissing-declarations"
#pragma GCC diagnostic ignored "-Wunsafe-loop-optimizations"
+#pragma GCC diagnostic ignored "-Wunused-function"
+#pragma GCC diagnostic ignored "-Wsign-compare"
#define yyfree grub_lexer_yyfree
#define yyalloc grub_lexer_yyalloc
--
1.8.2.1

View File

@ -1,7 +1,7 @@
From 902e78da8cda7fadd3841cbe5473d60e07229f1c Mon Sep 17 00:00:00 2001
From 7ed7010a4c3cbbd417afb12ba6eaabf250bbc38d Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Wed, 12 Jun 2013 14:39:31 -0400
Subject: [PATCH 481/482] Revert "Add bootpath device to the list" (#967862)
Subject: [PATCH 29/37] Revert "Add bootpath device to the list" (#967862)
commit c6e8465f fixes this issue.
@ -11,10 +11,10 @@ This reverts commit a2780be06f7de35a0dd4cc19a68b151176707ae7.
1 file changed, 32 deletions(-)
diff --git a/grub-core/disk/ieee1275/ofdisk.c b/grub-core/disk/ieee1275/ofdisk.c
index a940771..2a31ecd 100644
index f13c4bb..6870b39 100644
--- a/grub-core/disk/ieee1275/ofdisk.c
+++ b/grub-core/disk/ieee1275/ofdisk.c
@@ -229,10 +229,6 @@ dev_iterate (const struct grub_ieee1275_devalias *alias)
@@ -274,10 +274,6 @@ dev_iterate (const struct grub_ieee1275_devalias *alias)
static void
scan (void)
{
@ -25,7 +25,7 @@ index a940771..2a31ecd 100644
struct grub_ieee1275_devalias alias;
FOR_IEEE1275_DEVALIASES(alias)
{
@@ -243,34 +239,6 @@ scan (void)
@@ -288,34 +284,6 @@ scan (void)
FOR_IEEE1275_DEVCHILDREN("/", alias)
dev_iterate (&alias);
@ -61,5 +61,5 @@ index a940771..2a31ecd 100644
static int
--
1.8.2.1
1.8.4.2

View File

@ -1,67 +0,0 @@
From 41596a656df83fe0bd72944b711c127c68d28a94 Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Wed, 5 Sep 2012 08:56:08 +0200
Subject: [PATCH 029/482] * grub-core/disk/ieee1275/ofdisk.c (scan):
Check function return value. * grub-core/lib/ieee1275/datetime.c
(grub_get_datetime): Likewise. (grub_set_datetime): Likewise.
---
ChangeLog | 6 ++++++
grub-core/disk/ieee1275/ofdisk.c | 2 +-
grub-core/lib/ieee1275/datetime.c | 4 ++--
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 66a0245..ff982b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2012-09-05 Vladimir Serbinenko <phcoder@gmail.com>
+ * grub-core/disk/ieee1275/ofdisk.c (scan): Check function return value.
+ * grub-core/lib/ieee1275/datetime.c (grub_get_datetime): Likewise.
+ (grub_set_datetime): Likewise.
+
+2012-09-05 Vladimir Serbinenko <phcoder@gmail.com>
+
* grub-core/script/yylex.l: Ignore unused-function and sign-compare
warnings.
diff --git a/grub-core/disk/ieee1275/ofdisk.c b/grub-core/disk/ieee1275/ofdisk.c
index b0aa7ec..c9535a0 100644
--- a/grub-core/disk/ieee1275/ofdisk.c
+++ b/grub-core/disk/ieee1275/ofdisk.c
@@ -178,7 +178,7 @@ scan (void)
args.table = 0;
args.nentries = 0;
- if (IEEE1275_CALL_ENTRY_FN (&args) == -1)
+ if (IEEE1275_CALL_ENTRY_FN (&args) == -1 || args.catch_result)
{
grub_ieee1275_close (ihandle);
return 0;
diff --git a/grub-core/lib/ieee1275/datetime.c b/grub-core/lib/ieee1275/datetime.c
index 1947135..8792429 100644
--- a/grub-core/lib/ieee1275/datetime.c
+++ b/grub-core/lib/ieee1275/datetime.c
@@ -89,7 +89,7 @@ grub_get_datetime (struct grub_datetime *datetime)
grub_ieee1275_close (ihandle);
- if (status == -1)
+ if (status == -1 || args.catch_result)
return grub_error (GRUB_ERR_IO, "get-time failed");
datetime->year = args.year;
@@ -148,7 +148,7 @@ grub_set_datetime (struct grub_datetime *datetime)
grub_ieee1275_close (ihandle);
- if (status == -1)
+ if (status == -1 || args.catch_result)
return grub_error (GRUB_ERR_IO, "set-time failed");
return GRUB_ERR_NONE;
--
1.8.2.1

View File

@ -1,7 +1,7 @@
From 80528f8d6ff44a0e2cd043cd0ba11e06aac8aea2 Mon Sep 17 00:00:00 2001
From df8b98634bc9113e54e14c98803fc89c02bc28f3 Mon Sep 17 00:00:00 2001
From: Gustavo Luiz Duarte <gustavold@linux.vnet.ibm.com>
Date: Wed, 12 Jun 2013 23:25:30 -0500
Subject: [PATCH 483/483] Initialize grub_file_filters_{all,enabled}
Subject: [PATCH 30/37] Initialize grub_file_filters_{all,enabled}
Without this we see an error on ppc during startup:
@ -9,7 +9,7 @@ Elapsed time since release of system processors: 220520 mins 17 secs
DEFAULT CATCH!, exception-handler=fff00300
at %SRR0: 0000000000010d1c %SRR1: 0000000000003002
Open Firmware exception handler entered from non-OF code
Client's Fix Pt Regs:
00 000000000000b3a4 0000000001a3ff00 0000000000000000 000000000021ac50
04 000000000021a810 0000000000001240 00000000002195c0 000000000021ab30
@ -27,18 +27,17 @@ Special Regs:
%DAR: 000000006531323f
Virtual PID = 0
ofdbg
0 >
0 >
This doesn't appear to be the root cause of the problem; these should be
initalized by calls to grub_file_filter_register() called from various
GRUB_MOD_INIT() functions. Nevertheless, right now it fixes the symptom.
---
grub-core/kern/file.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/grub-core/kern/file.c b/grub-core/kern/file.c
index 6426668..f10d958 100644
index 24da12b..7841d57 100644
--- a/grub-core/kern/file.c
+++ b/grub-core/kern/file.c
@@ -28,8 +28,8 @@
@ -53,5 +52,5 @@ index 6426668..f10d958 100644
/* Get the device part of the filename NAME. It is enclosed by parentheses. */
char *
--
1.8.2.1
1.8.4.2

View File

@ -1,40 +0,0 @@
From 53a8f5760591b14160bc07ef10f083882516ad27 Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@ubuntu.com>
Date: Wed, 5 Sep 2012 09:00:39 +0100
Subject: [PATCH 030/482] * util/import_gcry.py: Sort cipher_files, to make
build system generation more deterministic.
---
ChangeLog | 5 +++++
util/import_gcry.py | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index ff982b3..9124825 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-09-05 Colin Watson <cjwatson@ubuntu.com>
+
+ * util/import_gcry.py: Sort cipher_files, to make build system
+ generation more deterministic.
+
2012-09-05 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/disk/ieee1275/ofdisk.c (scan): Check function return value.
diff --git a/util/import_gcry.py b/util/import_gcry.py
index 18966a6..64c5870 100644
--- a/util/import_gcry.py
+++ b/util/import_gcry.py
@@ -40,7 +40,7 @@ try:
except:
print ("WARNING: %s already exists" % cipher_dir_out)
-cipher_files = os.listdir (cipher_dir_in)
+cipher_files = sorted (os.listdir (cipher_dir_in))
conf = codecs.open (os.path.join ("grub-core", "Makefile.gcry.def"), "w", "utf-8")
conf.write ("AutoGen definitions Makefile.tpl;\n\n")
confutil = codecs.open ("Makefile.utilgcry.def", "w", "utf-8")
--
1.8.2.1

View File

@ -1,39 +0,0 @@
From f333a71c6c02232151d9af98a8beae3b5e23e102 Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@ubuntu.com>
Date: Wed, 5 Sep 2012 13:55:54 +0100
Subject: [PATCH 031/482] * NEWS: Fix typo.
---
ChangeLog | 4 ++++
NEWS | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 9124825..9323887 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2012-09-05 Colin Watson <cjwatson@ubuntu.com>
+ * NEWS: Fix typo.
+
+2012-09-05 Colin Watson <cjwatson@ubuntu.com>
+
* util/import_gcry.py: Sort cipher_files, to make build system
generation more deterministic.
diff --git a/NEWS b/NEWS
index f9b06ab..4bb5f98 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,6 @@
New in 2.00:
-* Appearence:
+* Appearance:
* Official theme for gfxmenu (starfield)
* Menu is organised with submenus.
* Better default video mode selection using EDID.
--
1.8.2.1

View File

@ -1,7 +1,7 @@
From 8c62c84f2b85bebf0a3f5fe588aa19e9d113996a Mon Sep 17 00:00:00 2001
From 8409b67aedc302f60474b1633c03c3db1a7f4cec Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Fri, 21 Jun 2013 14:44:08 -0400
Subject: [PATCH] Use -2 instead of -1 for our right-hand margin, so
Subject: [PATCH 31/37] Use -2 instead of -1 for our right-hand margin, so
linewrapping works (#976643).
Signed-off-by: Peter Jones <grub2-owner@fedoraproject.org>
@ -10,10 +10,10 @@ Signed-off-by: Peter Jones <grub2-owner@fedoraproject.org>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
index 851ed13..95b90ea 100644
index ead3391..bc1fc71 100644
--- a/grub-core/normal/menu_text.c
+++ b/grub-core/normal/menu_text.c
@@ -286,7 +286,7 @@ grub_menu_init_page (int nested, int edit,
@@ -334,7 +334,7 @@ grub_menu_init_page (int nested, int edit,
geo->border = 0;
geo->first_entry_x = 0; /* no margin */
@ -23,5 +23,5 @@ index 851ed13..95b90ea 100644
geo->first_entry_y = 3; /* three empty lines*/
--
1.8.2.1
1.8.4.2

View File

@ -0,0 +1,52 @@
From 4d4c8f3afa586aa09632ad02f5d89c9717f7878f Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Mon, 28 Oct 2013 10:05:07 -0400
Subject: [PATCH 32/37] Use linux16 when appropriate (#880840)
The kernel group really would prefer that we use the 16 bit entry point
on x86 bios machines.
Resolves: rhbz#880840
Signed-off-by: Peter Jones <pjones@redhat.com>
---
util/grub.d/10_linux.in | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index e762e1f..6befbd1 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -74,6 +74,11 @@ linux_entry ()
type="$3"
args="$4"
+ 16bit=""
+ case "$machine" in
+ i?86) 16bit="16" ;;
+ esac
+
if [ -z "$boot_device_id" ]; then
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
fi
@@ -132,7 +137,7 @@ linux_entry ()
EOF
else
sed "s/^/$submenu_indentation/" << EOF
- linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
+ linux${16bit} ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
EOF
fi
if test -n "${initrd}" ; then
@@ -142,7 +147,7 @@ EOF
EOF
else
sed "s/^/$submenu_indentation/" << EOF
- initrd ${rel_dirname}/${initrd}
+ initrd${16bit} ${rel_dirname}/${initrd}
EOF
fi
fi
--
1.8.4.2

View File

@ -1,38 +0,0 @@
From 4b13dd6c2fe6f75027c51f4b2616509040a5ea33 Mon Sep 17 00:00:00 2001
From: Jiri Slaby <jslaby@suse.cz>
Date: Wed, 5 Sep 2012 16:09:41 +0200
Subject: [PATCH 032/482] * configure.ac: Add SuSe path.
---
ChangeLog | 4 ++++
configure.ac | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 9323887..10b1ab3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-09-05 Jiri Slaby <jslaby@suse.cz>
+
+ * configure.ac: Add SuSe path.
+
2012-09-05 Colin Watson <cjwatson@ubuntu.com>
* NEWS: Fix typo.
diff --git a/configure.ac b/configure.ac
index 190665d..ea3830a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -242,7 +242,7 @@ fi
FONT_SOURCE=
for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do
- for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/unifont; do
+ for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/unifont /usr/share/fonts/uni; do
if test -f "$dir/unifont.$ext"; then
FONT_SOURCE="$dir/unifont.$ext"
break 2
--
1.8.2.1

View File

@ -0,0 +1,26 @@
From d0bd81970ba401035e2378a32989683e27940a1b Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Mon, 28 Oct 2013 10:09:27 -0400
Subject: [PATCH 33/37] Enable pager by default. (#985860)
Signed-off-by: Peter Jones <pjones@redhat.com>
---
util/grub.d/00_header.in | 2 ++
1 file changed, 2 insertions(+)
diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
index 0c82f23..dc6bbbb 100644
--- a/util/grub.d/00_header.in
+++ b/util/grub.d/00_header.in
@@ -43,6 +43,8 @@ if [ "x${GRUB_DEFAULT_BUTTON}" = "xsaved" ] ; then GRUB_DEFAULT_BUTTON='${saved_
if [ "x${GRUB_TIMEOUT_BUTTON}" = "x" ] ; then GRUB_TIMEOUT_BUTTON="$GRUB_TIMEOUT" ; fi
cat << EOF
+set pager=1
+
if [ -s \$prefix/grubenv ]; then
load_env
fi
--
1.8.4.2

View File

@ -1,222 +0,0 @@
From 9e9382ece3511ff530cfb3e1c1e7a7dbaa3416b6 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Sat, 8 Sep 2012 09:40:24 +0200
Subject: [PATCH 033/482] * grub-core/Makefile.core.def (efifwsetup):
New module. * grub-core/commands/efi/efifwsetup.c: New file. *
grub-core/kern/efi/efi.c (grub_efi_set_variable): New function *
include/grub/efi/api.h (GRUB_EFI_OS_INDICATIONS_BOOT_TO_FW_UI): New
define. * include/grub/efi/efi.h (grub_efi_set_variable): New proto.
---
ChangeLog | 9 ++++
grub-core/Makefile.core.def | 6 +++
grub-core/commands/efi/efifwsetup.c | 90 +++++++++++++++++++++++++++++++++++++
grub-core/kern/efi/efi.c | 30 +++++++++++++
include/grub/efi/api.h | 2 +
include/grub/efi/efi.h | 5 +++
6 files changed, 142 insertions(+)
create mode 100644 grub-core/commands/efi/efifwsetup.c
diff --git a/ChangeLog b/ChangeLog
index 10b1ab3..e8f0577 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-09-08 Peter Jones <pjones@redhat.com>
+
+ * grub-core/Makefile.core.def (efifwsetup): New module.
+ * grub-core/commands/efi/efifwsetup.c: New file.
+ * grub-core/kern/efi/efi.c (grub_efi_set_variable): New function
+ * include/grub/efi/api.h (GRUB_EFI_OS_INDICATIONS_BOOT_TO_FW_UI):
+ New define.
+ * include/grub/efi/efi.h (grub_efi_set_variable): New proto.
+
2012-09-05 Jiri Slaby <jslaby@suse.cz>
* configure.ac: Add SuSe path.
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index de702d6..7a7b97a 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -575,6 +575,12 @@ module = {
};
module = {
+ name = efifwsetup;
+ efi = commands/efi/efifwsetup.c;
+ enable = efi;
+};
+
+module = {
name = blocklist;
common = commands/blocklist.c;
};
diff --git a/grub-core/commands/efi/efifwsetup.c b/grub-core/commands/efi/efifwsetup.c
new file mode 100644
index 0000000..7a137a7
--- /dev/null
+++ b/grub-core/commands/efi/efifwsetup.c
@@ -0,0 +1,90 @@
+/* fwsetup.c - Reboot into firmware setup menu. */
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 2012 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/>.
+ */
+
+#include <grub/types.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/efi/api.h>
+#include <grub/efi/efi.h>
+#include <grub/command.h>
+#include <grub/i18n.h>
+
+GRUB_MOD_LICENSE ("GPLv3+");
+
+static grub_err_t
+grub_cmd_fwsetup (grub_command_t cmd __attribute__ ((unused)),
+ int argc __attribute__ ((unused)),
+ char **args __attribute__ ((unused)))
+{
+ grub_efi_uint64_t *old_os_indications;
+ grub_efi_uint64_t os_indications = GRUB_EFI_OS_INDICATIONS_BOOT_TO_FW_UI;
+ grub_err_t status;
+ grub_size_t oi_size;
+ grub_efi_guid_t global = GRUB_EFI_GLOBAL_VARIABLE_GUID;
+
+ old_os_indications = grub_efi_get_variable ("OsIndications", &global,
+ &oi_size);
+
+ if (old_os_indications != NULL && oi_size == sizeof (os_indications))
+ os_indications |= *old_os_indications;
+
+ status = grub_efi_set_variable ("OsIndications", &global, &os_indications,
+ sizeof (os_indications));
+ if (status != GRUB_ERR_NONE)
+ return status;
+
+ grub_reboot ();
+
+ return GRUB_ERR_BUG;
+}
+
+static grub_command_t cmd = NULL;
+
+static grub_efi_boolean_t
+efifwsetup_is_supported (void)
+{
+ grub_efi_uint64_t *os_indications_supported = NULL;
+ grub_size_t oi_size = 0;
+ grub_efi_guid_t global = GRUB_EFI_GLOBAL_VARIABLE_GUID;
+
+ os_indications_supported = grub_efi_get_variable ("OsIndicationsSupported",
+ &global, &oi_size);
+
+ if (!os_indications_supported)
+ return 0;
+
+ if (*os_indications_supported & GRUB_EFI_OS_INDICATIONS_BOOT_TO_FW_UI)
+ return 1;
+
+ return 0;
+}
+
+GRUB_MOD_INIT (efifwsetup)
+{
+ if (efifwsetup_is_supported ())
+ cmd = grub_register_command ("fwsetup", grub_cmd_fwsetup, NULL,
+ N_("Reboot into firmware setup menu."));
+
+}
+
+GRUB_MOD_FINI (efifwsetup)
+{
+ if (cmd)
+ grub_unregister_command (cmd);
+}
diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
index 02d2f9a..e8a62ec 100644
--- a/grub-core/kern/efi/efi.c
+++ b/grub-core/kern/efi/efi.c
@@ -181,6 +181,36 @@ grub_efi_set_virtual_address_map (grub_efi_uintn_t memory_map_size,
return grub_error (GRUB_ERR_IO, "set_virtual_address_map failed");
}
+grub_err_t
+grub_efi_set_variable(const char *var, const grub_efi_guid_t *guid,
+ void *data, grub_size_t datasize)
+{
+ grub_efi_status_t status;
+ grub_efi_runtime_services_t *r;
+ grub_efi_char16_t *var16;
+ grub_size_t len, len16;
+
+ len = grub_strlen (var);
+ len16 = len * GRUB_MAX_UTF16_PER_UTF8;
+ var16 = grub_malloc ((len16 + 1) * sizeof (var16[0]));
+ if (!var16)
+ return grub_errno;
+ len16 = grub_utf8_to_utf16 (var16, len16, (grub_uint8_t *) var, len, NULL);
+ var16[len16] = 0;
+
+ r = grub_efi_system_table->runtime_services;
+
+ status = efi_call_5 (r->set_variable, var16, guid,
+ (GRUB_EFI_VARIABLE_NON_VOLATILE
+ | GRUB_EFI_VARIABLE_BOOTSERVICE_ACCESS
+ | GRUB_EFI_VARIABLE_RUNTIME_ACCESS),
+ datasize, data);
+ if (status == GRUB_EFI_SUCCESS)
+ return GRUB_ERR_NONE;
+
+ return grub_error (GRUB_ERR_IO, "could not set EFI variable `%s'", var);
+}
+
void *
grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid,
grub_size_t *datasize_out)
diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
index 9e7a8d8..ae61730 100644
--- a/include/grub/efi/api.h
+++ b/include/grub/efi/api.h
@@ -58,6 +58,8 @@
#define GRUB_EFI_OPEN_PROTOCOL_BY_DRIVER 0x00000010
#define GRUB_EFI_OPEN_PROTOCOL_BY_EXCLUSIVE 0x00000020
+#define GRUB_EFI_OS_INDICATIONS_BOOT_TO_FW_UI 0x0000000000000001ULL
+
#define GRUB_EFI_VARIABLE_NON_VOLATILE 0x0000000000000001
#define GRUB_EFI_VARIABLE_BOOTSERVICE_ACCESS 0x0000000000000002
#define GRUB_EFI_VARIABLE_RUNTIME_ACCESS 0x0000000000000004
diff --git a/include/grub/efi/efi.h b/include/grub/efi/efi.h
index e67d92b..489cf9e 100644
--- a/include/grub/efi/efi.h
+++ b/include/grub/efi/efi.h
@@ -64,6 +64,11 @@ grub_err_t EXPORT_FUNC (grub_efi_set_virtual_address_map) (grub_efi_uintn_t memo
void *EXPORT_FUNC (grub_efi_get_variable) (const char *variable,
const grub_efi_guid_t *guid,
grub_size_t *datasize_out);
+grub_err_t
+EXPORT_FUNC (grub_efi_set_variable) (const char *var,
+ const grub_efi_guid_t *guid,
+ void *data,
+ grub_size_t datasize);
int
EXPORT_FUNC (grub_efi_compare_device_paths) (const grub_efi_device_path_t *dp1,
const grub_efi_device_path_t *dp2);
--
1.8.2.1

View File

@ -0,0 +1,27 @@
From 637e5364015fe4579f7520e169313684403f5955 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Mon, 28 Oct 2013 10:13:27 -0400
Subject: [PATCH 34/37] F10 doesn't work on serial, so don't tell the user to
hit it (#987443)
Signed-off-by: Peter Jones <pjones@redhat.com>
---
grub-core/normal/menu_text.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
index bc1fc71..6202c2a 100644
--- a/grub-core/normal/menu_text.c
+++ b/grub-core/normal/menu_text.c
@@ -157,7 +157,7 @@ print_message (int nested, int edit, struct grub_term_output *term, int dry_run)
if (edit)
{
- ret += grub_print_message_indented_real (_("Press Ctrl-x or F10 to start, Ctrl-c or F2 for a \
+ ret += grub_print_message_indented_real (_("Press Ctrl-x to start, Ctrl-c for a \
command prompt or Escape to discard edits and return to the menu. Pressing Tab lists possible completions."),
STANDARD_MARGIN, STANDARD_MARGIN,
term, dry_run);
--
1.8.4.2

View File

@ -1,50 +0,0 @@
From 8f779ade959a72267dcc045ad71012bf37cb96e0 Mon Sep 17 00:00:00 2001
From: Benoit Gschwind <gschwind>
Date: Mon, 10 Sep 2012 09:34:29 +0200
Subject: [PATCH 034/482] * grub-core/loader/efi/appleloader.c
(devpath_8): New var. (devs): Add devpath_8.
---
ChangeLog | 5 +++++
grub-core/loader/efi/appleloader.c | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index e8f0577..6886bcc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-09-10 Benoit Gschwind <gschwind>
+
+ * grub-core/loader/efi/appleloader.c (devpath_8): New var.
+ (devs): Add devpath_8.
+
2012-09-08 Peter Jones <pjones@redhat.com>
* grub-core/Makefile.core.def (efifwsetup): New module.
diff --git a/grub-core/loader/efi/appleloader.c b/grub-core/loader/efi/appleloader.c
index e2de89f..56d5538 100644
--- a/grub-core/loader/efi/appleloader.c
+++ b/grub-core/loader/efi/appleloader.c
@@ -127,6 +127,10 @@ static struct piwg_full_device_path devpath_6 = MAKE_PIWG_PATH (0xffcc4000,
static struct piwg_full_device_path devpath_7 = MAKE_PIWG_PATH (0xff981000,
0xffc8ffff);
+/* mid-2012 MBP retina (MacBookPro10,1) */
+static struct piwg_full_device_path devpath_8 = MAKE_PIWG_PATH (0xff990000,
+ 0xffb2ffff);
+
struct devdata
{
const char *model;
@@ -142,6 +146,7 @@ struct devdata devs[] =
{"MB NV", (grub_efi_device_path_t *) &devpath_5},
{"MB NV2", (grub_efi_device_path_t *) &devpath_6},
{"MBP2011", (grub_efi_device_path_t *) &devpath_7},
+ {"MBP2012", (grub_efi_device_path_t *) &devpath_8},
{NULL, NULL},
};
--
1.8.2.1

View File

@ -1,7 +1,7 @@
From ef989ba63d43f7a44bc89d685cffd024eb18d273 Mon Sep 17 00:00:00 2001
From 6237780a78b1e9914dd7135c8e2317972d26f585 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Mon, 14 Mar 2011 14:27:42 -0400
Subject: [PATCH 442/482] Don't say "GNU/Linux" in generated menus.
Subject: [PATCH 35/37] Don't say "GNU/Linux" in generated menus.
---
util/grub.d/10_linux.in | 4 ++--
@ -9,7 +9,7 @@ Subject: [PATCH 442/482] Don't say "GNU/Linux" in generated menus.
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 0724e16..368f609 100644
index 6befbd1..2dc7b90 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -29,9 +29,9 @@ export TEXTDOMAINDIR="@localedir@"
@ -21,11 +21,11 @@ index 0724e16..368f609 100644
else
- OS="${GRUB_DISTRIBUTOR} GNU/Linux"
+ OS="${GRUB_DISTRIBUTOR}"
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1) ${CLASS}"
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
fi
diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
index 6651cbc..4372c0c 100644
index a608435..79d4e38 100644
--- a/util/grub.d/20_linux_xen.in
+++ b/util/grub.d/20_linux_xen.in
@@ -29,9 +29,9 @@ export TEXTDOMAINDIR="@localedir@"
@ -37,9 +37,9 @@ index 6651cbc..4372c0c 100644
else
- OS="${GRUB_DISTRIBUTOR} GNU/Linux"
+ OS="${GRUB_DISTRIBUTOR}"
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1) ${CLASS}"
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
fi
--
1.8.2.1
1.8.4.2

View File

@ -1,106 +0,0 @@
From 56348e90bcc1076de7b2aba73b52fa1bafee4478 Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Tue, 11 Sep 2012 07:53:26 +0200
Subject: [PATCH 035/482] * grub-core/disk/diskfilter.c (free_array)
[GRUB_UTIL]: Fix memory leak. * util/getroot.c (grub_find_device): Likewise.
(get_mdadm_uuid): Likewise. (grub_util_is_imsm): Likewise.
(grub_util_pull_device): Likewise. * util/grub-probe.c (probe): Likewise.
---
ChangeLog | 9 +++++++++
grub-core/disk/diskfilter.c | 3 +++
util/getroot.c | 13 +++++++++++--
util/grub-probe.c | 1 +
4 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6886bcc..c697e17 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-09-11 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/disk/diskfilter.c (free_array) [GRUB_UTIL]: Fix memory leak.
+ * util/getroot.c (grub_find_device): Likewise.
+ (get_mdadm_uuid): Likewise.
+ (grub_util_is_imsm): Likewise.
+ (grub_util_pull_device): Likewise.
+ * util/grub-probe.c (probe): Likewise.
+
2012-09-10 Benoit Gschwind <gschwind>
* grub-core/loader/efi/appleloader.c (devpath_8): New var.
diff --git a/grub-core/disk/diskfilter.c b/grub-core/disk/diskfilter.c
index 6e9745e..ce4c706 100644
--- a/grub-core/disk/diskfilter.c
+++ b/grub-core/disk/diskfilter.c
@@ -1130,6 +1130,9 @@ free_array (void)
grub_disk_close (pv->disk);
if (pv->id.uuidlen)
grub_free (pv->id.uuid);
+#ifdef GRUB_UTIL
+ grub_free (pv->partmaps);
+#endif
grub_free (pv->internal_id);
grub_free (pv);
}
diff --git a/util/getroot.c b/util/getroot.c
index e103fb6..b97bea6 100644
--- a/util/getroot.c
+++ b/util/getroot.c
@@ -918,7 +918,10 @@ grub_find_device (const char *dir, dev_t dev)
grub files */
if (strcmp(res, "/dev/root") == 0)
- continue;
+ {
+ free (res);
+ continue;
+ }
if (chdir (saved_cwd) < 0)
grub_util_error ("%s", _("cannot restore the original directory"));
@@ -1363,6 +1366,7 @@ get_mdadm_uuid (const char *os_dev)
out:
close (fd);
waitpid (pid, NULL, 0);
+ free (buf);
return name;
}
@@ -1437,6 +1441,8 @@ grub_util_is_imsm (const char *os_dev)
}
}
+ free (buf);
+
return 0;
out:
@@ -1577,7 +1583,10 @@ grub_util_pull_device (const char *os_dev)
char **devicelist = grub_util_raid_getmembers (os_dev, 0);
int i;
for (i = 0; devicelist[i];i++)
- grub_util_pull_device (devicelist[i]);
+ {
+ grub_util_pull_device (devicelist[i]);
+ free (devicelist[i]);
+ }
free (devicelist);
}
#endif
diff --git a/util/grub-probe.c b/util/grub-probe.c
index 6dd1073..c2a0f62 100644
--- a/util/grub-probe.c
+++ b/util/grub-probe.c
@@ -474,6 +474,7 @@ probe (const char *path, char **device_names, char delim)
printf ("%s", label);
putchar (delim);
}
+ grub_device_close (dev);
goto end;
}
--
1.8.2.1

View File

@ -1,18 +1,18 @@
From 7e4ef1b81a27e6e69e5e615a38f9ec10137f43e6 Mon Sep 17 00:00:00 2001
From 350be65f3028754599b8dbf370e516c41e0b9eb8 Mon Sep 17 00:00:00 2001
From: William Jon McCann <william.jon.mccann@gmail.com>
Date: Wed, 15 May 2013 16:47:33 -0400
Subject: [PATCH 470/482] Don't draw a border around the menu
Subject: [PATCH 36/37] Don't draw a border around the menu
It looks cleaner without it.
---
grub-core/normal/menu_text.c | 38 --------------------------------------
1 file changed, 38 deletions(-)
grub-core/normal/menu_text.c | 43 -------------------------------------------
1 file changed, 43 deletions(-)
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
index b6ec32a..faf1d3e 100644
index 6202c2a..beddd7f 100644
--- a/grub-core/normal/menu_text.c
+++ b/grub-core/normal/menu_text.c
@@ -108,42 +108,6 @@ grub_print_message_indented (const char *msg, int margin_left, int margin_right,
@@ -108,47 +108,6 @@ grub_print_message_indented (const char *msg, int margin_left, int margin_right,
grub_print_message_indented_real (msg, margin_left, margin_right, term, 0);
}
@ -23,7 +23,8 @@ index b6ec32a..faf1d3e 100644
-
- grub_term_setcolorstate (term, GRUB_TERM_COLOR_NORMAL);
-
- grub_term_gotoxy (term, geo->first_entry_x - 1, geo->first_entry_y - 1);
- grub_term_gotoxy (term, (struct grub_term_coordinate) { geo->first_entry_x - 1,
- geo->first_entry_y - 1 });
- grub_putcode (GRUB_UNICODE_CORNER_UL, term);
- for (i = 0; i < geo->entry_width + 1; i++)
- grub_putcode (GRUB_UNICODE_HLINE, term);
@ -31,15 +32,18 @@ index b6ec32a..faf1d3e 100644
-
- for (i = 0; i < geo->num_entries; i++)
- {
- grub_term_gotoxy (term, geo->first_entry_x - 1, geo->first_entry_y + i);
- grub_term_gotoxy (term, (struct grub_term_coordinate) { geo->first_entry_x - 1,
- geo->first_entry_y + i });
- grub_putcode (GRUB_UNICODE_VLINE, term);
- grub_term_gotoxy (term, geo->first_entry_x + geo->entry_width + 1,
- geo->first_entry_y + i);
- grub_term_gotoxy (term,
- (struct grub_term_coordinate) { geo->first_entry_x + geo->entry_width + 1,
- geo->first_entry_y + i });
- grub_putcode (GRUB_UNICODE_VLINE, term);
- }
-
- grub_term_gotoxy (term, geo->first_entry_x - 1,
- geo->first_entry_y - 1 + geo->num_entries + 1);
- grub_term_gotoxy (term,
- (struct grub_term_coordinate) { geo->first_entry_x - 1,
- geo->first_entry_y - 1 + geo->num_entries + 1 });
- grub_putcode (GRUB_UNICODE_CORNER_LL, term);
- for (i = 0; i < geo->entry_width + 1; i++)
- grub_putcode (GRUB_UNICODE_HLINE, term);
@ -47,15 +51,16 @@ index b6ec32a..faf1d3e 100644
-
- grub_term_setcolorstate (term, GRUB_TERM_COLOR_NORMAL);
-
- grub_term_gotoxy (term, geo->first_entry_x - 1,
- (geo->first_entry_y - 1 + geo->num_entries
- + GRUB_TERM_MARGIN + 1));
- grub_term_gotoxy (term,
- (struct grub_term_coordinate) { geo->first_entry_x - 1,
- (geo->first_entry_y - 1 + geo->num_entries
- + GRUB_TERM_MARGIN + 1) });
-}
-
static int
print_message (int nested, int edit, struct grub_term_output *term, int dry_run)
{
@@ -396,8 +360,6 @@ grub_menu_init_page (int nested, int edit,
@@ -403,8 +362,6 @@ grub_menu_init_page (int nested, int edit,
grub_term_normal_color = grub_color_menu_normal;
grub_term_highlight_color = grub_color_menu_highlight;
@ -65,5 +70,5 @@ index b6ec32a..faf1d3e 100644
grub_term_highlight_color = old_color_highlight;
geo->timeout_y = geo->first_entry_y + geo->num_entries
--
1.8.2.1
1.8.4.2

View File

@ -1,70 +0,0 @@
From c7d45a90490c5f3337a6412a6ebe500e3a41a63b Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Wed, 12 Sep 2012 08:27:26 +0200
Subject: [PATCH 036/482] Don't require grub-mkconfig_lib to generate
manpages for programs.
* gentpl.py (manpage): Additional argument adddeps. Add adddeps to
dependencies, don't add grub-mkconfig_lib.
(program): Pass empty adddeps.
(script): Pass grub-mkconfig_lib as adddeps.
---
ChangeLog | 9 +++++++++
gentpl.py | 8 ++++----
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c697e17..8576923 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-09-12 Vladimir Serbinenko <phcoder@gmail.com>
+
+ Don't require grub-mkconfig_lib to generate manpages for programs.
+
+ * gentpl.py (manpage): Additional argument adddeps. Add adddeps to
+ dependencies, don't add grub-mkconfig_lib.
+ (program): Pass empty adddeps.
+ (script): Pass grub-mkconfig_lib as adddeps.
+
2012-09-11 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/disk/diskfilter.c (free_array) [GRUB_UTIL]: Fix memory leak.
diff --git a/gentpl.py b/gentpl.py
index bab4a8a..6d7f613 100644
--- a/gentpl.py
+++ b/gentpl.py
@@ -484,10 +484,10 @@ def library(platform):
def installdir(default="bin"):
return "[+ IF installdir +][+ installdir +][+ ELSE +]" + default + "[+ ENDIF +]"
-def manpage():
+def manpage(adddeps):
r = "if COND_MAN_PAGES\n"
r += gvar_add("man_MANS", "[+ name +].[+ mansection +]\n")
- r += rule("[+ name +].[+ mansection +]", "[+ name +] grub-mkconfig_lib", """
+ r += rule("[+ name +].[+ mansection +]", "[+ name +] " + adddeps, """
chmod a+x [+ name +]
PATH=$(builddir):$$PATH pkgdatadir=$(builddir) $(HELP2MAN) --section=[+ mansection +] -i $(top_srcdir)/docs/man/[+ name +].h2m -o $@ [+ name +]
""")
@@ -503,7 +503,7 @@ def program(platform, test=False):
r += gvar_add("TESTS", "[+ name +]")
r += "[+ ELSE +]"
r += var_add(installdir() + "_PROGRAMS", "[+ name +]")
- r += "[+ IF mansection +]" + manpage() + "[+ ENDIF +]"
+ r += "[+ IF mansection +]" + manpage("") + "[+ ENDIF +]"
r += "[+ ENDIF +]"
r += var_set(cname() + "_SOURCES", platform_sources(platform))
@@ -532,7 +532,7 @@ def script(platform):
r += gvar_add ("TESTS", "[+ name +]")
r += "[+ ELSE +]"
r += var_add(installdir() + "_SCRIPTS", "[+ name +]")
- r += "[+ IF mansection +]" + manpage() + "[+ ENDIF +]"
+ r += "[+ IF mansection +]" + manpage("grub-mkconfig_lib") + "[+ ENDIF +]"
r += "[+ ENDIF +]"
r += rule("[+ name +]", platform_sources(platform) + " $(top_builddir)/config.status", """
--
1.8.2.1

View File

@ -0,0 +1,43 @@
From 5af32cf8ad295055ee190f81d0258978c785fa9f Mon Sep 17 00:00:00 2001
From: William Jon McCann <william.jon.mccann@gmail.com>
Date: Fri, 7 Jun 2013 10:52:32 -0400
Subject: [PATCH 37/37] Use the standard margin for the timeout string
So that it aligns with the other messages
---
grub-core/normal/menu_text.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c
index beddd7f..33b208b 100644
--- a/grub-core/normal/menu_text.c
+++ b/grub-core/normal/menu_text.c
@@ -369,7 +369,7 @@ grub_menu_init_page (int nested, int edit,
if (bottom_message)
{
grub_term_gotoxy (term,
- (struct grub_term_coordinate) { GRUB_TERM_MARGIN,
+ (struct grub_term_coordinate) { STANDARD_MARGIN,
geo->timeout_y });
print_message (nested, edit, term, 0);
@@ -404,14 +404,14 @@ menu_text_print_timeout (int timeout, void *dataptr)
if (data->timeout_msg == TIMEOUT_UNKNOWN)
{
data->timeout_msg = grub_print_message_indented_real (msg_translated,
- 3, 1, data->term, 1)
+ STANDARD_MARGIN, 1, data->term, 1)
<= data->geo.timeout_lines ? TIMEOUT_NORMAL : TIMEOUT_TERSE;
if (data->timeout_msg == TIMEOUT_TERSE)
{
grub_free (msg_translated);
msg_translated = grub_xasprintf (_("%ds"), timeout);
if (grub_term_width (data->term) < 10)
- data->timeout_msg = TIMEOUT_TERSE_NO_MARGIN;
+ data->timeout_msg = STANDARD_MARGIN;
}
}
--
1.8.4.2

View File

@ -1,90 +0,0 @@
From 085ef74104c8f1a5d2cc68a0d1a2e0569827d6f4 Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Wed, 12 Sep 2012 08:31:05 +0200
Subject: [PATCH 037/482] * include/grub/efi/api.h
(grub_efi_runtime_services): Make vendor_guid a const pointer. *
grub-core/efiemu/runtime/efiemu.c (efiemu_memcpy): Make from a const
pointer. (efiemu_set_variable): Make vendor_guid a const pointer.
---
ChangeLog | 8 ++++++++
grub-core/efiemu/runtime/efiemu.c | 14 +++++++-------
include/grub/efi/api.h | 2 +-
3 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8576923..527e9d1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2012-09-12 Vladimir Serbinenko <phcoder@gmail.com>
+ * include/grub/efi/api.h (grub_efi_runtime_services): Make vendor_guid
+ a const pointer.
+ * grub-core/efiemu/runtime/efiemu.c (efiemu_memcpy): Make from a
+ const pointer.
+ (efiemu_set_variable): Make vendor_guid a const pointer.
+
+2012-09-12 Vladimir Serbinenko <phcoder@gmail.com>
+
Don't require grub-mkconfig_lib to generate manpages for programs.
* gentpl.py (manpage): Additional argument adddeps. Add adddeps to
diff --git a/grub-core/efiemu/runtime/efiemu.c b/grub-core/efiemu/runtime/efiemu.c
index 84b02cb..d923e40 100644
--- a/grub-core/efiemu/runtime/efiemu.c
+++ b/grub-core/efiemu/runtime/efiemu.c
@@ -78,7 +78,7 @@ efiemu_get_next_variable_name (grub_efi_uintn_t *variable_name_size,
grub_efi_status_t
efiemu_set_variable (grub_efi_char16_t *variable_name,
- grub_efi_guid_t *vendor_guid,
+ const grub_efi_guid_t *vendor_guid,
grub_efi_uint32_t attributes,
grub_efi_uintn_t data_size,
void *data);
@@ -131,11 +131,11 @@ extern grub_uint32_t efiemu_time_accuracy;
/* Some standard functions because we need to be standalone */
static void
-efiemu_memcpy (void *to, void *from, int count)
+efiemu_memcpy (void *to, const void *from, int count)
{
int i;
for (i = 0; i < count; i++)
- ((grub_uint8_t *) to)[i] = ((grub_uint8_t *) from)[i];
+ ((grub_uint8_t *) to)[i] = ((const grub_uint8_t *) from)[i];
}
static int
@@ -503,10 +503,10 @@ grub_efi_status_t EFI_FUNC
grub_efi_status_t
EFI_FUNC (efiemu_set_variable) (grub_efi_char16_t *variable_name,
- grub_efi_guid_t *vendor_guid,
- grub_efi_uint32_t attributes,
- grub_efi_uintn_t data_size,
- void *data)
+ const grub_efi_guid_t *vendor_guid,
+ grub_efi_uint32_t attributes,
+ grub_efi_uintn_t data_size,
+ void *data)
{
struct efi_variable *efivar;
grub_uint8_t *ptr;
diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
index ae61730..2917d14 100644
--- a/include/grub/efi/api.h
+++ b/include/grub/efi/api.h
@@ -1208,7 +1208,7 @@ struct grub_efi_runtime_services
grub_efi_status_t
(*set_variable) (grub_efi_char16_t *variable_name,
- grub_efi_guid_t *vendor_guid,
+ const grub_efi_guid_t *vendor_guid,
grub_efi_uint32_t attributes,
grub_efi_uintn_t data_size,
void *data);
--
1.8.2.1

View File

@ -1,74 +0,0 @@
From 5ba7247c064336767ee6b0ad9465b547ac90322a Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@ubuntu.com>
Date: Fri, 14 Sep 2012 11:23:36 +0100
Subject: [PATCH 038/482] * grub-core/term/terminfo.c: Only fix up powerpc key
repeat on IEEE1275 machines. Fixes powerpc-emu compilation. *
include/grub/terminfo.h: Likewise.
---
ChangeLog | 6 ++++++
grub-core/term/terminfo.c | 6 +++---
include/grub/terminfo.h | 2 +-
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 527e9d1..941ed93 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-09-14 Colin Watson <cjwatson@ubuntu.com>
+
+ * grub-core/term/terminfo.c: Only fix up powerpc key repeat on
+ IEEE1275 machines. Fixes powerpc-emu compilation.
+ * include/grub/terminfo.h: Likewise.
+
2012-09-12 Vladimir Serbinenko <phcoder@gmail.com>
* include/grub/efi/api.h (grub_efi_runtime_services): Make vendor_guid
diff --git a/grub-core/term/terminfo.c b/grub-core/term/terminfo.c
index e35563f..d421e4e 100644
--- a/grub-core/term/terminfo.c
+++ b/grub-core/term/terminfo.c
@@ -33,7 +33,7 @@
#include <grub/extcmd.h>
#include <grub/i18n.h>
#include <grub/time.h>
-#ifdef __powerpc__
+#if defined(__powerpc__) && defined(GRUB_MACHINE_IEEE1275)
#include <grub/ieee1275/ieee1275.h>
#endif
@@ -563,7 +563,7 @@ grub_terminfo_getkey (struct grub_term_input *termi)
grub_terminfo_readkey (termi, data->input_buf,
&data->npending, data->readkey);
-#ifdef __powerpc__
+#if defined(__powerpc__) && defined(GRUB_MACHINE_IEEE1275)
if (data->npending == 1 && data->input_buf[0] == '\e'
&& grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_BROKEN_REPEAT)
&& grub_get_time_ms () - data->last_key_time < 1000
@@ -580,7 +580,7 @@ grub_terminfo_getkey (struct grub_term_input *termi)
int ret;
data->npending--;
ret = data->input_buf[0];
-#ifdef __powerpc__
+#if defined(__powerpc__) && defined(GRUB_MACHINE_IEEE1275)
if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_BROKEN_REPEAT))
{
data->last_key = ret;
diff --git a/include/grub/terminfo.h b/include/grub/terminfo.h
index c081a92..20541a9 100644
--- a/include/grub/terminfo.h
+++ b/include/grub/terminfo.h
@@ -32,7 +32,7 @@ struct grub_terminfo_input_state
{
int input_buf[GRUB_TERMINFO_READKEY_MAX_LEN];
int npending;
-#ifdef __powerpc__
+#if defined(__powerpc__) && defined(GRUB_MACHINE_IEEE1275)
int last_key;
grub_uint64_t last_key_time;
#endif
--
1.8.2.1

View File

@ -1,44 +0,0 @@
From 7efa81764aa812d1f44ff53fb42472befea19f0b Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@ubuntu.com>
Date: Mon, 17 Sep 2012 16:58:50 +0100
Subject: [PATCH 039/482] * util/grub-mkconfig_lib.in (grub_quote): Remove
outdated sentence from comment.
---
ChangeLog | 5 +++++
util/grub-mkconfig_lib.in | 6 ++----
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 941ed93..de80a94 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-09-17 Colin Watson <cjwatson@debian.org>
+
+ * util/grub-mkconfig_lib.in (grub_quote): Remove outdated sentence
+ from comment.
+
2012-09-14 Colin Watson <cjwatson@ubuntu.com>
* grub-core/term/terminfo.c: Only fix up powerpc key repeat on
diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
index beb52ee..a9f5809 100644
--- a/util/grub-mkconfig_lib.in
+++ b/util/grub-mkconfig_lib.in
@@ -255,10 +255,8 @@ version_find_latest ()
echo "$version_find_latest_a"
}
-# One layer of quotation is eaten by "" and the second by
-# sed; so this turns ' into \'. Note that you must use the output of
-# this function in a printf format string.
-
+# One layer of quotation is eaten by "" and the second by sed; so this turns
+# ' into \'.
grub_quote () {
sed "s/'/'\\\\''/g"
}
--
1.8.2.1

View File

@ -1,42 +0,0 @@
From 1f5027bb0ec48851cc2f9c54552a6ec1f1145930 Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Tue, 18 Sep 2012 11:44:29 +0200
Subject: [PATCH 040/482] * grub-core/loader/i386/linux.c
(grub_cmd_linux): Fix incorrect le-conversion. Reported by: BURETTE,
Bernard.
---
ChangeLog | 6 ++++++
grub-core/loader/i386/linux.c | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index de80a94..b524cf6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-09-18 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/loader/i386/linux.c (grub_cmd_linux): Fix incorrect
+ le-conversion.
+ Reported by: BURETTE, Bernard.
+
2012-09-17 Colin Watson <cjwatson@debian.org>
* util/grub-mkconfig_lib.in (grub_quote): Remove outdated sentence
diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
index d34b2f8..bcb037c 100644
--- a/grub-core/loader/i386/linux.c
+++ b/grub-core/loader/i386/linux.c
@@ -839,7 +839,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
#ifdef GRUB_MACHINE_EFI
#ifdef __x86_64__
- if (grub_le_to_cpu16 (params->version < 0x0208) &&
+ if (grub_le_to_cpu16 (params->version) < 0x0208 &&
((grub_addr_t) grub_efi_system_table >> 32) != 0)
return grub_error(GRUB_ERR_BAD_OS,
"kernel does not support 64-bit addressing");
--
1.8.2.1

View File

@ -1,121 +0,0 @@
From 731ae0c1c7c0458a257e75c55b7739881dc2d5ed Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Tue, 18 Sep 2012 11:52:19 +0200
Subject: [PATCH 041/482] * grub-core/kern/ieee1275/cmain.c
(grub_ieee1275_find_options): Set
GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN on mac. *
grub-core/term/ieee1275/console.c (grub_console_init_lately): Use
ieee1275-nocursor if GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN is set.
* grub-core/term/terminfo.c (grub_terminfo_set_current): Add new type
ieee1275-nocursor. * include/grub/ieee1275/ieee1275.h
(grub_ieee1275_flag): New value
GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN.
---
ChangeLog | 11 +++++++++++
grub-core/kern/ieee1275/cmain.c | 1 +
grub-core/term/ieee1275/console.c | 3 ++-
grub-core/term/terminfo.c | 15 ++++++++++++---
include/grub/ieee1275/ieee1275.h | 4 +++-
5 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b524cf6..3752a79 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2012-09-18 Vladimir Serbinenko <phcoder@gmail.com>
+ * grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set
+ GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN on mac.
+ * grub-core/term/ieee1275/console.c (grub_console_init_lately): Use
+ ieee1275-nocursor if GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN is set.
+ * grub-core/term/terminfo.c (grub_terminfo_set_current): Add new type
+ ieee1275-nocursor.
+ * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): New value
+ GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN.
+
+2012-09-18 Vladimir Serbinenko <phcoder@gmail.com>
+
* grub-core/loader/i386/linux.c (grub_cmd_linux): Fix incorrect
le-conversion.
Reported by: BURETTE, Bernard.
diff --git a/grub-core/kern/ieee1275/cmain.c b/grub-core/kern/ieee1275/cmain.c
index dd04d39..789669a 100644
--- a/grub-core/kern/ieee1275/cmain.c
+++ b/grub-core/kern/ieee1275/cmain.c
@@ -117,6 +117,7 @@ grub_ieee1275_find_options (void)
grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_BROKEN_ADDRESS_CELLS);
grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_NO_OFNET_SUFFIX);
grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_VIRT_TO_REAL_BROKEN);
+ grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN);
break;
}
}
diff --git a/grub-core/term/ieee1275/console.c b/grub-core/term/ieee1275/console.c
index a8dfcff..93b81f4 100644
--- a/grub-core/term/ieee1275/console.c
+++ b/grub-core/term/ieee1275/console.c
@@ -247,9 +247,10 @@ grub_console_init_lately (void)
if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_NO_ANSI))
type = "dumb";
+ else if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN))
+ type = "ieee1275-nocursor";
else
type = "ieee1275";
-
grub_terminfo_init ();
grub_terminfo_output_register (&grub_console_term_output, type);
}
diff --git a/grub-core/term/terminfo.c b/grub-core/term/terminfo.c
index d421e4e..a0f8d18 100644
--- a/grub-core/term/terminfo.c
+++ b/grub-core/term/terminfo.c
@@ -143,7 +143,8 @@ grub_terminfo_set_current (struct grub_term_output *term,
return grub_errno;
}
- if (grub_strcmp ("ieee1275", str) == 0)
+ if (grub_strcmp ("ieee1275", str) == 0
+ || grub_strcmp ("ieee1275-nocursor", str) == 0)
{
data->name = grub_strdup ("ieee1275");
data->gotoxy = grub_strdup ("\e[%i%p1%d;%p2%dH");
@@ -153,8 +154,16 @@ grub_terminfo_set_current (struct grub_term_output *term,
data->cls = grub_strdup (" \e[2J");
data->reverse_video_on = grub_strdup ("\e[7m");
data->reverse_video_off = grub_strdup ("\e[m");
- data->cursor_on = grub_strdup ("\e[?25h");
- data->cursor_off = grub_strdup ("\e[?25l");
+ if (grub_strcmp ("ieee1275", str) == 0)
+ {
+ data->cursor_on = grub_strdup ("\e[?25h");
+ data->cursor_off = grub_strdup ("\e[?25l");
+ }
+ else
+ {
+ data->cursor_on = 0;
+ data->cursor_off = 0;
+ }
data->setcolor = grub_strdup ("\e[3%p1%dm\e[4%p2%dm");
return grub_errno;
}
diff --git a/include/grub/ieee1275/ieee1275.h b/include/grub/ieee1275/ieee1275.h
index 38a75fd..ee9b707 100644
--- a/include/grub/ieee1275/ieee1275.h
+++ b/include/grub/ieee1275/ieee1275.h
@@ -123,7 +123,9 @@ enum grub_ieee1275_flag
GRUB_IEEE1275_FLAG_VIRT_TO_REAL_BROKEN,
- GRUB_IEEE1275_FLAG_BROKEN_REPEAT
+ GRUB_IEEE1275_FLAG_BROKEN_REPEAT,
+
+ GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN,
};
extern int EXPORT_FUNC(grub_ieee1275_test_flag) (enum grub_ieee1275_flag flag);
--
1.8.2.1

View File

@ -1,360 +0,0 @@
From f46ac5e6c44d2fed8dcd8451196e6141d89cd90d Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Tue, 18 Sep 2012 13:04:06 +0200
Subject: [PATCH 042/482] * util/grub-mkconfig_lib.in (grub_tab): New
variable. (grub_add_tab): New function. * util/grub.d/10_hurd.in:
Replace \t with $grub_tab orgrub_add_tab. * util/grub.d/10_illumos.in:
Likewise. * util/grub.d/10_kfreebsd.in: Likewise. *
util/grub.d/10_linux.in: Likewise. * util/grub.d/10_netbsd.in: Likewise.
* util/grub.d/10_windows.in: Likewise. * util/grub.d/10_xnu.in:
Likewise. * util/grub.d/20_linux_xen.in: Likewise. *
util/grub.d/30_os-prober.in: Likewise.
---
ChangeLog | 14 ++++++++++++++
util/grub-mkconfig_lib.in | 7 +++++++
util/grub.d/10_hurd.in | 8 ++++----
util/grub.d/10_illumos.in | 4 ++--
util/grub.d/10_kfreebsd.in | 8 ++++----
util/grub.d/10_linux.in | 8 ++++----
util/grub.d/10_netbsd.in | 10 +++++-----
util/grub.d/10_windows.in | 6 +++---
util/grub.d/10_xnu.in | 4 ++--
util/grub.d/20_linux_xen.in | 6 +++---
util/grub.d/30_os-prober.in | 20 ++++++++++----------
11 files changed, 58 insertions(+), 37 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3752a79..32849c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
2012-09-18 Vladimir Serbinenko <phcoder@gmail.com>
+ * util/grub-mkconfig_lib.in (grub_tab): New variable.
+ (grub_add_tab): New function.
+ * util/grub.d/10_hurd.in: Replace \t with $grub_tab orgrub_add_tab.
+ * util/grub.d/10_illumos.in: Likewise.
+ * util/grub.d/10_kfreebsd.in: Likewise.
+ * util/grub.d/10_linux.in: Likewise.
+ * util/grub.d/10_netbsd.in: Likewise.
+ * util/grub.d/10_windows.in: Likewise.
+ * util/grub.d/10_xnu.in: Likewise.
+ * util/grub.d/20_linux_xen.in: Likewise.
+ * util/grub.d/30_os-prober.in: Likewise.
+
+2012-09-18 Vladimir Serbinenko <phcoder@gmail.com>
+
* grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set
GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN on mac.
* grub-core/term/ieee1275/console.c (grub_console_init_lately): Use
diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
index a9f5809..8f21eb2 100644
--- a/util/grub-mkconfig_lib.in
+++ b/util/grub-mkconfig_lib.in
@@ -347,3 +347,10 @@ grub_fmt () {
cat
fi
}
+
+grub_tab=" "
+
+grub_add_tab () {
+ sed -e "s/^/$grub_tab/"
+}
+
diff --git a/util/grub.d/10_hurd.in b/util/grub.d/10_hurd.in
index 45f0ad3..00efd68 100644
--- a/util/grub.d/10_hurd.in
+++ b/util/grub.d/10_hurd.in
@@ -108,7 +108,7 @@ menuentry '$(echo "$OS" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnuhurd-s
EOF
fi
- prepare_grub_to_access_device "${GRUB_DEVICE_BOOT}" | sed -e "s/^/\t/"|sed "s/^/$submenu_indentation/"
+ prepare_grub_to_access_device "${GRUB_DEVICE_BOOT}" | grub_add_tab|sed "s/^/$submenu_indentation/"
message="$(gettext_printf "Loading GNU Mach ...")"
if [ x$type = xrecovery ] ; then
@@ -122,9 +122,9 @@ EOF
EOF
if [ x$type != xrecovery ] ; then
- save_default_entry | sed -e "s/^/\t/"| sed "s/^/$submenu_indentation/"
+ save_default_entry | grub_add_tab| sed "s/^/$submenu_indentation/"
fi
- prepare_grub_to_access_device "${GRUB_DEVICE}" | sed -e "s/^/\t/"| sed "s/^/$submenu_indentation/"
+ prepare_grub_to_access_device "${GRUB_DEVICE}" | grub_add_tab| sed "s/^/$submenu_indentation/"
message="$(gettext_printf "Loading the Hurd ...")"
if [ x$type = xrecovery ] ; then
opts=
@@ -158,7 +158,7 @@ do
if [ "x$is_first_entry" = xtrue ]; then
hurd_entry "$kernel" simple
- submenu_indentation="\t"
+ submenu_indentation="$grub_tab"
# TRANSLATORS: %s is replaced with an OS name
echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnuhurd-advanced-$(grub_get_device_id "${GRUB_DEVICE_BOOT}")' {"
diff --git a/util/grub.d/10_illumos.in b/util/grub.d/10_illumos.in
index 2477466..0de616e 100644
--- a/util/grub.d/10_illumos.in
+++ b/util/grub.d/10_illumos.in
@@ -35,8 +35,8 @@ case "${GRUB_DISTRIBUTOR}" in
esac
echo "menuentry '$(echo "$OS" | grub_quote)' ${CLASS} \$menuentry_id_option 'illumos-$(grub_get_device_id "${GRUB_DEVICE_BOOT}")' {"
-save_default_entry | sed -e "s/^/\t/"
-prepare_grub_to_access_device "${GRUB_DEVICE_BOOT}" | sed -e "s/^/\t/"
+save_default_entry | grub_add_tab
+prepare_grub_to_access_device "${GRUB_DEVICE_BOOT}" | grub_add_tab
message="$(gettext_printf "Loading kernel of Illumos ...")"
cat << EOF
insmod gzio
diff --git a/util/grub.d/10_kfreebsd.in b/util/grub.d/10_kfreebsd.in
index b0e84e2..260dda8 100644
--- a/util/grub.d/10_kfreebsd.in
+++ b/util/grub.d/10_kfreebsd.in
@@ -54,7 +54,7 @@ load_kfreebsd_module ()
fi
if [ -z "${prepare_module_dir_cache}" ]; then
- prepare_module_dir_cache="$(prepare_grub_to_access_device $(grub-probe -t device "${module_dir}") | sed -e "s/^/\t/")"
+ prepare_module_dir_cache="$(prepare_grub_to_access_device $(grub-probe -t device "${module_dir}") | grub_add_tab)"
fi
printf '%s\n' "${prepare_module_dir_cache}"
@@ -91,10 +91,10 @@ kfreebsd_entry ()
echo "menuentry '$(echo "$OS" | grub_quote)' ${CLASS} \$menuentry_id_option 'kfreebsd-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
fi
if [ x$type != xrecovery ] ; then
- save_default_entry | sed -e "s/^/\t/" | sed "s/^/$submenu_indentation/"
+ save_default_entry | grub_add_tab | sed "s/^/$submenu_indentation/"
fi
if [ -z "${prepare_boot_cache}" ]; then
- prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
+ prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)"
fi
printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
@@ -213,7 +213,7 @@ while [ "x$list" != "x" ] ; do
if [ "x$is_first_entry" = xtrue ]; then
kfreebsd_entry "${OS}" "${version}" simple
- submenu_indentation="\t"
+ submenu_indentation="$grub_tab"
if [ -z "$boot_device_id" ]; then
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 35f7a83..0724e16 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -101,7 +101,7 @@ linux_entry ()
echo "menuentry '$(echo "$os" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
fi
if [ x$type != xrecovery ] ; then
- save_default_entry | sed -e "s/^/\t/"
+ save_default_entry | grub_add_tab
fi
# Use ELILO's generic "efifb" when it's known to be available.
@@ -123,12 +123,12 @@ linux_entry ()
if [ x$dirname = x/ ]; then
if [ -z "${prepare_root_cache}" ]; then
- prepare_root_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/\t/")"
+ prepare_root_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE} | grub_add_tab)"
fi
printf '%s\n' "${prepare_root_cache}" | sed "s/^/$submenu_indentation/"
else
if [ -z "${prepare_boot_cache}" ]; then
- prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
+ prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)"
fi
printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
fi
@@ -230,7 +230,7 @@ while [ "x$list" != "x" ] ; do
linux_entry "${OS}" "${version}" simple \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
- submenu_indentation="\t"
+ submenu_indentation="$grub_tab"
if [ -z "$boot_device_id" ]; then
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
diff --git a/util/grub.d/10_netbsd.in b/util/grub.d/10_netbsd.in
index 65275d7..b76332b 100644
--- a/util/grub.d/10_netbsd.in
+++ b/util/grub.d/10_netbsd.in
@@ -77,10 +77,10 @@ netbsd_load_fs_module ()
prepare_grub_to_access_device $(${grub_probe} -t device "${kmodule}") | sed -e 's,^, ,'
case "${loader}" in
knetbsd)
- printf "\tknetbsd_module_elf %s\n" "${kmodule_rel}"
+ printf "$grub_tabknetbsd_module_elf %s\n" "${kmodule_rel}"
;;
multiboot)
- printf "\tmodule %s\n" "${kmodule_rel}"
+ printf "$grub_tabmodule %s\n" "${kmodule_rel}"
;;
esac
}
@@ -121,11 +121,11 @@ netbsd_entry ()
printf "%s\n" "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
case "${loader}" in
knetbsd)
- printf "\tknetbsd %s -r %s %s\n" \
+ printf "$grub_tabknetbsd %s -r %s %s\n" \
"${kernel}" "${kroot_device}" "${GRUB_CMDLINE_NETBSD} ${args}" | sed "s/^/$submenu_indentation/"
;;
multiboot)
- printf "\tmultiboot %s %s root=%s %s\n" \
+ printf "$grub_tabmultiboot %s %s root=%s %s\n" \
"${kernel}" "${kernel}" "${kroot_device}" "${GRUB_CMDLINE_NETBSD} ${args}" | sed "s/^/$submenu_indentation/"
;;
esac
@@ -159,7 +159,7 @@ for k in $(ls -t /netbsd*) ; do
if [ "x$is_first_entry" = xtrue ]; then
netbsd_entry "knetbsd" "$k" simple "${GRUB_CMDLINE_NETBSD_DEFAULT}"
- submenu_indentation="\t"
+ submenu_indentation="$grub_tab"
if [ -z "$boot_device_id" ]; then
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
diff --git a/util/grub.d/10_windows.in b/util/grub.d/10_windows.in
index e5839cd..9025914 100644
--- a/util/grub.d/10_windows.in
+++ b/util/grub.d/10_windows.in
@@ -45,7 +45,7 @@ get_os_name_from_boot_ini ()
sort | uniq | wc -l`" = 1 || return 1
# Search 'default=PARTITION'
- get_os_name_from_boot_ini_part=`sed -n 's,^default=,,p' "$1" | sed 's,\\\\,/,g;s,[ \t\r]*$,,;1q'`
+ get_os_name_from_boot_ini_part=`sed -n 's,^default=,,p' "$1" | sed 's,\\\\,/,g;s,[ $grub_tab\r]*$,,;1q'`
test -n "$get_os_name_from_boot_ini_part" || return 1
# Search 'PARTITION="NAME" ...'
@@ -87,8 +87,8 @@ for drv in $drives ; do
menuentry '$(echo "$OS" | grub_quote)' \$menuentry_id_option '$osid-$(grub_get_device_id "${dev}")' {
EOF
- save_default_entry | sed -e 's,^,\t,'
- prepare_grub_to_access_device "$dev" | sed 's,^,\t,'
+ save_default_entry | sed -e 's,^,$grub_tab,'
+ prepare_grub_to_access_device "$dev" | sed 's,^,$grub_tab,'
test -z "$needmap" || cat <<EOF
drivemap -s (hd0) \$root
EOF
diff --git a/util/grub.d/10_xnu.in b/util/grub.d/10_xnu.in
index 55a9546..4270385 100644
--- a/util/grub.d/10_xnu.in
+++ b/util/grub.d/10_xnu.in
@@ -39,8 +39,8 @@ osx_entry() {
cat << EOF
menuentry '$(echo "Darwin/Mac OS X $bitstr $onstr" | grub_quote)' --class osx --class darwin --class os \$menuentry_id_option 'osprober-xnu-$2-$(grub_get_device_id "${GRUB_DEVICE}")' {
EOF
- save_default_entry | sed -e "s/^/ /"
- prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/ /"
+ save_default_entry | grub_add_tab
+ prepare_grub_to_access_device ${GRUB_DEVICE} | grub_add_tab
cat << EOF
load_video
set do_resume=0
diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
index 33f1592..d4d0110 100644
--- a/util/grub.d/20_linux_xen.in
+++ b/util/grub.d/20_linux_xen.in
@@ -110,11 +110,11 @@ linux_entry ()
echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'xen-gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
fi
if [ x$type != xrecovery ] ; then
- save_default_entry | sed -e "s/^/\t/" | sed "s/^/$submenu_indentation/"
+ save_default_entry | grub_add_tab | sed "s/^/$submenu_indentation/"
fi
if [ -z "${prepare_boot_cache}" ]; then
- prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
+ prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)"
fi
printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
xmessage="$(gettext_printf "Loading Xen %s ..." ${xen_version})"
@@ -236,7 +236,7 @@ while [ "x${xen_list}" != "x" ] ; do
linux_entry "${OS}" "${version}" "${xen_version}" simple \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}"
- submenu_indentation="\t\t"
+ submenu_indentation="$grub_tab$grub_tab"
if [ -z "$boot_device_id" ]; then
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
index bcc6c25..bf47dc3 100644
--- a/util/grub.d/30_os-prober.in
+++ b/util/grub.d/30_os-prober.in
@@ -54,8 +54,8 @@ osx_entry() {
cat << EOF
menuentry '$(echo "${LONGNAME} $bitstr $onstr" | grub_quote)' --class osx --class darwin --class os \$menuentry_id_option 'osprober-xnu-$2-$(grub_get_device_id "${DEVICE}")' {
EOF
- save_default_entry | sed -e "s/^/\t/"
- prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
+ save_default_entry | grub_add_tab
+ prepare_grub_to_access_device ${DEVICE} | grub_add_tab
cat << EOF
load_video
set do_resume=0
@@ -126,8 +126,8 @@ for OS in ${OSPROBED} ; do
cat << EOF
menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class windows --class os \$menuentry_id_option 'osprober-chain-$(grub_get_device_id "${DEVICE}")' {
EOF
- save_default_entry | sed -e "s/^/\t/"
- prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
+ save_default_entry | grub_add_tab
+ prepare_grub_to_access_device ${DEVICE} | grub_add_tab
case ${LONGNAME} in
Windows\ Vista*|Windows\ 7*|Windows\ Server\ 2008*)
@@ -181,14 +181,14 @@ EOF
used_osprober_linux_ids="$used_osprober_linux_ids 'osprober-gnulinux-$LKERNEL-${recovery_params}-$counter-$boot_device_id'"
if [ -z "${prepare_boot_cache}" ]; then
- prepare_boot_cache="$(prepare_grub_to_access_device ${LBOOT} | sed -e "s/^/\t/")"
+ prepare_boot_cache="$(prepare_grub_to_access_device ${LBOOT} | grub_add_tab)"
fi
if [ "x$is_first_entry" = xtrue ]; then
cat << EOF
menuentry '$(echo "$OS" | grub_quote)' --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-simple-$boot_device_id' {
EOF
- save_default_entry | sed -e "s/^/\t/"
+ save_default_entry | grub_add_tab
printf '%s\n' "${prepare_boot_cache}"
cat << EOF
linux ${LKERNEL} ${LPARAMS}
@@ -208,8 +208,8 @@ EOF
cat << EOF
menuentry '$(echo "$title" | grub_quote)' --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-$LKERNEL-${recovery_params}-$boot_device_id' {
EOF
- save_default_entry | sed -e "s/^/\t\t/"
- printf '%s\n' "${prepare_boot_cache}" | sed -e "s/^/\t/"
+ save_default_entry | sed -e "s/^/$grub_tab$grub_tab/"
+ printf '%s\n' "${prepare_boot_cache}" | grub_add_tab
cat << EOF
linux ${LKERNEL} ${LPARAMS}
EOF
@@ -243,8 +243,8 @@ EOF
cat << EOF
menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class hurd --class gnu --class os \$menuentry_id_option 'osprober-gnuhurd-/boot/gnumach.gz-false-$(grub_get_device_id "${DEVICE}")' {
EOF
- save_default_entry | sed -e "s/^/\t/"
- prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
+ save_default_entry | grub_add_tab
+ prepare_grub_to_access_device ${DEVICE} | grub_add_tab
grub_device="`${grub_probe} --device ${DEVICE} --target=drive`"
mach_device="`echo "${grub_device}" | sed -e 's/(\(hd.*\),msdos\(.*\))/\1s\2/'`"
grub_fs="`${grub_probe} --device ${DEVICE} --target=fs`"
--
1.8.2.1

View File

@ -1,109 +0,0 @@
From fc8c72d6ad43b3fd7a960e67bbacd6fe8d68e48a Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@ubuntu.com>
Date: Wed, 19 Sep 2012 02:41:51 +0100
Subject: [PATCH 043/482] * util/grub-setup.c (write_rootdev): Remove unused
core_img parameter. Update all callers. (setup): Define core_sectors only if
GRUB_SETUP_BIOS, to appease 'gcc -Wunused-but-set-variable'. Remove
unnecessary nested #ifdef GRUB_SETUP_BIOS.
---
ChangeLog | 10 +++++++++-
util/grub-setup.c | 12 +++++++-----
2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 32849c6..1ab401d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-09-19 Colin Watson <cjwatson@ubuntu.com>
+
+ * util/grub-setup.c (write_rootdev): Remove unused core_img
+ parameter. Update all callers.
+ (setup): Define core_sectors only if GRUB_SETUP_BIOS, to appease
+ 'gcc -Wunused-but-set-variable'. Remove unnecessary nested #ifdef
+ GRUB_SETUP_BIOS.
+
2012-09-18 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-mkconfig_lib.in (grub_tab): New variable.
@@ -29,7 +37,7 @@
le-conversion.
Reported by: BURETTE, Bernard.
-2012-09-17 Colin Watson <cjwatson@debian.org>
+2012-09-17 Colin Watson <cjwatson@ubuntu.com>
* util/grub-mkconfig_lib.in (grub_quote): Remove outdated sentence
from comment.
diff --git a/util/grub-setup.c b/util/grub-setup.c
index 085e8df..de0417f 100644
--- a/util/grub-setup.c
+++ b/util/grub-setup.c
@@ -105,7 +105,7 @@
#endif
static void
-write_rootdev (char *core_img, grub_device_t root_dev,
+write_rootdev (grub_device_t root_dev,
char *boot_img, grub_uint64_t first_sector)
{
#ifdef GRUB_SETUP_BIOS
@@ -148,7 +148,9 @@ setup (const char *dir,
char *boot_img, *core_img;
char *root = 0;
size_t boot_size, core_size;
+#ifdef GRUB_SETUP_BIOS
grub_uint16_t core_sectors;
+#endif
grub_device_t root_dev = 0, dest_dev, core_dev;
struct grub_boot_blocklist *first_block, *block;
char *tmp_img;
@@ -229,8 +231,10 @@ setup (const char *dir,
core_path = grub_util_get_path (dir, core_file);
core_size = grub_util_get_image_size (core_path);
+#ifdef GRUB_SETUP_BIOS
core_sectors = ((core_size + GRUB_DISK_SECTOR_SIZE - 1)
>> GRUB_DISK_SECTOR_BITS);
+#endif
if (core_size < GRUB_DISK_SECTOR_SIZE)
grub_util_error (_("the size of `%s' is too small"), core_path);
#ifdef GRUB_SETUP_BIOS
@@ -386,7 +390,6 @@ setup (const char *dir,
is_ldm = grub_util_is_ldm (dest_dev->disk);
-#ifdef GRUB_SETUP_BIOS
if (fs_probe)
{
if (!fs && !dest_partmap)
@@ -424,7 +427,6 @@ setup (const char *dir,
dest_dev->disk->name, dest_partmap->name);
}
-#endif
/* Copy the partition table. */
if (dest_partmap ||
@@ -520,7 +522,7 @@ setup (const char *dir,
block->len = 0;
block->segment = 0;
- write_rootdev (core_img, root_dev, boot_img, first_sector);
+ write_rootdev (root_dev, boot_img, first_sector);
core_img = realloc (core_img, nsec * GRUB_DISK_SECTOR_SIZE);
first_block = (struct grub_boot_blocklist *) (core_img
@@ -858,7 +860,7 @@ unable_to_embed:
free (core_path_dev);
free (tmp_img);
- write_rootdev (core_img, root_dev, boot_img, first_sector);
+ write_rootdev (root_dev, boot_img, first_sector);
/* Write the first two sectors of the core image onto the disk. */
grub_util_info ("opening the core image `%s'", core_path);
--
1.8.2.1

View File

@ -1,52 +0,0 @@
From fbc6f5faf45f489125f98a11f3593cd43b4d6b76 Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@ubuntu.com>
Date: Wed, 19 Sep 2012 02:44:54 +0100
Subject: [PATCH 044/482] * grub-core/partmap/msdos.c (pc_partition_map_embed):
Revert incorrect off-by-one fix from 2011-02-12. A 62-sector core image
should fit before end == 63.
---
ChangeLog | 6 ++++++
grub-core/partmap/msdos.c | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1ab401d..5db804e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2012-09-19 Colin Watson <cjwatson@ubuntu.com>
+ * grub-core/partmap/msdos.c (pc_partition_map_embed): Revert
+ incorrect off-by-one fix from 2011-02-12. A 62-sector core image
+ should fit before end == 63.
+
+2012-09-19 Colin Watson <cjwatson@ubuntu.com>
+
* util/grub-setup.c (write_rootdev): Remove unused core_img
parameter. Update all callers.
(setup): Define core_sectors only if GRUB_SETUP_BIOS, to appease
diff --git a/grub-core/partmap/msdos.c b/grub-core/partmap/msdos.c
index 6e54a74..10ca3f0 100644
--- a/grub-core/partmap/msdos.c
+++ b/grub-core/partmap/msdos.c
@@ -316,14 +316,14 @@ pc_partition_map_embed (struct grub_disk *disk, unsigned int *nsectors,
break;
}
- if (end >= *nsectors + 2)
+ if (end >= *nsectors + 1)
{
unsigned i, j;
char *embed_signature_check;
unsigned int orig_nsectors, avail_nsectors;
orig_nsectors = *nsectors;
- *nsectors = end - 2;
+ *nsectors = end - 1;
avail_nsectors = *nsectors;
if (*nsectors > max_nsectors)
*nsectors = max_nsectors;
--
1.8.2.1

View File

@ -1,125 +0,0 @@
From b37a32bb89c476b0ead4c40900de29fe8d73d27e Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@ubuntu.com>
Date: Sat, 22 Sep 2012 21:19:58 +0100
Subject: [PATCH 045/482] Fix grub-emu build on FreeBSD.
* Makefile.util.def (grub-mount): Add LIBGEOM to ldadd.
* grub-core/net/drivers/emu/emunet.c: Only include Linux-specific
headers on Linux.
(GRUB_MOD_INIT): Return immediately on non-Linux platforms; this
implementation is currently Linux-specific.
* util/getroot.c (exec_pipe): Define only on Linux or when either
libzfs or libnvpair is unavailable.
(find_root_devices_from_poolname): Remove unused path variable.
---
ChangeLog | 13 +++++++++++++
Makefile.util.def | 2 +-
grub-core/net/drivers/emu/emunet.c | 11 +++++++++--
util/getroot.c | 7 ++++++-
4 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5db804e..3eda38f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2012-09-22 Colin Watson <cjwatson@ubuntu.com>
+
+ Fix grub-emu build on FreeBSD.
+
+ * Makefile.util.def (grub-mount): Add LIBGEOM to ldadd.
+ * grub-core/net/drivers/emu/emunet.c: Only include Linux-specific
+ headers on Linux.
+ (GRUB_MOD_INIT): Return immediately on non-Linux platforms; this
+ implementation is currently Linux-specific.
+ * util/getroot.c (exec_pipe): Define only on Linux or when either
+ libzfs or libnvpair is unavailable.
+ (find_root_devices_from_poolname): Remove unused path variable.
+
2012-09-19 Colin Watson <cjwatson@ubuntu.com>
* grub-core/partmap/msdos.c (pc_partition_map_embed): Revert
diff --git a/Makefile.util.def b/Makefile.util.def
index b80187c..72057cf 100644
--- a/Makefile.util.def
+++ b/Makefile.util.def
@@ -266,7 +266,7 @@ program = {
ldadd = libgrubgcry.a;
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
- ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) -lfuse';
+ ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM) -lfuse';
condition = COND_GRUB_MOUNT;
};
diff --git a/grub-core/net/drivers/emu/emunet.c b/grub-core/net/drivers/emu/emunet.c
index 7a7aeaf..6b533dd 100644
--- a/grub-core/net/drivers/emu/emunet.c
+++ b/grub-core/net/drivers/emu/emunet.c
@@ -21,8 +21,10 @@
#include <sys/socket.h>
#include <grub/net.h>
#include <sys/types.h>
-#include <linux/if.h>
-#include <linux/if_tun.h>
+#ifdef __linux__
+# include <linux/if.h>
+# include <linux/if_tun.h>
+#endif /* __linux__ */
#include <sys/ioctl.h>
#include <fcntl.h>
#include <unistd.h>
@@ -97,6 +99,7 @@ static struct grub_net_card emucard =
GRUB_MOD_INIT(emunet)
{
+#ifdef __linux__
struct ifreq ifr;
fd = open ("/dev/net/tun", O_RDWR | O_NONBLOCK);
if (fd < 0)
@@ -110,6 +113,10 @@ GRUB_MOD_INIT(emunet)
return;
}
grub_net_card_register (&emucard);
+#else /* !__linux__ */
+ fd = -1;
+ return;
+#endif /* __linux__ */
}
GRUB_MOD_FINI(emunet)
diff --git a/util/getroot.c b/util/getroot.c
index b97bea6..c2a25c9 100644
--- a/util/getroot.c
+++ b/util/getroot.c
@@ -220,6 +220,9 @@ xgetcwd (void)
#if !defined (__MINGW32__) && !defined (__CYGWIN__) && !defined (__GNU__)
+#if (defined (__linux__) || \
+ !defined (HAVE_LIBZFS) || !defined (HAVE_LIBNVPAIR))
+
static pid_t
exec_pipe (char **argv, int *fd)
{
@@ -258,6 +261,8 @@ exec_pipe (char **argv, int *fd)
}
}
+#endif
+
static char **
find_root_devices_from_poolname (char *poolname)
{
@@ -269,7 +274,7 @@ find_root_devices_from_poolname (char *poolname)
zpool_handle_t *zpool;
libzfs_handle_t *libzfs;
nvlist_t *config, *vdev_tree;
- nvlist_t **children, **path;
+ nvlist_t **children;
unsigned int nvlist_count;
unsigned int i;
char *device = 0;
--
1.8.2.1

View File

@ -1,40 +0,0 @@
From e6f215afa8ff4d586f71276fc12ea14eb1e6cd8b Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@ubuntu.com>
Date: Mon, 24 Sep 2012 18:50:35 +0100
Subject: [PATCH 046/482] * util/grub-install.in: Make the error message if
$source_dir doesn't exist more useful.
---
ChangeLog | 5 +++++
util/grub-install.in | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 3eda38f..a53c5cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-09-24 Colin Watson <cjwatson@ubuntu.com>
+
+ * util/grub-install.in: Make the error message if $source_dir
+ doesn't exist more useful.
+
2012-09-22 Colin Watson <cjwatson@ubuntu.com>
Fix grub-emu build on FreeBSD.
diff --git a/util/grub-install.in b/util/grub-install.in
index e19f1cd..56be98f 100644
--- a/util/grub-install.in
+++ b/util/grub-install.in
@@ -330,7 +330,7 @@ if [ x$source_dir = x ]; then
fi
if ! [ -d "$source_dir" ]; then
- gettext_printf "%s doesn't exist. Please specify --target or --directory\\n" "source_dir"
+ gettext_printf "%s doesn't exist. Please specify --target or --directory\\n" "$source_dir"
exit 1
fi
--
1.8.2.1

View File

@ -1,202 +0,0 @@
From d36c4c3115977beb5f9247c6c6f0a2a209389f45 Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Wed, 26 Sep 2012 09:33:41 +0200
Subject: [PATCH 047/482] * grub-core/fs/affs.c (grub_affs_mount):
Support AFFS bootblock in sector 1.
---
ChangeLog | 5 ++
grub-core/fs/affs.c | 139 ++++++++++++++++++++++++++--------------------------
2 files changed, 74 insertions(+), 70 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index a53c5cc..d81a9a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-09-26 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/fs/affs.c (grub_affs_mount): Support AFFS bootblock in
+ sector 1.
+
2012-09-24 Colin Watson <cjwatson@ubuntu.com>
* util/grub-install.in: Make the error message if $source_dir
diff --git a/grub-core/fs/affs.c b/grub-core/fs/affs.c
index ef65479..848a455 100644
--- a/grub-core/fs/affs.c
+++ b/grub-core/fs/affs.c
@@ -97,6 +97,7 @@ enum
};
#define AFFS_MAX_LOG_BLOCK_SIZE 4
+#define AFFS_MAX_SUPERBLOCK 1
@@ -184,94 +185,92 @@ grub_affs_mount (grub_disk_t disk)
{
struct grub_affs_data *data;
grub_uint32_t *rootblock = 0;
- struct grub_affs_rblock *rblock;
+ struct grub_affs_rblock *rblock = 0;
int log_blocksize = 0;
+ int bsnum = 0;
data = grub_zalloc (sizeof (struct grub_affs_data));
if (!data)
return 0;
- /* Read the bootblock. */
- grub_disk_read (disk, 0, 0, sizeof (struct grub_affs_bblock),
- &data->bblock);
- if (grub_errno)
- goto fail;
-
- /* Make sure this is an affs filesystem. */
- if (grub_strncmp ((char *) (data->bblock.type), "DOS", 3))
- {
- grub_error (GRUB_ERR_BAD_FS, "not an AFFS filesystem");
- goto fail;
- }
-
- /* Test if the filesystem is a OFS filesystem. */
- if (! (data->bblock.flags & GRUB_AFFS_FLAG_FFS))
- {
- grub_error (GRUB_ERR_BAD_FS, "OFS not yet supported");
- goto fail;
- }
-
- /* No sane person uses more than 8KB for a block. At least I hope
- for that person because in that case this won't work. */
- rootblock = grub_malloc (GRUB_DISK_SECTOR_SIZE << AFFS_MAX_LOG_BLOCK_SIZE);
- if (!rootblock)
- goto fail;
-
- rblock = (struct grub_affs_rblock *) rootblock;
-
- /* The filesystem blocksize is not stored anywhere in the filesystem
- itself. One way to determine it is try reading blocks for the
- rootblock until the checksum is correct. */
- for (log_blocksize = 0; log_blocksize <= AFFS_MAX_LOG_BLOCK_SIZE;
- log_blocksize++)
+ for (bsnum = 0; bsnum < AFFS_MAX_SUPERBLOCK + 1; bsnum++)
{
- grub_uint32_t *currblock = rootblock;
- unsigned int i;
- grub_uint32_t checksum = 0;
-
- /* Read the rootblock. */
- grub_disk_read (disk,
- (grub_uint64_t) grub_be_to_cpu32 (data->bblock.rootblock)
- << log_blocksize, 0,
- GRUB_DISK_SECTOR_SIZE << log_blocksize, rootblock);
+ /* Read the bootblock. */
+ grub_disk_read (disk, bsnum, 0, sizeof (struct grub_affs_bblock),
+ &data->bblock);
if (grub_errno)
goto fail;
- if (rblock->type != grub_cpu_to_be32_compile_time (2)
- || rblock->htsize == 0
- || currblock[(GRUB_DISK_SECTOR_SIZE << log_blocksize)
- / sizeof (*currblock) - 1]
- != grub_cpu_to_be32_compile_time (1))
+ /* Make sure this is an affs filesystem. */
+ if (grub_strncmp ((char *) (data->bblock.type), "DOS", 3) != 0
+ /* Test if the filesystem is a OFS filesystem. */
+ || !(data->bblock.flags & GRUB_AFFS_FLAG_FFS))
continue;
- for (i = 0; i < (GRUB_DISK_SECTOR_SIZE << log_blocksize)
- / sizeof (*currblock);
- i++)
- checksum += grub_be_to_cpu32 (currblock[i]);
+ /* No sane person uses more than 8KB for a block. At least I hope
+ for that person because in that case this won't work. */
+ if (!rootblock)
+ rootblock = grub_malloc (GRUB_DISK_SECTOR_SIZE
+ << AFFS_MAX_LOG_BLOCK_SIZE);
+ if (!rootblock)
+ goto fail;
- if (checksum == 0)
- break;
- }
- if (log_blocksize > AFFS_MAX_LOG_BLOCK_SIZE)
- {
- grub_error (GRUB_ERR_BAD_FS, "AFFS blocksize couldn't be determined");
- goto fail;
- }
+ rblock = (struct grub_affs_rblock *) rootblock;
+
+ /* The filesystem blocksize is not stored anywhere in the filesystem
+ itself. One way to determine it is try reading blocks for the
+ rootblock until the checksum is correct. */
+ for (log_blocksize = 0; log_blocksize <= AFFS_MAX_LOG_BLOCK_SIZE;
+ log_blocksize++)
+ {
+ grub_uint32_t *currblock = rootblock;
+ unsigned int i;
+ grub_uint32_t checksum = 0;
+
+ /* Read the rootblock. */
+ grub_disk_read (disk,
+ (grub_uint64_t) grub_be_to_cpu32 (data->bblock.rootblock)
+ << log_blocksize, 0,
+ GRUB_DISK_SECTOR_SIZE << log_blocksize, rootblock);
+ if (grub_errno == GRUB_ERR_OUT_OF_RANGE)
+ {
+ grub_errno = 0;
+ break;
+ }
+ if (grub_errno)
+ goto fail;
- data->log_blocksize = log_blocksize;
- data->disk = disk;
- data->htsize = grub_be_to_cpu32 (rblock->htsize);
- data->diropen.data = data;
- data->diropen.block = grub_be_to_cpu32 (data->bblock.rootblock);
- data->diropen.parent = NULL;
- grub_memcpy (&data->diropen.di, rootblock, sizeof (data->diropen.di));
+ if (rblock->type != grub_cpu_to_be32_compile_time (2)
+ || rblock->htsize == 0
+ || currblock[(GRUB_DISK_SECTOR_SIZE << log_blocksize)
+ / sizeof (*currblock) - 1]
+ != grub_cpu_to_be32_compile_time (1))
+ continue;
- grub_free (rootblock);
+ for (i = 0; i < (GRUB_DISK_SECTOR_SIZE << log_blocksize)
+ / sizeof (*currblock);
+ i++)
+ checksum += grub_be_to_cpu32 (currblock[i]);
- return data;
+ if (checksum == 0)
+ {
+ data->log_blocksize = log_blocksize;
+ data->disk = disk;
+ data->htsize = grub_be_to_cpu32 (rblock->htsize);
+ data->diropen.data = data;
+ data->diropen.block = grub_be_to_cpu32 (data->bblock.rootblock);
+ data->diropen.parent = NULL;
+ grub_memcpy (&data->diropen.di, rootblock,
+ sizeof (data->diropen.di));
+ grub_free (rootblock);
+
+ return data;
+ }
+ }
+ }
fail:
- if (grub_errno == GRUB_ERR_OUT_OF_RANGE)
+ if (grub_errno == GRUB_ERR_NONE || grub_errno == GRUB_ERR_OUT_OF_RANGE)
grub_error (GRUB_ERR_BAD_FS, "not an AFFS filesystem");
grub_free (data);
--
1.8.2.1

View File

@ -1,41 +0,0 @@
From 9196249442d3d9b360b77a5bd35ffb6c49935c78 Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@ubuntu.com>
Date: Wed, 26 Sep 2012 13:12:20 +0100
Subject: [PATCH 048/482] * util/grub-mkconfig_lib.in
(is_path_readable_by_grub): Redirect errors from grub-probe to /dev/null, not
stdout.
---
ChangeLog | 5 +++++
util/grub-mkconfig_lib.in | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index d81a9a6..c43f8a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-09-26 Colin Watson <cjwatson@ubuntu.com>
+
+ * util/grub-mkconfig_lib.in (is_path_readable_by_grub): Redirect
+ errors from grub-probe to /dev/null, not stdout.
+
2012-09-26 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/affs.c (grub_affs_mount): Support AFFS bootblock in
diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in
index 8f21eb2..3574839 100644
--- a/util/grub-mkconfig_lib.in
+++ b/util/grub-mkconfig_lib.in
@@ -65,7 +65,7 @@ is_path_readable_by_grub ()
# ... or if we can't figure out the abstraction module, for example if
# memberlist fails on an LVM volume group.
- if abstractions="`"${grub_probe}" -t abstraction "$path"`" 2>&1 ; then
+ if abstractions="`"${grub_probe}" -t abstraction "$path"`" 2> /dev/null ; then
:
else
return 1
--
1.8.2.1

View File

@ -1,44 +0,0 @@
From 42593e7230fad9f87732c1687cb5daff918f2fa1 Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@ubuntu.com>
Date: Wed, 26 Sep 2012 13:51:13 +0100
Subject: [PATCH 049/482] * Makefile.util.def (grub-mknetdir): Move to
$prefix/bin. Reported by: Daniel Kahn Gillmor. Fixes Debian bug #688799.
---
ChangeLog | 5 +++++
Makefile.util.def | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c43f8a4..2658573 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2012-09-26 Colin Watson <cjwatson@ubuntu.com>
+ * Makefile.util.def (grub-mknetdir): Move to $prefix/bin.
+ Reported by: Daniel Kahn Gillmor. Fixes Debian bug #688799.
+
+2012-09-26 Colin Watson <cjwatson@ubuntu.com>
+
* util/grub-mkconfig_lib.in (is_path_readable_by_grub): Redirect
errors from grub-probe to /dev/null, not stdout.
diff --git a/Makefile.util.def b/Makefile.util.def
index 72057cf..8324ede 100644
--- a/Makefile.util.def
+++ b/Makefile.util.def
@@ -487,8 +487,8 @@ script = {
};
script = {
- mansection = 8;
- installdir = sbin;
+ mansection = 1;
+ installdir = bin;
name = grub-mknetdir;
common = util/grub-mknetdir.in;
--
1.8.2.1

View File

@ -1,132 +0,0 @@
From 8c38cb1283a0cf1c8eae465bff26e0ca966ac43a Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@ubuntu.com>
Date: Fri, 5 Oct 2012 13:09:19 +0100
Subject: [PATCH 050/482] * grub-core/loader/i386/linux.c (allocate_pages): Fix
spelling of preferred_address. (grub_cmd_linux): Likewise. *
grub-core/net/icmp6.c (struct prefix_option): Fix spelling of
preferred_lifetime. Update all users.
---
ChangeLog | 8 ++++++++
grub-core/loader/i386/linux.c | 18 +++++++++---------
grub-core/net/icmp6.c | 6 +++---
3 files changed, 20 insertions(+), 12 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2658573..d0aeab6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-10-05 Colin Watson <cjwatson@debian.org>
+
+ * grub-core/loader/i386/linux.c (allocate_pages): Fix spelling of
+ preferred_address.
+ (grub_cmd_linux): Likewise.
+ * grub-core/net/icmp6.c (struct prefix_option): Fix spelling of
+ preferred_lifetime. Update all users.
+
2012-09-26 Colin Watson <cjwatson@ubuntu.com>
* Makefile.util.def (grub-mknetdir): Move to $prefix/bin.
diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c
index bcb037c..fc0ebe7 100644
--- a/grub-core/loader/i386/linux.c
+++ b/grub-core/loader/i386/linux.c
@@ -191,7 +191,7 @@ free_pages (void)
static grub_err_t
allocate_pages (grub_size_t prot_size, grub_size_t *align,
grub_size_t min_align, int relocatable,
- grub_uint64_t prefered_address)
+ grub_uint64_t preferred_address)
{
grub_err_t err;
@@ -215,8 +215,8 @@ allocate_pages (grub_size_t prot_size, grub_size_t *align,
if (relocatable)
{
err = grub_relocator_alloc_chunk_align (relocator, &ch,
- prefered_address,
- prefered_address,
+ preferred_address,
+ preferred_address,
prot_size, 1,
GRUB_RELOCATOR_PREFERENCE_LOW,
1);
@@ -235,7 +235,7 @@ allocate_pages (grub_size_t prot_size, grub_size_t *align,
}
else
err = grub_relocator_alloc_chunk_addr (relocator, &ch,
- prefered_address,
+ preferred_address,
prot_size);
if (err)
goto fail;
@@ -680,7 +680,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
int i;
grub_size_t align, min_align;
int relocatable;
- grub_uint64_t preffered_address = GRUB_LINUX_BZIMAGE_ADDR;
+ grub_uint64_t preferred_address = GRUB_LINUX_BZIMAGE_ADDR;
grub_dl_ref (my_mod);
@@ -775,22 +775,22 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
prot_size = grub_le_to_cpu32 (lh.init_size);
prot_init_space = page_align (prot_size);
if (relocatable)
- preffered_address = grub_le_to_cpu64 (lh.pref_address);
+ preferred_address = grub_le_to_cpu64 (lh.pref_address);
else
- preffered_address = GRUB_LINUX_BZIMAGE_ADDR;
+ preferred_address = GRUB_LINUX_BZIMAGE_ADDR;
}
else
{
min_align = align;
prot_size = prot_file_size;
- preffered_address = GRUB_LINUX_BZIMAGE_ADDR;
+ preferred_address = GRUB_LINUX_BZIMAGE_ADDR;
/* Usually, the compression ratio is about 50%. */
prot_init_space = page_align (prot_size) * 3;
}
if (allocate_pages (prot_size, &align,
min_align, relocatable,
- preffered_address))
+ preferred_address))
goto fail;
params = (struct linux_kernel_params *) &linux_params;
diff --git a/grub-core/net/icmp6.c b/grub-core/net/icmp6.c
index 4fc343d..9ded94b 100644
--- a/grub-core/net/icmp6.c
+++ b/grub-core/net/icmp6.c
@@ -55,7 +55,7 @@ struct prefix_option
grub_uint8_t prefixlen;
grub_uint8_t flags;
grub_uint32_t valid_lifetime;
- grub_uint32_t prefered_lifetime;
+ grub_uint32_t preferred_lifetime;
grub_uint32_t reserved;
grub_uint64_t prefix[2];
} __attribute__ ((packed));
@@ -370,14 +370,14 @@ grub_net_recv_icmp6_packet (struct grub_net_buff *nb,
struct grub_net_slaac_mac_list *slaac;
if (!(opt->flags & FLAG_SLAAC)
|| (grub_be_to_cpu64 (opt->prefix[0]) >> 48) == 0xfe80
- || (grub_be_to_cpu32 (opt->prefered_lifetime)
+ || (grub_be_to_cpu32 (opt->preferred_lifetime)
> grub_be_to_cpu32 (opt->valid_lifetime))
|| opt->prefixlen != 64)
{
grub_dprintf ("net", "discarded prefix: %d, %d, %d, %d\n",
!(opt->flags & FLAG_SLAAC),
(grub_be_to_cpu64 (opt->prefix[0]) >> 48) == 0xfe80,
- (grub_be_to_cpu32 (opt->prefered_lifetime)
+ (grub_be_to_cpu32 (opt->preferred_lifetime)
> grub_be_to_cpu32 (opt->valid_lifetime)),
opt->prefixlen != 64);
continue;
--
1.8.2.1

View File

@ -1,42 +0,0 @@
From a940b1492cc0c066725e5e49882602fb0e5c7399 Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@ubuntu.com>
Date: Fri, 12 Oct 2012 15:34:33 +0100
Subject: [PATCH 051/482] * grub-core/commands/configfile.c (GRUB_MOD_INIT):
Correct description of extract_entries_configfile.
---
ChangeLog | 7 ++++++-
grub-core/commands/configfile.c | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d0aeab6..9280dba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
-2012-10-05 Colin Watson <cjwatson@debian.org>
+2012-10-12 Colin Watson <cjwatson@ubuntu.com>
+
+ * grub-core/commands/configfile.c (GRUB_MOD_INIT): Correct
+ description of extract_entries_configfile.
+
+2012-10-05 Colin Watson <cjwatson@ubuntu.com>
* grub-core/loader/i386/linux.c (allocate_pages): Fix spelling of
preferred_address.
diff --git a/grub-core/commands/configfile.c b/grub-core/commands/configfile.c
index 99c0a24..f2d2abb 100644
--- a/grub-core/commands/configfile.c
+++ b/grub-core/commands/configfile.c
@@ -78,7 +78,7 @@ GRUB_MOD_INIT(configfile)
cmd_extractor_configfile =
grub_register_command ("extract_entries_configfile", grub_cmd_source,
N_("FILE"),
- N_("Load another config file without changing context but take only menu entries.")
+ N_("Load another config file but take only menu entries.")
);
cmd_dot =
--
1.8.2.1

View File

@ -1,26 +0,0 @@
From bcc11ed025a0e09e2c79cb0a4a60d7f4d574f24f Mon Sep 17 00:00:00 2001
From: Christoph Junghans <ottxor@gentoo.org>
Date: Fri, 12 Oct 2012 15:04:02 +0200
Subject: [PATCH 052/482] * grub-core/Makefile.am (moddep.lst): Use $(AWK)
instead of awk
---
grub-core/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/Makefile.am b/grub-core/Makefile.am
index cc4fb68..9cb14e2 100644
--- a/grub-core/Makefile.am
+++ b/grub-core/Makefile.am
@@ -349,7 +349,7 @@ syminfo.lst: gensyminfo.sh kernel_syms.lst $(MODULE_FILES)
# generate global module dependencies list
moddep.lst: syminfo.lst genmoddep.awk video.lst
- cat $< | sort | awk -f $(srcdir)/genmoddep.awk > $@ || (rm -f $@; exit 1)
+ cat $< | sort | $(AWK) -f $(srcdir)/genmoddep.awk > $@ || (rm -f $@; exit 1)
platform_DATA += moddep.lst
CLEANFILES += config.log syminfo.lst moddep.lst
--
1.8.2.1

View File

@ -1,25 +0,0 @@
From 3fdb3a7b38a0cd0179a48790eb1272f9c8e60cd1 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Mon, 3 Jun 2013 14:12:46 -0400
Subject: [PATCH 053/482] Add missing ChangeLog
---
ChangeLog | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 9280dba..c7b07bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-10-12 Christoph Junghans <ottxor@gentoo.org>
+
+ * grub-core/Makefile.am (moddep.lst): Use $(AWK) rather than awk.
+ Fixes Savannah bug #37558.
+
2012-10-12 Colin Watson <cjwatson@ubuntu.com>
* grub-core/commands/configfile.c (GRUB_MOD_INIT): Correct
--
1.8.2.1

View File

@ -1,71 +0,0 @@
From 8109764f605afbc888760e323d19110ccef84e7b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gr=C3=A9goire=20Sutre?= <gregoire.sutre@gmail.com>
Date: Sun, 28 Oct 2012 11:55:22 +0100
Subject: [PATCH 054/482] Fix ordering and tab indentation of NetBSD boot menu
entries.
---
ChangeLog | 5 +++++
util/grub.d/10_netbsd.in | 12 ++++++------
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c7b07bb..caea96d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-10-28 Grégoire Sutre <gregoire.sutre@gmail.com>
+
+ * util/grub.d/10_netbsd.in: Fix tab indentation and make sure
+ that /netbsd appears first (when it exists).
+
2012-10-12 Christoph Junghans <ottxor@gentoo.org>
* grub-core/Makefile.am (moddep.lst): Use $(AWK) rather than awk.
diff --git a/util/grub.d/10_netbsd.in b/util/grub.d/10_netbsd.in
index b76332b..dead5c1 100644
--- a/util/grub.d/10_netbsd.in
+++ b/util/grub.d/10_netbsd.in
@@ -74,13 +74,13 @@ netbsd_load_fs_module ()
fi
kmodule_rel=$(make_system_path_relative_to_its_root "$kmodule") || return
- prepare_grub_to_access_device $(${grub_probe} -t device "${kmodule}") | sed -e 's,^, ,'
+ prepare_grub_to_access_device $(${grub_probe} -t device "${kmodule}") | sed -e 's,^, ,' | sed "s/^/$submenu_indentation/"
case "${loader}" in
knetbsd)
- printf "$grub_tabknetbsd_module_elf %s\n" "${kmodule_rel}"
+ printf "${grub_tab}knetbsd_module_elf %s\n" "${kmodule_rel}" | sed "s/^/$submenu_indentation/"
;;
multiboot)
- printf "$grub_tabmodule %s\n" "${kmodule_rel}"
+ printf "${grub_tab}module %s\n" "${kmodule_rel}" | sed "s/^/$submenu_indentation/"
;;
esac
}
@@ -121,11 +121,11 @@ netbsd_entry ()
printf "%s\n" "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
case "${loader}" in
knetbsd)
- printf "$grub_tabknetbsd %s -r %s %s\n" \
+ printf "${grub_tab}knetbsd %s -r %s %s\n" \
"${kernel}" "${kroot_device}" "${GRUB_CMDLINE_NETBSD} ${args}" | sed "s/^/$submenu_indentation/"
;;
multiboot)
- printf "$grub_tabmultiboot %s %s root=%s %s\n" \
+ printf "${grub_tab}multiboot %s %s root=%s %s\n" \
"${kernel}" "${kernel}" "${kroot_device}" "${GRUB_CMDLINE_NETBSD} ${args}" | sed "s/^/$submenu_indentation/"
;;
esac
@@ -147,7 +147,7 @@ pattern="^ELF[^,]*executable.*statically linked"
submenu_indentation=""
is_first_entry=true
-for k in $(ls -t /netbsd*) ; do
+for k in /netbsd $(ls -t /netbsd?* 2>/dev/null) ; do
if ! grub_file_is_not_garbage "$k" ; then
continue
fi
--
1.8.2.1

View File

@ -1,39 +0,0 @@
From e64acf0c9e709e2f2fc4908f2123ad908371839b Mon Sep 17 00:00:00 2001
From: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
Date: Wed, 28 Nov 2012 14:14:20 +0100
Subject: [PATCH 055/482] * grub-core/net/bootp.c (parse_dhcp_vendor):
Fix double increment.
---
ChangeLog | 4 ++++
grub-core/net/bootp.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index caea96d..1759da4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-11-28 Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
+
+ * grub-core/net/bootp.c (parse_dhcp_vendor): Fix double increment.
+
2012-10-28 Grégoire Sutre <gregoire.sutre@gmail.com>
* util/grub.d/10_netbsd.in: Fix tab indentation and make sure
diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c
index bc07d53..f36d4cd 100644
--- a/grub-core/net/bootp.c
+++ b/grub-core/net/bootp.c
@@ -122,7 +122,7 @@ parse_dhcp_vendor (const char *name, void *vend, int limit, int *mask)
ptr += 4;
}
}
- break;
+ continue;
case GRUB_NET_BOOTP_HOSTNAME:
set_env_limn_ro (name, "hostname", (char *) ptr, taglength);
break;
--
1.8.2.1

View File

@ -1,40 +0,0 @@
From e2638674dca6e5c31624057734bff69f3bba2e80 Mon Sep 17 00:00:00 2001
From: Leif Lindholm <leif.lindholm@arm.com>
Date: Wed, 28 Nov 2012 14:18:45 +0100
Subject: [PATCH 056/482] * include/grub/types.h: Fix functionality
unaffecting typo in GRUB_TARGET_WORDSIZE conditional macro.
---
ChangeLog | 5 +++++
include/grub/types.h | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 1759da4..b26bfcb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-11-28 Leif Lindholm <leif.lindholm@arm.com>
+
+ * include/grub/types.h: Fix functionality unaffecting typo in
+ GRUB_TARGET_WORDSIZE conditional macro.
+
2012-11-28 Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
* grub-core/net/bootp.c (parse_dhcp_vendor): Fix double increment.
diff --git a/include/grub/types.h b/include/grub/types.h
index 3e677c6..22d1be7 100644
--- a/include/grub/types.h
+++ b/include/grub/types.h
@@ -50,7 +50,7 @@
# error "This architecture is not supported because sizeof(void *) != 4 and sizeof(void *) != 8"
#endif
-#if !defined (GRUB_UTIL) & !defined (GRUB_TARGET_WORDSIZE)
+#if !defined (GRUB_UTIL) && !defined (GRUB_TARGET_WORDSIZE)
# if GRUB_TARGET_SIZEOF_VOID_P == 4
# define GRUB_TARGET_WORDSIZE 32
# elif GRUB_TARGET_SIZEOF_VOID_P == 8
--
1.8.2.1

View File

@ -1,307 +0,0 @@
From f507bf51532d6523dc7ef142058149a17fec5db7 Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Sat, 8 Dec 2012 20:56:58 +0100
Subject: [PATCH 057/482] Support big-endian UFS1.
* Makefile.util.def (libgrubmods): Add ufs_be.c
* grub-core/Makefile.core.def (ufs1_be): New module.
* grub-core/fs/ufs_be.c: New file.
* grub-core/fs/ufs.c: Declare grub_ufs_to_le* and use them throughout
the file.
---
ChangeLog | 10 ++++++
Makefile.util.def | 1 +
grub-core/Makefile.core.def | 5 +++
grub-core/fs/ufs.c | 83 +++++++++++++++++++++++++++++----------------
grub-core/fs/ufs_be.c | 2 ++
5 files changed, 72 insertions(+), 29 deletions(-)
create mode 100644 grub-core/fs/ufs_be.c
diff --git a/ChangeLog b/ChangeLog
index b26bfcb..d565547 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2012-12-08 Vladimir Serbinenko <phcoder@gmail.com>
+
+ Support big-endian UFS1.
+
+ * Makefile.util.def (libgrubmods): Add ufs_be.c
+ * grub-core/Makefile.core.def (ufs1_be): New module.
+ * grub-core/fs/ufs_be.c: New file.
+ * grub-core/fs/ufs.c: Declare grub_ufs_to_le* and use them throughout
+ the file.
+
2012-11-28 Leif Lindholm <leif.lindholm@arm.com>
* include/grub/types.h: Fix functionality unaffecting typo in
diff --git a/Makefile.util.def b/Makefile.util.def
index 8324ede..01f7456 100644
--- a/Makefile.util.def
+++ b/Makefile.util.def
@@ -90,6 +90,7 @@ library = {
common = grub-core/fs/udf.c;
common = grub-core/fs/ufs2.c;
common = grub-core/fs/ufs.c;
+ common = grub-core/fs/ufs_be.c;
common = grub-core/fs/xfs.c;
common = grub-core/fs/zfs/zfscrypt.c;
common = grub-core/fs/zfs/zfs.c;
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
index 7a7b97a..6752429 100644
--- a/grub-core/Makefile.core.def
+++ b/grub-core/Makefile.core.def
@@ -1181,6 +1181,11 @@ module = {
};
module = {
+ name = ufs1_be;
+ common = fs/ufs_be.c;
+};
+
+module = {
name = ufs2;
common = fs/ufs2.c;
};
diff --git a/grub-core/fs/ufs.c b/grub-core/fs/ufs.c
index bd0cd1f..3f2dba1 100644
--- a/grub-core/fs/ufs.c
+++ b/grub-core/fs/ufs.c
@@ -49,18 +49,30 @@ GRUB_MOD_LICENSE ("GPLv3+");
#define GRUB_UFS_VOLNAME_LEN 32
+#ifdef MODE_BIGENDIAN
+#define grub_ufs_to_cpu16 grub_be_to_cpu16
+#define grub_ufs_to_cpu32 grub_be_to_cpu32
+#define grub_ufs_to_cpu64 grub_be_to_cpu64
+#define grub_cpu_to_ufs32_compile_time grub_cpu_to_be32_compile_time
+#else
+#define grub_ufs_to_cpu16 grub_le_to_cpu16
+#define grub_ufs_to_cpu32 grub_le_to_cpu32
+#define grub_ufs_to_cpu64 grub_le_to_cpu64
+#define grub_cpu_to_ufs32_compile_time grub_cpu_to_le32_compile_time
+#endif
+
/* Calculate in which group the inode can be found. */
-#define UFS_BLKSZ(sblock) (grub_le_to_cpu32 (sblock->bsize))
+#define UFS_BLKSZ(sblock) (grub_ufs_to_cpu32 (sblock->bsize))
#define UFS_LOG_BLKSZ(sblock) (data->log2_blksz)
#ifdef MODE_UFS2
-#define INODE_ENDIAN(data,field,bits1,bits2) grub_le_to_cpu##bits2 (data->inode.field)
+#define INODE_ENDIAN(data,field,bits1,bits2) grub_ufs_to_cpu##bits2 (data->inode.field)
#else
-#define INODE_ENDIAN(data,field,bits1,bits2) grub_le_to_cpu##bits1 (data->inode.field)
+#define INODE_ENDIAN(data,field,bits1,bits2) grub_ufs_to_cpu##bits1 (data->inode.field)
#endif
-#define INODE_SIZE(data) grub_le_to_cpu64 (data->inode.size)
-#define INODE_MODE(data) grub_le_to_cpu16 (data->inode.mode)
+#define INODE_SIZE(data) grub_ufs_to_cpu64 (data->inode.size)
+#define INODE_MODE(data) grub_ufs_to_cpu16 (data->inode.mode)
#ifdef MODE_UFS2
#define LOG_INODE_BLKSZ 3
#else
@@ -234,7 +246,7 @@ grub_ufs_get_file_block (struct grub_ufs_data *data, grub_disk_addr_t blk)
if (blk < GRUB_UFS_DIRBLKS)
return INODE_DIRBLOCKS (data, blk);
- log2_blksz = grub_le_to_cpu32 (data->sblock.log2_blksz);
+ log2_blksz = grub_ufs_to_cpu32 (data->sblock.log2_blksz);
blk -= GRUB_UFS_DIRBLKS;
@@ -366,7 +378,7 @@ grub_ufs_read_file (struct grub_ufs_data *data,
{
data->disk->read_hook = read_hook;
grub_disk_read (data->disk,
- blknr << grub_le_to_cpu32 (data->sblock.log2_blksz),
+ blknr << grub_ufs_to_cpu32 (data->sblock.log2_blksz),
skipfirst, blockend, buf);
data->disk->read_hook = 0;
if (grub_errno)
@@ -389,17 +401,17 @@ grub_ufs_read_inode (struct grub_ufs_data *data, int ino, char *inode)
struct grub_ufs_sblock *sblock = &data->sblock;
/* Determine the group the inode is in. */
- int group = ino / grub_le_to_cpu32 (sblock->ino_per_group);
+ int group = ino / grub_ufs_to_cpu32 (sblock->ino_per_group);
/* Determine the inode within the group. */
- int grpino = ino % grub_le_to_cpu32 (sblock->ino_per_group);
+ int grpino = ino % grub_ufs_to_cpu32 (sblock->ino_per_group);
/* The first block of the group. */
- int grpblk = group * (grub_le_to_cpu32 (sblock->frags_per_group));
+ int grpblk = group * (grub_ufs_to_cpu32 (sblock->frags_per_group));
#ifndef MODE_UFS2
- grpblk += grub_le_to_cpu32 (sblock->cylg_offset)
- * (group & (~grub_le_to_cpu32 (sblock->cylg_mask)));
+ grpblk += grub_ufs_to_cpu32 (sblock->cylg_offset)
+ * (group & (~grub_ufs_to_cpu32 (sblock->cylg_mask)));
#endif
if (!inode)
@@ -409,8 +421,8 @@ grub_ufs_read_inode (struct grub_ufs_data *data, int ino, char *inode)
}
grub_disk_read (data->disk,
- ((grub_le_to_cpu32 (sblock->inoblk_offs) + grpblk)
- << grub_le_to_cpu32 (data->sblock.log2_blksz))
+ ((grub_ufs_to_cpu32 (sblock->inoblk_offs) + grpblk)
+ << grub_ufs_to_cpu32 (data->sblock.log2_blksz))
+ grpino / UFS_INODE_PER_BLOCK,
(grpino % UFS_INODE_PER_BLOCK)
* sizeof (struct grub_ufs_inode),
@@ -501,7 +513,7 @@ grub_ufs_find_file (struct grub_ufs_data *data, const char *path)
#ifdef MODE_UFS2
namelen = dirent.namelen_bsd;
#else
- namelen = grub_le_to_cpu16 (dirent.namelen);
+ namelen = grub_ufs_to_cpu16 (dirent.namelen);
#endif
{
char filename[namelen + 1];
@@ -515,7 +527,7 @@ grub_ufs_find_file (struct grub_ufs_data *data, const char *path)
if (!grub_strcmp (name, filename))
{
dirino = data->ino;
- grub_ufs_read_inode (data, grub_le_to_cpu32 (dirent.ino), 0);
+ grub_ufs_read_inode (data, grub_ufs_to_cpu32 (dirent.ino), 0);
if ((INODE_MODE(data) & GRUB_UFS_ATTR_TYPE)
== GRUB_UFS_ATTR_LNK)
@@ -547,7 +559,7 @@ grub_ufs_find_file (struct grub_ufs_data *data, const char *path)
}
}
- pos += grub_le_to_cpu16 (dirent.direntlen);
+ pos += grub_ufs_to_cpu16 (dirent.direntlen);
} while (pos < INODE_SIZE (data));
grub_error (GRUB_ERR_FILE_NOT_FOUND, N_("file `%s' not found"), path);
@@ -576,12 +588,12 @@ grub_ufs_mount (grub_disk_t disk)
/* No need to byteswap bsize in this check. It works the same on both
endiannesses. */
- if (grub_le_to_cpu32 (data->sblock.magic) == GRUB_UFS_MAGIC
+ if (data->sblock.magic == grub_cpu_to_ufs32_compile_time (GRUB_UFS_MAGIC)
&& data->sblock.bsize != 0
&& ((data->sblock.bsize & (data->sblock.bsize - 1)) == 0))
{
for (data->log2_blksz = 0;
- (1U << data->log2_blksz) < grub_le_to_cpu32 (data->sblock.bsize);
+ (1U << data->log2_blksz) < grub_ufs_to_cpu32 (data->sblock.bsize);
data->log2_blksz++);
data->disk = disk;
@@ -652,7 +664,7 @@ grub_ufs_dir (grub_device_t device, const char *path,
#ifdef MODE_UFS2
namelen = dirent.namelen_bsd;
#else
- namelen = grub_le_to_cpu16 (dirent.namelen);
+ namelen = grub_ufs_to_cpu16 (dirent.namelen);
#endif
{
@@ -667,18 +679,19 @@ grub_ufs_dir (grub_device_t device, const char *path,
break;
filename[namelen] = '\0';
- grub_ufs_read_inode (data, dirent.ino, (char *) &inode);
+ grub_ufs_read_inode (data, grub_ufs_to_cpu32 (dirent.ino),
+ (char *) &inode);
- info.dir = ((grub_le_to_cpu16 (inode.mode) & GRUB_UFS_ATTR_TYPE)
+ info.dir = ((grub_ufs_to_cpu16 (inode.mode) & GRUB_UFS_ATTR_TYPE)
== GRUB_UFS_ATTR_DIR);
- info.mtime = grub_le_to_cpu64 (inode.mtime);
+ info.mtime = grub_ufs_to_cpu64 (inode.mtime);
info.mtimeset = 1;
if (hook (filename, &info))
break;
}
- pos += grub_le_to_cpu16 (dirent.direntlen);
+ pos += grub_ufs_to_cpu16 (dirent.direntlen);
}
fail:
@@ -773,8 +786,8 @@ grub_ufs_uuid (grub_device_t device, char **uuid)
data = grub_ufs_mount (disk);
if (data && (data->sblock.uuidhi != 0 || data->sblock.uuidlow != 0))
*uuid = grub_xasprintf ("%08x%08x",
- (unsigned) grub_le_to_cpu32 (data->sblock.uuidhi),
- (unsigned) grub_le_to_cpu32 (data->sblock.uuidlow));
+ (unsigned) grub_ufs_to_cpu32 (data->sblock.uuidhi),
+ (unsigned) grub_ufs_to_cpu32 (data->sblock.uuidlow));
else
*uuid = NULL;
@@ -799,10 +812,10 @@ grub_ufs_mtime (grub_device_t device, grub_int32_t *tm)
*tm = 0;
else
{
- *tm = grub_le_to_cpu32 (data->sblock.mtime);
+ *tm = grub_ufs_to_cpu32 (data->sblock.mtime);
#ifdef MODE_UFS2
- if (*tm < (grub_int64_t) grub_le_to_cpu64 (data->sblock.mtime2))
- *tm = grub_le_to_cpu64 (data->sblock.mtime2);
+ if (*tm < (grub_int64_t) grub_ufs_to_cpu64 (data->sblock.mtime2))
+ *tm = grub_ufs_to_cpu64 (data->sblock.mtime2);
#endif
}
@@ -820,8 +833,12 @@ static struct grub_fs grub_ufs_fs =
#ifdef MODE_UFS2
.name = "ufs2",
#else
+#ifdef MODE_BIGENDIAN
+ .name = "ufs1_be",
+#else
.name = "ufs1",
#endif
+#endif
.dir = grub_ufs_dir,
.open = grub_ufs_open,
.read = grub_ufs_read,
@@ -839,8 +856,12 @@ static struct grub_fs grub_ufs_fs =
#ifdef MODE_UFS2
GRUB_MOD_INIT(ufs2)
#else
+#ifdef MODE_BIGENDIAN
+GRUB_MOD_INIT(ufs1_be)
+#else
GRUB_MOD_INIT(ufs1)
#endif
+#endif
{
grub_fs_register (&grub_ufs_fs);
my_mod = mod;
@@ -849,8 +870,12 @@ GRUB_MOD_INIT(ufs1)
#ifdef MODE_UFS2
GRUB_MOD_FINI(ufs2)
#else
+#ifdef MODE_BIGENDIAN
+GRUB_MOD_FINI(ufs1_be)
+#else
GRUB_MOD_FINI(ufs1)
#endif
+#endif
{
grub_fs_unregister (&grub_ufs_fs);
}
diff --git a/grub-core/fs/ufs_be.c b/grub-core/fs/ufs_be.c
new file mode 100644
index 0000000..a58f75a
--- /dev/null
+++ b/grub-core/fs/ufs_be.c
@@ -0,0 +1,2 @@
+#define MODE_BIGENDIAN 1
+#include "ufs.c"
--
1.8.2.1

View File

@ -1,79 +0,0 @@
From 10519a65aaf196c32e687a681b9565a763d772dc Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Sat, 8 Dec 2012 21:14:08 +0100
Subject: [PATCH 058/482] Fix big-endian mtime.
* grub-core/fs/ufs.c (grub_ufs_inode): Split improperly attached
together sec and usec.
(grub_ufs_dir): Use correct byteswapping for UFS time.
---
ChangeLog | 8 ++++++++
grub-core/fs/ufs.c | 19 +++++++++++++------
2 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d565547..9c6dde5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2012-12-08 Vladimir Serbinenko <phcoder@gmail.com>
+ Fix big-endian mtime.
+
+ * grub-core/fs/ufs.c (grub_ufs_inode): Split improperly attached
+ together sec and usec.
+ (grub_ufs_dir): Use correct byteswapping for UFS time.
+
+2012-12-08 Vladimir Serbinenko <phcoder@gmail.com>
+
Support big-endian UFS1.
* Makefile.util.def (libgrubmods): Add ufs_be.c
diff --git a/grub-core/fs/ufs.c b/grub-core/fs/ufs.c
index 3f2dba1..c862336 100644
--- a/grub-core/fs/ufs.c
+++ b/grub-core/fs/ufs.c
@@ -151,9 +151,9 @@ struct grub_ufs_inode
grub_uint64_t mtime;
grub_uint64_t ctime;
grub_uint64_t create_time;
- grub_uint32_t atime_sec;
- grub_uint32_t mtime_sec;
- grub_uint32_t ctime_sec;
+ grub_uint32_t atime_usec;
+ grub_uint32_t mtime_usec;
+ grub_uint32_t ctime_usec;
grub_uint32_t create_time_sec;
grub_uint32_t gen;
grub_uint32_t kernel_flags;
@@ -181,9 +181,12 @@ struct grub_ufs_inode
grub_uint16_t uid;
grub_uint16_t gid;
grub_uint64_t size;
- grub_uint64_t atime;
- grub_uint64_t mtime;
- grub_uint64_t ctime;
+ grub_uint32_t atime;
+ grub_uint32_t atime_usec;
+ grub_uint32_t mtime;
+ grub_uint32_t mtime_usec;
+ grub_uint32_t ctime;
+ grub_uint32_t ctime_usec;
union
{
struct
@@ -684,7 +687,11 @@ grub_ufs_dir (grub_device_t device, const char *path,
info.dir = ((grub_ufs_to_cpu16 (inode.mode) & GRUB_UFS_ATTR_TYPE)
== GRUB_UFS_ATTR_DIR);
+#ifdef MODE_UFS2
info.mtime = grub_ufs_to_cpu64 (inode.mtime);
+#else
+ info.mtime = grub_ufs_to_cpu32 (inode.mtime);
+#endif
info.mtimeset = 1;
if (hook (filename, &info))
--
1.8.2.1

View File

@ -1,41 +0,0 @@
From 64ab320166410339edd8ae49b19780f1a793f450 Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Mon, 10 Dec 2012 09:22:40 +0100
Subject: [PATCH 059/482] * grub-core/fs/ufs.c (grub_ufs_dir): Stop if
direntlen is 0 to avoid infinite loop on corrupted FS.
---
ChangeLog | 5 +++++
grub-core/fs/ufs.c | 3 +++
2 files changed, 8 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 9c6dde5..0b1596a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-12-10 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/fs/ufs.c (grub_ufs_dir): Stop if direntlen is 0 to avoid
+ infinite loop on corrupted FS.
+
2012-12-08 Vladimir Serbinenko <phcoder@gmail.com>
Fix big-endian mtime.
diff --git a/grub-core/fs/ufs.c b/grub-core/fs/ufs.c
index c862336..74a4a40 100644
--- a/grub-core/fs/ufs.c
+++ b/grub-core/fs/ufs.c
@@ -664,6 +664,9 @@ grub_ufs_dir (grub_device_t device, const char *path,
(char *) &dirent) < 0)
break;
+ if (dirent.direntlen == 0)
+ break;
+
#ifdef MODE_UFS2
namelen = dirent.namelen_bsd;
#else
--
1.8.2.1

View File

@ -1,52 +0,0 @@
From 62bded903da0a8a30155a757f0a89c3e39b7238c Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Mon, 10 Dec 2012 11:12:38 +0100
Subject: [PATCH 060/482] * util/getroot.c
(convert_system_partition_to_system_disk): Support nbd disks.
---
ChangeLog | 5 +++++
util/getroot.c | 12 ++++++++++++
2 files changed, 17 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 0b1596a..547f739 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2012-12-10 Vladimir Serbinenko <phcoder@gmail.com>
+ * util/getroot.c (convert_system_partition_to_system_disk): Support
+ nbd disks.
+
+2012-12-10 Vladimir Serbinenko <phcoder@gmail.com>
+
* grub-core/fs/ufs.c (grub_ufs_dir): Stop if direntlen is 0 to avoid
infinite loop on corrupted FS.
diff --git a/util/getroot.c b/util/getroot.c
index c2a25c9..24ce6aa 100644
--- a/util/getroot.c
+++ b/util/getroot.c
@@ -1796,6 +1796,18 @@ convert_system_partition_to_system_disk (const char *os_dev, struct stat *st,
return path;
}
+ if (strncmp ("nbd", p, 3) == 0
+ && p[3] >= '0' && p[3] <= '9')
+ {
+ char *ptr = p + 3;
+ while (*ptr >= '0' && *ptr <= '9')
+ ptr++;
+ if (*ptr)
+ *is_part = 1;
+ *ptr = 0;
+ return path;
+ }
+
/* If this is an IDE, SCSI or Virtio disk. */
if (strncmp ("vdisk", p, 5) == 0
&& p[5] >= 'a' && p[5] <= 'z')
--
1.8.2.1

Some files were not shown because too many files have changed in this diff Show More