diff options
author | kmoore <kmoore@FreeBSD.org> | 2014-12-31 03:53:36 +0800 |
---|---|---|
committer | kmoore <kmoore@FreeBSD.org> | 2014-12-31 03:53:36 +0800 |
commit | fbfd84d277859def74f561a6739828b19771909e (patch) | |
tree | 01ccc8ca922abe99a0901ec1e0488fe04606cb9c /sysutils/grub2-efi | |
parent | f7a62eae9f2b1b4743ef86ef92eeefab94ac852b (diff) | |
download | freebsd-ports-gnome-fbfd84d277859def74f561a6739828b19771909e.tar.gz freebsd-ports-gnome-fbfd84d277859def74f561a6739828b19771909e.tar.zst freebsd-ports-gnome-fbfd84d277859def74f561a6739828b19771909e.zip |
- Update to newer git snap from 12/30/2014
- Simplify the patch adding EFI framebuffer passthrough
- Bump PORTREV
Diffstat (limited to 'sysutils/grub2-efi')
-rw-r--r-- | sysutils/grub2-efi/Makefile | 4 | ||||
-rw-r--r-- | sysutils/grub2-efi/distinfo | 4 | ||||
-rw-r--r-- | sysutils/grub2-efi/files/patch-grub-efi-framebuffer | 159 |
3 files changed, 37 insertions, 130 deletions
diff --git a/sysutils/grub2-efi/Makefile b/sysutils/grub2-efi/Makefile index 6f3a507b7296..b406d414a883 100644 --- a/sysutils/grub2-efi/Makefile +++ b/sysutils/grub2-efi/Makefile @@ -3,11 +3,11 @@ PORTNAME= grub2-efi PORTVERSION= 2.02 -PORTREVISION= 8 +PORTREVISION= 9 CATEGORIES= sysutils MASTER_SITES= http://www.pcbsd.org/~kris/software/ \ ftp://ftp.pcbsd.org/pub/software/ -DISTNAME= grub-${PORTVERSION}_3 +DISTNAME= grub-${PORTVERSION}_4 WRKSRC= ${WRKDIR}/grub-${PORTVERSION} MAINTAINER= kmoore@FreeBSD.org diff --git a/sysutils/grub2-efi/distinfo b/sysutils/grub2-efi/distinfo index b24b8a68c633..992bc971ef64 100644 --- a/sysutils/grub2-efi/distinfo +++ b/sysutils/grub2-efi/distinfo @@ -1,2 +1,2 @@ -SHA256 (grub-2.02_3.tar.xz) = 207b1d065f4ef18c77061c047b591a9cd2c946f5c320bdbf0fd48f41e02e4711 -SIZE (grub-2.02_3.tar.xz) = 4466580 +SHA256 (grub-2.02_4.tar.xz) = a83d1d5cbde835183252f640899bbe6700b7517f49d844756e0ec81d32a27309 +SIZE (grub-2.02_4.tar.xz) = 4471692 diff --git a/sysutils/grub2-efi/files/patch-grub-efi-framebuffer b/sysutils/grub2-efi/files/patch-grub-efi-framebuffer index 0b8196a6e374..147747b3fbcd 100644 --- a/sysutils/grub2-efi/files/patch-grub-efi-framebuffer +++ b/sysutils/grub2-efi/files/patch-grub-efi-framebuffer @@ -1,41 +1,36 @@ -From a64f6361dc16a94b62104c615cd74c70bf26cf4f Mon Sep 17 00:00:00 2001 +From 997363ec7698f34d74769960c4e76cf8b369052e Mon Sep 17 00:00:00 2001 From: Kris Moore <kris@pcbsd.org> -Date: Thu, 30 Oct 2014 13:17:15 -0400 -Subject: [PATCH] Add support for Grub booting FreeBSD UEFI FrameBuffer and - ACPI hints +Date: Tue, 30 Dec 2014 14:34:58 -0500 +Subject: [PATCH] Add the patch for FreeBSD UEFI booting / framebuffer + passthrough, add fixes to ACPI environment variables while here --- - ChangeLog | 12 ++++ - grub-core/loader/i386/bsd.c | 125 +++++++++++++++++++++++++++++++++++ - grub-core/video/efi_gop.c | 14 ++++ + ChangeLog | 9 +++ + grub-core/loader/i386/bsd.c | 134 +++++++++++++++++++++++++++++++++++ include/grub/i386/bsd.h | 1 + include/grub/i386/freebsd_bootinfo.h | 33 +++++++++ - include/grub/video.h | 18 +++++ - 6 files changed, 203 insertions(+) + 4 files changed, 177 insertions(+) create mode 100644 include/grub/i386/freebsd_bootinfo.h diff --git ChangeLog ChangeLog -index 190d19d..4ae90de 100644 +index c38917b..b717a2d 100644 --- ChangeLog +++ ChangeLog -@@ -1,3 +1,15 @@ -+2014-10-30 Kris Moore <kris@pcbsd.org> +@@ -1,3 +1,12 @@ ++2014-12-30 Kris Moore <kris@pcbsd.org> + * grub-core/loader/i386/bsd.c: Set FreeBSD specific ACPI hints when booting + in EFI mode -+2014-10-28 Kris Moore <kris@pcbsd.org> + * grub-core/loader/i386/bsd.c: Add default FreeBSD EFI video mode, and + structure to pass information into EFI booted kernel -+ * grub-core/video/efi_gop.c: Expose some additional GOP mode information + * include/grub/i386/bsd.h: Include new freebsd_bootinfo.h + * include/grub/i386/freebsd_bootinfo.h: Add grub_freebsd_btinfo_framebuf + structure for FreeBSD EFI framebuffer passthrough -+ * include/grub/video.h: Add the additional exposed GOP values + - 2014-10-14 Andrei Borzenkov <arvidjaar@gmail.com> + 2014-12-09 Andrei Borzenkov <arvidjaar@gmail.com> - * grub-core/loader/arm/linux.c: Use full initializer for initrd_ctx to + * grub-core/term/serial.c (grub_cmd_serial): Fix --rtscts diff --git grub-core/loader/i386/bsd.c grub-core/loader/i386/bsd.c -index 8f691e0..6016367 100644 +index 8f691e0..9d51cff 100644 --- grub-core/loader/i386/bsd.c +++ grub-core/loader/i386/bsd.c @@ -42,12 +42,14 @@ @@ -53,7 +48,7 @@ index 8f691e0..6016367 100644 #else #define NETBSD_DEFAULT_VIDEO_MODE "text" #include <grub/i386/pc/vbe.h> -@@ -584,6 +586,63 @@ freebsd_get_zfs (void) +@@ -584,6 +586,72 @@ freebsd_get_zfs (void) grub_free (uuid); } @@ -99,15 +94,24 @@ index 8f691e0..6016367 100644 + + efifb.fb_width = mode_info.width; + efifb.fb_height = mode_info.height; -+ efifb.fb_stride = mode_info.stride; ++ efifb.fb_stride = mode_info.pitch / mode_info.bytes_per_pixel; + + efifb.fb_addr = (grub_addr_t) framebuffer; + efifb.fb_size = ALIGN_UP (mode_info.pitch * efifb.fb_height, 65536); + -+ efifb.fb_mask_red = mode_info.red_mask; -+ efifb.fb_mask_green = mode_info.green_mask; -+ efifb.fb_mask_blue = mode_info.blue_mask; -+ efifb.fb_mask_reserved = mode_info.reserved_mask; ++ if ( mode_info.blue_field_pos == 16 ) { ++ efifb.fb_mask_red = 0x000000ff; ++ efifb.fb_mask_green = 0x0000ff00; ++ efifb.fb_mask_blue = 0x00ff0000; ++ } ++ ++ if ( mode_info.blue_field_pos == 0 ) { ++ efifb.fb_mask_red = 0x00ff0000; ++ efifb.fb_mask_green = 0x0000ff00; ++ efifb.fb_mask_blue = 0x000000ff; ++ } ++ ++ efifb.fb_mask_reserved = 0xff000000; + + err = grub_bsd_add_meta ( FREEBSD_MODINFO_METADATA | FREEBSD_BTINFO_FRAMEBUF, &efifb, sizeof (efifb)); + return err; @@ -117,7 +121,7 @@ index 8f691e0..6016367 100644 static grub_err_t grub_freebsd_boot (void) { -@@ -602,6 +661,55 @@ grub_freebsd_boot (void) +@@ -602,6 +670,55 @@ grub_freebsd_boot (void) bi.boot_device = freebsd_biosdev; @@ -173,7 +177,7 @@ index 8f691e0..6016367 100644 p_size = 0; FOR_SORTED_ENV (var) if ((grub_memcmp (var->name, "kFreeBSD.", sizeof("kFreeBSD.") - 1) == 0) && (var->name[sizeof("kFreeBSD.") - 1])) -@@ -687,6 +795,10 @@ grub_freebsd_boot (void) +@@ -687,6 +804,10 @@ grub_freebsd_boot (void) *(grub_uint32_t *) p_tag = bootflags; break; @@ -184,7 +188,7 @@ index 8f691e0..6016367 100644 case FREEBSD_MODINFO_METADATA | FREEBSD_MODINFOMD_ENVP: if (is_64bit) *(grub_uint64_t *) p_tag = bi.environment; -@@ -716,7 +828,10 @@ grub_freebsd_boot (void) +@@ -716,7 +837,10 @@ grub_freebsd_boot (void) bi.kern_end = kern_end; @@ -195,7 +199,7 @@ index 8f691e0..6016367 100644 if (is_64bit) { -@@ -1560,6 +1675,16 @@ grub_cmd_freebsd (grub_extcmd_context_t ctxt, int argc, char *argv[]) +@@ -1560,6 +1684,16 @@ grub_cmd_freebsd (grub_extcmd_context_t ctxt, int argc, char *argv[]) FREEBSD_MODINFOMD_KERNEND, &data, len); if (err) return err; @@ -212,52 +216,6 @@ index 8f691e0..6016367 100644 } grub_bsd_get_device (&freebsd_biosdev, &unit, &slice, &part); freebsd_zfsguid = 0; -diff --git grub-core/video/efi_gop.c grub-core/video/efi_gop.c -index 7f9d1c2..cfe0119 100644 ---- grub-core/video/efi_gop.c -+++ grub-core/video/efi_gop.c -@@ -180,6 +180,8 @@ grub_video_gop_fill_real_mode_info (unsigned mode, - out->mode_type = GRUB_VIDEO_MODE_TYPE_RGB; - out->bpp = grub_video_gop_get_bpp (in); - out->bytes_per_pixel = out->bpp >> 3; -+ out->stride = in->pixels_per_scanline; -+ out->pixel_format = in->pixel_format; - if (!out->bpp) - return grub_error (GRUB_ERR_IO, "unsupported video mode"); - out->pitch = in->pixels_per_scanline * out->bytes_per_pixel; -@@ -195,6 +197,10 @@ grub_video_gop_fill_real_mode_info (unsigned mode, - out->blue_field_pos = 16; - out->reserved_mask_size = 8; - out->reserved_field_pos = 24; -+ out->red_mask = 0x000000ff; -+ out->green_mask = 0x0000ff00; -+ out->blue_mask = 0x00ff0000; -+ out->reserved_mask = 0xff000000; - break; - - case GRUB_EFI_GOT_BGRA8: -@@ -206,6 +212,10 @@ grub_video_gop_fill_real_mode_info (unsigned mode, - out->blue_field_pos = 0; - out->reserved_mask_size = 8; - out->reserved_field_pos = 24; -+ out->red_mask = 0x00ff0000; -+ out->green_mask = 0x0000ff00; -+ out->blue_mask = 0x000000ff; -+ out->reserved_mask = 0xff000000; - break; - - case GRUB_EFI_GOT_BITMASK: -@@ -217,6 +227,10 @@ grub_video_gop_fill_real_mode_info (unsigned mode, - &out->blue_field_pos); - grub_video_gop_get_bitmask (in->pixel_bitmask.a, &out->reserved_mask_size, - &out->reserved_field_pos); -+ out->red_mask = in->pixel_bitmask.r; -+ out->green_mask = in->pixel_bitmask.g; -+ out->blue_mask = in->pixel_bitmask.b; -+ out->reserved_mask = in->pixel_bitmask.a; - break; - - default: diff --git include/grub/i386/bsd.h include/grub/i386/bsd.h index 524d47a..b7bb545 100644 --- include/grub/i386/bsd.h @@ -309,57 +267,6 @@ index 0000000..17e5997 + grub_uint32_t fb_mask_blue; + grub_uint32_t fb_mask_reserved; +}; -diff --git include/grub/video.h include/grub/video.h -index 52c3fd7..e980fb1 100644 ---- include/grub/video.h -+++ include/grub/video.h -@@ -141,6 +141,12 @@ struct grub_video_mode_info - /* Pitch of one scanline. How many bytes there are for scanline. */ - unsigned int pitch; - -+ /* Pixels per scanline */ -+ unsigned int stride; -+ -+ /* Native pixel format */ -+ unsigned int pixel_format; -+ - /* In index color mode, number of colors. In RGB mode this is 256. */ - unsigned int number_of_colors; - -@@ -156,21 +162,33 @@ struct grub_video_mode_info - /* What is location of red color bits. In Index Color mode, this is 0. */ - unsigned int red_field_pos; - -+ /* Native red mask */ -+ unsigned int red_mask; -+ - /* How many bits are reserved for green color. */ - unsigned int green_mask_size; - - /* What is location of green color bits. In Index Color mode, this is 0. */ - unsigned int green_field_pos; - -+ /* Native green mask */ -+ unsigned int green_mask; -+ - /* How many bits are reserved for blue color. */ - unsigned int blue_mask_size; - - /* What is location of blue color bits. In Index Color mode, this is 0. */ - unsigned int blue_field_pos; - -+ /* Native blue mask */ -+ unsigned int blue_mask; -+ - /* How many bits are reserved in color. */ - unsigned int reserved_mask_size; - -+ /* Native reserved mask */ -+ unsigned int reserved_mask; -+ - /* What is location of reserved color bits. In Index Color mode, - this is 0. */ - unsigned int reserved_field_pos; -- -2.1.2 +2.2.1 |