grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GRUB device names wrt. ieee1275


From: David Miller
Subject: Re: GRUB device names wrt. ieee1275
Date: Sun, 15 Mar 2009 15:52:26 -0700 (PDT)

From: Vesa Jääskeläinen <address@hidden>
Date: Sun, 15 Mar 2009 11:22:21 +0200

> David Miller wrote:
> > The problem is two fold:
> > 
> > 1) "," characters can appear anywhere in an openfirmware path
> >    name.  For example my workstations disk is:
> > 
> >     
> > /address@hidden,600000/address@hidden/address@hidden/address@hidden/address@hidden/address@hidden
> > 
> >    There are no quick workarounds for this.  For example, even if we
> >    can change the partition fetching code in GRUB to use "strrchr()"
> >    instead of "strchr()" in kern/disk.c:grub_disk_open() it will
> >    still think the above path has partition ",600000" or something
> >    silly like that.
> 
> Actually related question here is that how do you specify similar device
> paths in x86? Now that there is pci support and some kinda usb support
> it could be good idea to specify exact device somehow in some use cases.

I have no idea, it has to be something very similar.

My suspicion is that they've been purely using device aliases which
elides the whole "commas in the path" issue.

> > 2) Disks can have multiple comma seperated components especially
> >    on SCSI in OF path names.  For example a disk on target 2,
> >    lun 3, would have final path component "address@hidden,3"
> > 
> >    And currently that ",3" would look like a parition specification
> >    to GRUB.
> > 
> > Therefore, I would suggest that we adopt the openfirmware partition
> > specification of ":" on GRUB for ieee1275 platforms.
> > 
> > Then we just have a machine specific path seperator, defined in
> > some <grub/machine/foo.h> header file and the kernel/disk.c code
> > and elsewhere use the macro instead of ","
> > 
> > Any objections?
> 
> So you propose following:
> 
> (/address@hidden,600000/address@hidden/address@hidden/address@hidden/address@hidden/address@hidden:1)
> (/address@hidden,600000/address@hidden/address@hidden/address@hidden/address@hidden/address@hidden:a,1)
> 
> ( $FW_DISK_NAME + ':' + $GRUB_PARTITION_SCHEME )

I'm proposing purely ":a" instead of how grub currently says ",1".

There is work some folks are doing on EFI support for openfirmware.
One consequence of that is that you have to support more partitions
than 'a' - 'z' can represent, and the encoding there would be to
use decimal numbers for partitions larger than 25 so it would be
":26", ":27", etc.

> Lets try couple of examples:
> 
> 1. (hd0) => a-d) device alias 'hd0', no partition
> 
> 2. (hd0,1) => a-d) device alias 'hd0', partition '1'
> 
> 3. (hd0:1) =>
>   a) device alias 'hd0:1', no partition
>   b) device alias 'hd0:1', no partition
>   c) device alias 'hd0', partition '1'
>   d) device alias 'hd0:1', no partition

This is not what I'm proposing at all.

On openfirmware platforms (only) what you would call
"hd0,1" would become "$(OPENFIRMWARE_PATH_OR_DEVALIAS):a"

So we'd have things like:

        disk:a  /* openfirmware devalias */
        disk1:a /* openfirmware devalias */
        
/address@hidden,600000/address@hidden/address@hidden/address@hidden/address@hidden/address@hidden:a
 /* full path */

etc.

There is no confusion here, ":" always means the path has ended
and we are about to see a partition specifier.

Lack of ":" means whole-disk.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]