Received: from list by lists.gnu.org with archive (Exim 4.71) id 1W9ubI-0000fQ-5M for mharc-grub-devel@gnu.org; Sun, 02 Feb 2014 05:48:32 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35716) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9ubA-0000du-Cf for grub-devel@gnu.org; Sun, 02 Feb 2014 05:48:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W9ub4-0001W7-D7 for grub-devel@gnu.org; Sun, 02 Feb 2014 05:48:24 -0500 Received: from mail1.bytemine.net ([91.212.95.17]:36705) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9ub4-0001Vt-7A for grub-devel@gnu.org; Sun, 02 Feb 2014 05:48:18 -0500 Received: from [88.217.180.198] (port=56351 helo=[192.168.178.20]) by mail1.bytemine.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1W9uau-0002xH-KL for grub-devel@gnu.org; Sun, 02 Feb 2014 11:48:09 +0100 Message-ID: <1391338082.19518.4.camel@keks> Subject: Fix serial output for OpenBSD current From: Markus =?ISO-8859-1?Q?M=FCller?= To: grub-devel@gnu.org Date: Sun, 02 Feb 2014 11:48:02 +0100 Content-Type: multipart/mixed; boundary="=-kp1LCGcGHkgFdpjAGepB" X-Mailer: Evolution 3.8.4-0ubuntu1 Mime-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 91.212.95.17 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Feb 2014 10:48:30 -0000 --=-kp1LCGcGHkgFdpjAGepB Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Hi all, attached is a patch that fixes serial console output with OpenBSD current (will be 5.5). Grub uses an old struct for providing the kernel with information about the serial console that is now gone [1]. Since the new way is in OpenBSD since 5.2, even older versions are still supported with this patch. Regards, Markus [1] http://marc.info/?l=openbsd-cvs&m=138340457301045 --=-kp1LCGcGHkgFdpjAGepB Content-Disposition: attachment; filename="grub.diff" Content-Type: text/x-patch; name="grub.diff"; charset="UTF-8" Content-Transfer-Encoding: 7bit diff --git a/grub-core/loader/i386/bsd.c b/grub-core/loader/i386/bsd.c index ea0edfa..c1d2856 100644 --- a/grub-core/loader/i386/bsd.c +++ b/grub-core/loader/i386/bsd.c @@ -1646,6 +1646,7 @@ grub_cmd_openbsd (grub_extcmd_context_t ctxt, int argc, char *argv[]) serial.device = (GRUB_OPENBSD_COM_MAJOR << 8) | port; serial.speed = speed; + serial.address = -1; grub_bsd_add_meta (OPENBSD_BOOTARG_CONSOLE, &serial, sizeof (serial)); bootflags |= OPENBSD_RB_SERCONS; @@ -1656,6 +1657,7 @@ grub_cmd_openbsd (grub_extcmd_context_t ctxt, int argc, char *argv[]) grub_memset (&serial, 0, sizeof (serial)); serial.device = (GRUB_OPENBSD_VGA_MAJOR << 8); + serial.address = -1; grub_bsd_add_meta (OPENBSD_BOOTARG_CONSOLE, &serial, sizeof (serial)); bootflags &= ~OPENBSD_RB_SERCONS; } diff --git a/include/grub/i386/openbsd_bootarg.h b/include/grub/i386/openbsd_bootarg.h index 01ca486..0166e3f 100644 --- a/include/grub/i386/openbsd_bootarg.h +++ b/include/grub/i386/openbsd_bootarg.h @@ -73,9 +73,11 @@ struct grub_openbsd_bootargs struct grub_openbsd_bootarg_console { - grub_uint32_t device; - grub_uint32_t speed; -}; + grub_int32_t device; + grub_int32_t speed; + grub_int32_t address; + grub_int32_t frequency; +} GRUB_PACKED; struct grub_openbsd_bootarg_pcibios { --=-kp1LCGcGHkgFdpjAGepB--