[OpenBIOS] [commit] r832 - in trunk/openbios-devel: arch/sparc32 drivers

Blue Swirl blauwirbel at gmail.com
Sat Aug 7 15:05:21 CEST 2010


On Wed, Aug 4, 2010 at 7:08 PM, Mark Cave-Ayland
<mark.cave-ayland at siriusit.co.uk> wrote:
> Mark Cave-Ayland wrote:
>
>>> I changed the boot-device like this:
>>> diff --git a/arch/sparc32/openbios.c b/arch/sparc32/openbios.c
>>> index 60ee180..3624269 100644
>>> --- a/arch/sparc32/openbios.c
>>> +++ b/arch/sparc32/openbios.c
>>> @@ -187,11 +187,11 @@ arch_init( void )
>>>                push_str("floppy");
>>>                break;
>>>        case 'c':
>>> -               push_str("disk");
>>> +                push_str("disk disk:d");
>>>                break;
>>>        default:
>>>        case 'd':
>>> -               push_str("cdrom");
>>> +                push_str("cdrom cdrom:d");
>>>                break;
>>>        case 'n':
>>>                push_str("net");
>>
>> Hmmm that should work. I'm just about to head home now, but can take a
>> look later this evening. What's the filename of the ISO image you are using
>> so I can use it for testing?
>
> Ah wait a sec - according to the IEEE-1275 spec, the device chosen from
> boot-device is the first one that can be successfully opened, i.e. returns a
> valid ihandle with open-dev. Since the cdrom device is first in the list
> (and can always be successfully opened), it will never try the next option.
>
> So what you need to do is swap the order over from "cdrom cdrom:d" to
> "cdrom:d cdrom" which should give the desired behaviour.

The problem which prevented NetBSD boot was actually open_ih() return
value check, fixed in r839. R840 is only cosmetic.

I could now change 'cdrom' to point to 'd' partition. One place for
the change is obviously in openbios.c, but a change there doesn't
affect the other variant aliases like 'sd(0,2,0)' which should also be
adjusted. These are added in esp.c.

There's also automatic partition selection code in sun-parts.c which
is a bit ugly. With ':d' appended to 'cdrom', that may actually force
the selected partition to be the first ('a') partition.

I think it's better to postpone these changes until multiple boot
devices can be used in openbios.c.



More information about the OpenBIOS mailing list