rpms/grub/devel grub-fedora-9.patch,1.10,1.11 grub.spec,1.72,1.73

Peter Jones (pjones) fedora-extras-commits at redhat.com
Tue Apr 1 21:36:34 UTC 2008


Author: pjones

Update of /cvs/extras/rpms/grub/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25111

Modified Files:
	grub-fedora-9.patch grub.spec 
Log Message:
* Tue Apr 01 2008 Peter Jones <pjones at redhat.com> - 0.97-32
- Add graphics debug mode
- Fix screen geometry variable passing
- Fix broken efi call wrapper on x86_64 so UGA works there.


grub-fedora-9.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.10 -r 1.11 grub-fedora-9.patch
Index: grub-fedora-9.patch
===================================================================
RCS file: /cvs/extras/rpms/grub/devel/grub-fedora-9.patch,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- grub-fedora-9.patch	20 Mar 2008 17:28:53 -0000	1.10
+++ grub-fedora-9.patch	1 Apr 2008 21:35:44 -0000	1.11
@@ -11494,7 +11494,7 @@
  @set VERSION 0.97
 diff --git a/efi/Makefile.am b/efi/Makefile.am
 new file mode 100644
-index 0000000..d28df9f
+index 0000000..4d97dbe
 --- /dev/null
 +++ b/efi/Makefile.am
 @@ -0,0 +1,78 @@
@@ -11569,7 +11569,7 @@
 +	$(HERCULES_FLAGS) $(GRAPHICS_FLAGS)
 +
 +noinst_LIBRARIES = libgrubefi.a
-+libgrubefi_a_SOURCES = $(EFI_ARCH)/callwrap.S eficore.c efimm.c efimisc.c \
++libgrubefi_a_SOURCES = $(EFI_ARCH)/callwrap.c eficore.c efimm.c efimisc.c \
 +	$(EFI_ARCH)/setjmp.S eficon.c efidisk.c graphics.c efigraph.c efiuga.c \
 +	font_8x16.c efiserial.c $(EFI_ARCH)/loader/linux.c efichainloader.c \
 +	xpm.c
@@ -13421,10 +13421,10 @@
 +}
 diff --git a/efi/efigraph.c b/efi/efigraph.c
 new file mode 100644
-index 0000000..e424621
+index 0000000..0babe11
 --- /dev/null
 +++ b/efi/efigraph.c
-@@ -0,0 +1,1078 @@
+@@ -0,0 +1,1199 @@
 +/* efigraph.c - EFI "graphics output" support for GRUB/EFI */
 +/*
 + *  GRUB  --  GRand Unified Bootloader
@@ -13450,6 +13450,9 @@
 +
 +#ifdef SUPPORT_GRAPHICS
 +
++#include <grub/misc.h>
++#include <grub/types.h>
++#include <grub/cpu/linux.h>
 +#include <grub/efi/api.h>
 +#include <grub/efi/efi.h>
 +#include <grub/misc.h>
@@ -13543,6 +13546,137 @@
 +static const int n_cga_colors = sizeof (cga_colors) / sizeof (cga_colors[0]);
 +
 +static void
++find_bits (unsigned long mask, unsigned char *first,
++	   unsigned char* len)
++{
++  unsigned char bit_pos = 0, bit_len = 0;
++  *first =0;
++  *len = 0;
++  if (mask == 0)
++    return;
++  while (! (mask & 0x1)) {
++    mask = mask >> 1;
++    bit_pos++;
++  }
++  while (mask & 0x1) {
++    mask = mask >> 1;
++    bit_len++;
++  }
++  *first = bit_pos;
++  *len = bit_len;
++}
++
++static void
++set_kernel_params(struct graphics_backend *backend,
++            struct linux_kernel_params *params)
++{
++    struct eg *eg;
++    
++    if (!backend || !backend->priv)
++        return;
++
++    eg = backend->priv;
++    grub_efi_graphics_output_t *gop_intf = NULL;
++    grub_efi_graphics_output_mode_t *gop_mode = NULL;
++    grub_efi_status_t efi_status = GRUB_EFI_SUCCESS;
++    grub_efi_graphics_output_mode_information_t *gop_info = NULL;
++    grub_efi_uintn_t size;
++
++    gop_intf = grub_efi_locate_protocol (&graphics_output_guid, NULL);
++    if (gop_intf == NULL)
++        return;
++
++    gop_mode = gop_intf->mode;
++
++    efi_status = Call_Service_4 (gop_intf->query_mode,
++			       gop_intf, gop_mode->mode, &size, &gop_info);
++
++
++    if (efi_status == GRUB_EFI_SUCCESS) {
++        /* No VBE on EFI.  */
++        params->lfb_width = gop_info->horizontal_resolution;
++        params->lfb_height = gop_info->vertical_resolution;
++        params->lfb_base = gop_mode->frame_buffer_base;
++        params->lfb_size = gop_mode->frame_buffer_size;
++        params->lfb_pages = 1;
++        params->vesapm_segment = 0;
++        params->vesapm_offset = 0;
++        params->vesa_attrib = 0;
++        if (gop_info->pixel_format == GRUB_EFI_PIXEL_RGBR_8BIT_PER_COLOR) {
++            params->lfb_depth = 32;
++            params->red_mask_size = 8;
++            params->red_field_pos = 0;
++            params->green_mask_size = 8;
++            params->green_field_pos = 8;
++            params->blue_mask_size = 8;
++            params->blue_field_pos = 16;
++            params->reserved_mask_size = 8;
++            params->reserved_field_pos = 24;
++            params->lfb_line_len = gop_info->pixels_per_scan_line * 4;
++        } else if (gop_info->pixel_format == 
++                GRUB_EFI_PIXEL_BGRR_8BIT_PER_COLOR) {
++            params->lfb_depth = 32;
++            params->red_mask_size = 8;
++            params->red_field_pos = 16;
++            params->green_mask_size = 8;
++            params->green_field_pos = 8;
++            params->blue_mask_size = 8;
++            params->blue_field_pos = 0;
++            params->reserved_mask_size = 8;
++            params->reserved_field_pos = 24;
++            params->lfb_line_len = gop_info->pixels_per_scan_line * 4;
++        } else if (gop_info->pixel_format == GRUB_EFI_PIXEL_BIT_MASK) {
++            find_bits (gop_info->pixel_information.red_mask,
++      		 &params->red_field_pos, &params->red_mask_size);
++            find_bits (gop_info->pixel_information.green_mask,
++      		 &params->green_field_pos, &params->green_mask_size);
++            find_bits (gop_info->pixel_information.blue_mask,
++      		 &params->blue_field_pos, &params->blue_mask_size);
++            find_bits (gop_info->pixel_information.reserved_mask,
++      		 &params->reserved_field_pos, &params->reserved_mask_size);
++            params->lfb_depth = params->red_mask_size
++                                + params->green_mask_size
++                                + params->blue_mask_size
++                                + params->reserved_mask_size;
++            params->lfb_line_len =
++                (gop_info->pixels_per_scan_line * params->lfb_depth) / 8;
++        } else  {
++            params->lfb_depth = 4;
++            params->red_mask_size = 0;
++            params->red_field_pos = 0;
++            params->green_mask_size = 0;
++            params->green_field_pos = 0;
++            params->blue_mask_size = 0;
++            params->blue_field_pos = 0;
++            params->reserved_mask_size = 0;
++            params->reserved_field_pos = 0;
++            params->lfb_line_len = params->lfb_width / 2;
++        }
++#if 0
++        params->video_cursor_x = 0;
++        params->video_cursor_y = 0;
++        params->video_page = 0;
++        params->video_mode = 0;
++        params->video_width = 0;
++        params->video_ega_bx = 0;
++        params->video_height = 0;
++        params->have_vga = 0x70;
++        params->font_size = 0;
++#else
++        params->video_cursor_x = grub_efi_system_table->con_out->mode->cursor_column;
++        params->video_cursor_y = grub_efi_system_table->con_out->mode->cursor_row;
++        params->video_page = 0; /* ??? */
++        params->video_mode = grub_efi_system_table->con_out->mode->mode;
++        params->video_width = (grub_console_getwh () >> 8);
++        params->video_ega_bx = 0;
++        params->video_height = (grub_console_getwh () & 0xff);
++        params->have_vga = VIDEO_TYPE_EFI;
++        params->font_size = 16; /* XXX */
++#endif
++    }
++}
++
++static void
 +pixel_to_rgb(grub_efi_graphics_output_pixel_t *pixel,
 +             int *red, int *green, int *blue)
 +{
@@ -13972,6 +14106,7 @@
 +    position_t pos = {0, 0};
 +    grub_efi_graphics_output_mode_information_t *info;
 +    grub_efi_uintn_t x, y, i, j;
++    unsigned char r = 0 ,g = 0;
 +
 +    info = eg->modes[eg->graphics_mode]->info;
 +    x = info->horizontal_resolution;
@@ -13982,16 +14117,22 @@
 +
 +    bltbuf = alloc_bltbuf(x, y);
 +    for (j = 0; j < y; j++) {
++        if (debug_graphics && j % 16 == 0) {
[...1918 lines suppressed...]
  };
  #endif /* SUPPORT_SERIAL */
  
@@ -37140,7 +37321,7 @@
  
  /* setkey */
  struct keysym
-@@ -3612,50 +3900,47 @@ static struct keysym keysym_table[] =
+@@ -3612,50 +3905,47 @@ static struct keysym keysym_table[] =
    {"delete",		0,		0x7f,	0,	0x53}
  };
  
@@ -37225,7 +37406,7 @@
    to_key = arg;
    from_key = skip_to (0, to_key);
  
-@@ -3973,7 +4258,7 @@ setup_func (char *arg, int flags)
+@@ -3973,7 +4263,7 @@ setup_func (char *arg, int flags)
  
    /* The prefix was determined.  */
    grub_sprintf (stage2, "%s%s", prefix, "/stage2");
@@ -37234,7 +37415,7 @@
    *real_config_filename = 0;
  
    /* Check if stage2 exists.  */
-@@ -4083,9 +4368,10 @@ static struct builtin builtin_setup =
+@@ -4083,9 +4373,10 @@ static struct builtin builtin_setup =
    " partition where GRUB images reside, specify the option `--stage2'"
    " to tell GRUB the file name under your OS."
  };
@@ -37246,7 +37427,7 @@
  /* terminal */
  static int
  terminal_func (char *arg, int flags)
-@@ -4244,17 +4530,21 @@ terminal_func (char *arg, int flags)
+@@ -4244,17 +4535,21 @@ terminal_func (char *arg, int flags)
   end:
    current_term = term_table + default_term;
    current_term->flags = term_flags;
@@ -37273,7 +37454,7 @@
    
    return 0;
  }
-@@ -4264,7 +4554,7 @@ static struct builtin builtin_terminal =
+@@ -4264,7 +4559,7 @@ static struct builtin builtin_terminal =
    "terminal",
    terminal_func,
    BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST,
@@ -37282,7 +37463,7 @@
    "Select a terminal. When multiple terminals are specified, wait until"
    " you push any key to continue. If both console and serial are specified,"
    " the terminal to which you input a key first will be selected. If no"
-@@ -4276,7 +4566,7 @@ static struct builtin builtin_terminal =
+@@ -4276,7 +4571,7 @@ static struct builtin builtin_terminal =
    " seconds. The option --lines specifies the maximum number of lines."
    " The option --silent is used to suppress messages."
  };
@@ -37291,7 +37472,7 @@
  
  
  #ifdef SUPPORT_SERIAL
-@@ -4462,6 +4752,7 @@ static struct builtin builtin_testload =
+@@ -4462,6 +4757,7 @@ static struct builtin builtin_testload =
    " step is to try loading a kernel."
  };
  
@@ -37299,7 +37480,7 @@
  
  /* testvbe MODE */
  static int
-@@ -4566,6 +4857,7 @@ static struct builtin builtin_testvbe =
+@@ -4566,6 +4862,7 @@ static struct builtin builtin_testvbe =
    "testvbe MODE",
    "Test the VBE mode MODE. Hit any key to return."
  };
@@ -37307,7 +37488,7 @@
  
  
  #ifdef SUPPORT_NETBOOT
-@@ -4598,6 +4890,15 @@ static struct builtin builtin_tftpserver =
+@@ -4598,6 +4895,15 @@ static struct builtin builtin_tftpserver =
  static int
  timeout_func (char *arg, int flags)
  {
@@ -37323,7 +37504,7 @@
    if (! safe_parse_maxint (&arg, &grub_timeout))
      return 1;
  
-@@ -4661,6 +4962,7 @@ static struct builtin builtin_unhide =
+@@ -4661,6 +4967,7 @@ static struct builtin builtin_unhide =
    " partition type code."
  };
  
@@ -37331,7 +37512,7 @@
  
  /* uppermem */
  static int
-@@ -4790,11 +5092,15 @@ static struct builtin builtin_vbeprobe =
+@@ -4790,11 +5097,15 @@ static struct builtin builtin_vbeprobe =
    "Probe VBE information. If the mode number MODE is specified, show only"
    " the information about only the mode."
  };
@@ -37347,7 +37528,7 @@
    &builtin_blocklist,
    &builtin_boot,
  #ifdef SUPPORT_NETBOOT
-@@ -4802,6 +5108,7 @@ struct builtin *builtin_table[] =
+@@ -4802,6 +5113,7 @@ struct builtin *builtin_table[] =
  #endif /* SUPPORT_NETBOOT */
    &builtin_cat,
    &builtin_chainloader,
@@ -37355,7 +37536,7 @@
    &builtin_cmp,
    &builtin_color,
    &builtin_configfile,
-@@ -4813,14 +5120,21 @@ struct builtin *builtin_table[] =
+@@ -4813,14 +5125,21 @@ struct builtin *builtin_table[] =
  #ifdef SUPPORT_NETBOOT
    &builtin_dhcp,
  #endif /* SUPPORT_NETBOOT */
@@ -37377,7 +37558,7 @@
    &builtin_fstest,
    &builtin_geometry,
    &builtin_halt,
-@@ -4830,27 +5144,35 @@ struct builtin *builtin_table[] =
+@@ -4830,27 +5149,35 @@ struct builtin *builtin_table[] =
  #ifdef SUPPORT_NETBOOT
    &builtin_ifconfig,
  #endif /* SUPPORT_NETBOOT */
@@ -37415,7 +37596,7 @@
  #ifdef SUPPORT_NETBOOT
    &builtin_rarp,
  #endif /* SUPPORT_NETBOOT */
-@@ -4862,23 +5184,32 @@ struct builtin *builtin_table[] =
+@@ -4862,23 +5189,32 @@ struct builtin *builtin_table[] =
  #ifdef SUPPORT_SERIAL
    &builtin_serial,
  #endif /* SUPPORT_SERIAL */
@@ -39683,7 +39864,7 @@
  
  /* Generic definitions.  */
 diff --git a/stage2/shared.h b/stage2/shared.h
-index 77eef11..cb49208 100644
+index 77eef11..829a25f 100644
 --- a/stage2/shared.h
 +++ b/stage2/shared.h
 @@ -35,9 +35,10 @@
@@ -39759,7 +39940,15 @@
  } __attribute__ ((packed));
  
  /* VBE controller information.  */
-@@ -860,17 +865,25 @@ void init_builtins (void);
+@@ -627,6 +632,7 @@ extern void (*disk_read_func) (int, int, int);
+ #ifndef STAGE1_5
+ /* The flag for debug mode.  */
+ extern int debug;
++extern int debug_graphics;
+ #endif /* STAGE1_5 */
+ 
+ extern unsigned long current_drive;
+@@ -860,17 +866,25 @@ void init_builtins (void);
  void init_config (void);
  char *skip_to (int after_equal, char *cmdline);
  struct builtin *find_command (char *command);
@@ -39787,7 +39976,7 @@
  void *grub_memmove (void *to, const void *from, int len);
  void *grub_memset (void *start, int c, int len);
  int grub_strncat (char *s1, const char *s2, int n);
-@@ -881,7 +894,7 @@ int grub_strlen (const char *str);
+@@ -881,7 +895,7 @@ int grub_strlen (const char *str);
  char *grub_strcpy (char *dest, const char *src);
  
  #ifndef GRUB_UTIL
@@ -39796,7 +39985,7 @@
  #else
  /* In the grub shell, use the libc jmp_buf instead.  */
  # include <setjmp.h>
-@@ -904,7 +917,7 @@ extern grub_jmp_buf restart_cmdline_env;
+@@ -904,7 +918,7 @@ extern grub_jmp_buf restart_cmdline_env;
  /* misc */
  void init_page (void);
  void print_error (void);
@@ -39805,7 +39994,7 @@
  int get_cmdline (char *prompt, char *cmdline, int maxlen,
  		 int echo_char, int history);
  int substring (const char *s1, const char *s2);
-@@ -934,7 +947,9 @@ int next_partition (unsigned long drive, unsigned long dest,
+@@ -934,7 +948,9 @@ int next_partition (unsigned long drive, unsigned long dest,
  		    unsigned long *partition, int *type,
  		    unsigned long *start, unsigned long *len,
  		    unsigned long *offset, int *entry,
@@ -39816,7 +40005,7 @@
  
  /* Sets device to the one represented by the SAVED_* parameters. */
  int make_saved_active (void);
-@@ -991,6 +1006,13 @@ int check_password(char *entered, char* expected, password_t type);
+@@ -991,6 +1007,13 @@ int check_password(char *entered, char* expected, password_t type);
  
  void init_bios_info (void);
  


Index: grub.spec
===================================================================
RCS file: /cvs/extras/rpms/grub/devel/grub.spec,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- grub.spec	20 Mar 2008 17:28:53 -0000	1.72
+++ grub.spec	1 Apr 2008 21:35:44 -0000	1.73
@@ -1,6 +1,6 @@
 Name: grub
 Version: 0.97
-Release: 31%{?dist}
+Release: 32%{?dist}
 Summary: GRUB - the Grand Unified Boot Loader.
 Group: System Environment/Base
 License: GPLv2+
@@ -89,6 +89,11 @@
 %{_datadir}/grub
 
 %changelog
+* Tue Apr 01 2008 Peter Jones <pjones at redhat.com> - 0.97-32
+- Add graphics debug mode
+- Fix screen geometry variable passing
+- Fix broken efi call wrapper on x86_64 so UGA works there.
+
 * Thu Mar 20 2008 Peter Jones <pjones at redhat.com> - 0.97-31
 - Fix efifb setup.
 




More information about the fedora-extras-commits mailing list