From owner-svn-ports-all@FreeBSD.ORG Tue Dec 30 19:53:39 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34E274A0; Tue, 30 Dec 2014 19:53:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EC1219E6; Tue, 30 Dec 2014 19:53:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBUJrcBc021208; Tue, 30 Dec 2014 19:53:38 GMT (envelope-from kmoore@FreeBSD.org) Received: (from kmoore@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBUJrb0H021203; Tue, 30 Dec 2014 19:53:37 GMT (envelope-from kmoore@FreeBSD.org) Message-Id: <201412301953.sBUJrb0H021203@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kmoore set sender to kmoore@FreeBSD.org using -f From: Kris Moore Date: Tue, 30 Dec 2014 19:53:37 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r375847 - in head/sysutils: grub2-efi grub2-efi/files grub2-pcbsd X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2014 19:53:39 -0000 Author: kmoore Date: Tue Dec 30 19:53:36 2014 New Revision: 375847 URL: https://svnweb.freebsd.org/changeset/ports/375847 QAT: https://qat.redports.org/buildarchive/r375847/ Log: - Update to newer git snap from 12/30/2014 - Simplify the patch adding EFI framebuffer passthrough - Bump PORTREV Modified: head/sysutils/grub2-efi/Makefile head/sysutils/grub2-efi/distinfo head/sysutils/grub2-efi/files/patch-grub-efi-framebuffer head/sysutils/grub2-pcbsd/Makefile head/sysutils/grub2-pcbsd/distinfo Modified: head/sysutils/grub2-efi/Makefile ============================================================================== --- head/sysutils/grub2-efi/Makefile Tue Dec 30 19:19:43 2014 (r375846) +++ head/sysutils/grub2-efi/Makefile Tue Dec 30 19:53:36 2014 (r375847) @@ -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 Modified: head/sysutils/grub2-efi/distinfo ============================================================================== --- head/sysutils/grub2-efi/distinfo Tue Dec 30 19:19:43 2014 (r375846) +++ head/sysutils/grub2-efi/distinfo Tue Dec 30 19:53:36 2014 (r375847) @@ -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 Modified: head/sysutils/grub2-efi/files/patch-grub-efi-framebuffer ============================================================================== --- head/sysutils/grub2-efi/files/patch-grub-efi-framebuffer Tue Dec 30 19:19:43 2014 (r375846) +++ head/sysutils/grub2-efi/files/patch-grub-efi-framebuffer Tue Dec 30 19:53:36 2014 (r375847) @@ -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 -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 +@@ -1,3 +1,12 @@ ++2014-12-30 Kris Moore + * grub-core/loader/i386/bsd.c: Set FreeBSD specific ACPI hints when booting + in EFI mode -+2014-10-28 Kris Moore + * 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 + 2014-12-09 Andrei Borzenkov - * 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 -@@ -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 Modified: head/sysutils/grub2-pcbsd/Makefile ============================================================================== --- head/sysutils/grub2-pcbsd/Makefile Tue Dec 30 19:19:43 2014 (r375846) +++ head/sysutils/grub2-pcbsd/Makefile Tue Dec 30 19:53:36 2014 (r375847) @@ -3,11 +3,11 @@ PORTNAME= grub2-pcbsd PORTVERSION= 2.02p -PORTREVISION= 16 +PORTREVISION= 17 CATEGORIES= sysutils MASTER_SITES= http://www.pcbsd.org/~kris/software/ \ ftp://ftp.pcbsd.org/pub/software/ -DISTNAME= grub-2.02_3 +DISTNAME= grub-2.02_4 MAINTAINER= kmoore@FreeBSD.org COMMENT= Multiboot boot loader Modified: head/sysutils/grub2-pcbsd/distinfo ============================================================================== --- head/sysutils/grub2-pcbsd/distinfo Tue Dec 30 19:19:43 2014 (r375846) +++ head/sysutils/grub2-pcbsd/distinfo Tue Dec 30 19:53:36 2014 (r375847) @@ -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