[OpenBIOS] [commit] r832 - in trunk/openbios-devel: arch/sparc32 drivers
blauwirbel at gmail.com
Sat Aug 7 16:53:05 CEST 2010
On Sat, Aug 7, 2010 at 1:28 PM, Mark Cave-Ayland
<mark.cave-ayland at siriusit.co.uk> wrote:
> Blue Swirl wrote:
>>> 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
>>> 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.
> Ah I see. Looks like the return value is different between open_io() and
> open_ih() :(
Not really. ;-)
>> 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.
> I think esp.c is probably the right place for the change to be made if
> you're simply wanting "cdrom" to become "sd(0,2,0):d".
>> 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.
> I'm confused. Surely if the "cdrom" alias is fixed, then once it is changed
> then it doesn't matter anymore as you would specify -boot d on the qemu
> command line? Or do you mean there is something still not right with the
> multiple boot-device code?
Yes, it doesn't work with reversed list either.
More information about the OpenBIOS