* [PATCH] A couple of fixes for OpenBSD
@ 2013-10-09 9:39 Ilya Bakulin
2013-10-09 10:22 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 1 reply; 3+ messages in thread
From: Ilya Bakulin @ 2013-10-09 9:39 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]
Hi,
attached is a small fix for getroot.c to make the conversion between partition
names and drive names work correctly on OpenBSD.
After applying this and previous patch, I am able to build GRUB2 both on
5.3/amd64 and 5.3/i386 and invoke grub-install, and the GRUB2 gets installed
in the MBR and then able to load the L4 kernel + tons of modules from FAT32
filesystem (using multiboot).
Thanks!
diff --git a/contrib/grub2/util/getroot.c b/contrib/grub2/util/getroot.c
index 103a3d2..2dd8486 100644
--- a/contrib/grub2/util/getroot.c
+++ b/contrib/grub2/util/getroot.c
@@ -913,7 +913,7 @@ grub_find_device (const char *dir, dev_t dev)
/* Found! */
char *res;
char *cwd;
-#if defined(__NetBSD__)
+#if defined(__NetBSD__) || defined(__OpenBSD__)
/* Convert this block device to its character (raw) device. */
const char *template = "%s/r%s";
#else
@@ -2360,7 +2360,7 @@ grub_util_biosdisk_get_grub_dev (const char *os_dev)
}
free (sys_disk);
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ||
defined(__APPLE__) || defined(__NetBSD__) || defined (__s
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ||
defined(__APPLE__) || defined(__NetBSD__) || defined (__s
if (! S_ISCHR (st.st_mode))
#else
if (! S_ISBLK (st.st_mode))
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] A couple of fixes for OpenBSD
2013-10-09 9:39 [PATCH] A couple of fixes for OpenBSD Ilya Bakulin
@ 2013-10-09 10:22 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-10-09 13:06 ` Ilya Bakulin
0 siblings, 1 reply; 3+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2013-10-09 10:22 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 1799 bytes --]
On 09.10.2013 11:39, Ilya Bakulin wrote:
> Hi,
> attached is a small fix for getroot.c to make the conversion between partition
> names and drive names work correctly on OpenBSD.
This patch looks like one of the numerous fixes I've done recently. Do I
get it correctly that you used some older version? Is there a problem
with current trunk?
> After applying this and previous patch, I am able to build GRUB2 both on
> 5.3/amd64 and 5.3/i386 and invoke grub-install, and the GRUB2 gets installed
> in the MBR and then able to load the L4 kernel + tons of modules from FAT32
> filesystem (using multiboot).
>
> Thanks!
>
> diff --git a/contrib/grub2/util/getroot.c b/contrib/grub2/util/getroot.c
> index 103a3d2..2dd8486 100644
> --- a/contrib/grub2/util/getroot.c
> +++ b/contrib/grub2/util/getroot.c
> @@ -913,7 +913,7 @@ grub_find_device (const char *dir, dev_t dev)
> /* Found! */
> char *res;
> char *cwd;
> -#if defined(__NetBSD__)
> +#if defined(__NetBSD__) || defined(__OpenBSD__)
> /* Convert this block device to its character (raw) device. */
> const char *template = "%s/r%s";
> #else
> @@ -2360,7 +2360,7 @@ grub_util_biosdisk_get_grub_dev (const char *os_dev)
> }
> free (sys_disk);
>
> -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ||
> defined(__APPLE__) || defined(__NetBSD__) || defined (__s
> +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ||
> defined(__APPLE__) || defined(__NetBSD__) || defined (__s
> if (! S_ISCHR (st.st_mode))
> #else
> if (! S_ISBLK (st.st_mode))
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] A couple of fixes for OpenBSD
2013-10-09 10:22 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2013-10-09 13:06 ` Ilya Bakulin
0 siblings, 0 replies; 3+ messages in thread
From: Ilya Bakulin @ 2013-10-09 13:06 UTC (permalink / raw)
To: grub-devel; +Cc: Vladimir 'φ-coder/phcoder' Serbinenko
On Wednesday 09 October 2013 12:22:31 Vladimir 'φ-coder/phcoder' Serbinenko
wrote:
> On 09.10.2013 11:39, Ilya Bakulin wrote:
> > Hi,
> > attached is a small fix for getroot.c to make the conversion between
> > partition names and drive names work correctly on OpenBSD.
>
> This patch looks like one of the numerous fixes I've done recently. Do I
> get it correctly that you used some older version? Is there a problem
> with current trunk?
You're right, we have imported the revision #5152 into our private tree and
use it as the base revision to build GRUB images.
I will try to test the trunk version within the next few days, and then update
our in-tree version if everything goes well.
Thank you for your work!
--
Ilya
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-09 13:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-09 9:39 [PATCH] A couple of fixes for OpenBSD Ilya Bakulin
2013-10-09 10:22 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-10-09 13:06 ` Ilya Bakulin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.