[PATCH]: Handle lettered OF path partitions on sparc64.
OpenBoot uses ":a", ":b", etc. partition specifiers instead of the numbered ":1", ":2", etc. that the generic ieee1275 code expects. Instead of cruddng up the generic ieee1275 code with this, just convert in the sparc64 specific code beforehand. Committed. 2009-04-30 David S. Miller * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If lettered partition specifier is found, convert to numbered. diff --git a/kern/sparc64/ieee1275/init.c b/kern/sparc64/ieee1275/init.c index 5114f76..699f963 100644 --- a/kern/sparc64/ieee1275/init.c +++ b/kern/sparc64/ieee1275/init.c @@ -64,8 +64,8 @@ grub_machine_set_prefix (void) if (grub_prefix[0] != '(') { char bootpath[IEEE1275_MAX_PATH_LEN]; + char *prefix, *path, *colon; grub_ssize_t actual; - char *prefix, *path; if (grub_ieee1275_get_property (grub_ieee1275_chosen, "bootpath", &bootpath, sizeof (bootpath), &actual)) @@ -77,6 +77,17 @@ grub_machine_set_prefix (void) } /* Transform an OF device path to a GRUB path. */ + colon = grub_strchr (bootpath, ':'); + if (colon) + { + char *part = colon + 1; + + /* Consistently provide numbered partitions to GRUB. +OpenBOOT traditionally uses alphabetical partition +specifiers. */ + if (part[0] >= 'a' && part[0] <= 'z') + part[0] = '1' + (part[0] - 'a'); + } prefix = grub_ieee1275_encode_devname (bootpath); path = grub_malloc (grub_strlen (grub_prefix) ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
[PATCH]: Handle virtual disk device names on powerpc/sparc64
PowerPC and Sparc64 virtualized disks on hypervisor systems are named /dev/vdiskX instead of /dev/vdX. Handle this. Committed. 2009-04-30 David S. Miller * util/hostdisk.c (convert_system_partition_to_system_disk): Handle virtual disk devices named /dev/vdiskX as found on sparc and powerpc. diff --git a/util/hostdisk.c b/util/hostdisk.c index aa41703..eaccb73 100644 --- a/util/hostdisk.c +++ b/util/hostdisk.c @@ -767,6 +767,13 @@ convert_system_partition_to_system_disk (const char *os_dev) } /* If this is an IDE, SCSI or Virtio disk. */ + if (strncmp ("vdisk", p, 5) == 0 + && p[5] >= 'a' && p[5] <= 'z') + { + /* /dev/vdisk[a-z][0-9]* */ + p[6] = '\0'; + return path; + } if ((strncmp ("hd", p, 2) == 0 || strncmp ("vd", p, 2) == 0 || strncmp ("sd", p, 2) == 0) ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH]: grub: Partitions can start at zero.
From: Vladimir Serbinenko Date: Mon, 20 Apr 2009 18:53:35 +0200 > On Mon, Apr 20, 2009 at 2:30 AM, David Miller wrote: > >> >> With Sun partitions, individual partitions can start at disk >> address zero. That's right, zero. >> >> This works because UFS and EXT{2,3,4} superblocks are offset >> far enough into the partition that it won't overwrite the >> disk label nor the boot block. >> >> I added an, arguably hackish, heuristic to handle this properly. >> Basically if the OS device name does not end in a digit we'll believe >> that a zero hdg.start value can be a partition. >> >> If anyone has a better way to handle this, let me know :-) >> > What about the way I proposed in thread on implementing nested partitions? After some discussions with Vladimir on IRC, he agreed that my change goes in for now until his nested partition work is ready. So I have committed this change. GRUB works on sparc64 right now on the one test system I got working tonight, a sparc64 virtualized Sun LDOM guest system. In fact most systems should work as long as they don't have "," characters in their block device OF path name. I'm working on that problem now. ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel
Re: mmap services
From: "Vladimir 'phcoder' Serbinenko" Date: Thu, 30 Apr 2009 15:36:36 +0200 > Rediffed and reposted due to request by David Miller I've looked these over and I'm completely OK with these changes as long as at least basic testing occurs for the BIOS, ACPI, and EFI cases that are effected by this change. ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel