Re: [patch] set prefix on PPC - briQ results

2005-04-21 Thread Marco Gerards
Hollis Blanchard <[EMAIL PROTECTED]> writes: >>> Does the Pegasos have a SmartFirmware-version property? >> >> It does. It has both a CodeGen and bplan copyright property. The >> SmartFirmware-version is 1.2 here. The model is "Pegasos2,1.2". It >> seems to me that this SmartFirmware-version i

Re: [patch] set prefix on PPC - briQ results

2005-04-20 Thread Hollis Blanchard
On Apr 19, 2005, at 12:36 PM, Marco Gerards wrote: Hollis Blanchard <[EMAIL PROTECTED]> writes: I've tested the patch on briQ. As far as I can tell, CodeGen's "SmartFirmware" is crap, frequently suffering mysterious failures that require unplugging and waiting (unplugging and replugging rapidly isn

Re: [patch] set prefix on PPC - briQ results

2005-04-19 Thread Marco Gerards
Hollis Blanchard <[EMAIL PROTECTED]> writes: > I've tested the patch on briQ. As far as I can tell, CodeGen's > "SmartFirmware" is crap, frequently suffering mysterious failures that > require unplugging and waiting (unplugging and replugging rapidly > isn't enough). It also suffers frequent ATA f

Re: [patch] set prefix on PPC - briQ results

2005-04-18 Thread Hollis Blanchard
I've tested the patch on briQ. As far as I can tell, CodeGen's "SmartFirmware" is crap, frequently suffering mysterious failures that require unplugging and waiting (unplugging and replugging rapidly isn't enough). It also suffers frequent ATA failures, where the disk or controller simply stop

Re: [patch] set prefix on PPC

2005-04-17 Thread Hollis Blanchard
On Apr 17, 2005, at 2:38 PM, Marco Gerards wrote: Hollis Blanchard <[EMAIL PROTECTED]> writes: Updated patch which uses devaliases. On my pegasos the devalias is looked up perfectly for both ethernet and the harddisk. :) + if (partition) +{ + unsigned int partno = grub_strtoul (partition,

Re: [patch] set prefix on PPC

2005-04-17 Thread Marco Gerards
Hollis Blanchard <[EMAIL PROTECTED]> writes: > Interestingly, as Nico mentioned before, there are often multiple > aliases to the same device. In my case, when I boot from "hd", prefix > is set to "ultra0", because that comes first in the /aliases property > list. Everything works, but it could be

Re: [patch] set prefix on PPC

2005-04-17 Thread Marco Gerards
Hollis Blanchard <[EMAIL PROTECTED]> writes: > Updated patch which uses devaliases. On my pegasos the devalias is looked up perfectly for both ethernet and the harddisk. :) > + if (partition) > +{ > + unsigned int partno = grub_strtoul (partition, 0, 0); > + partno--; /* GRUB part

Re: [patch] set prefix on PPC

2005-04-17 Thread Hollis Blanchard
On Apr 15, 2005, at 3:24 PM, Marco Gerards wrote: When booting on the pegasosII I see the following problem: grub> set prefix=(/[EMAIL PROTECTED]/[EMAIL PROTECTED],1/[EMAIL PROTECTED],0,3) That is when I am booting using `boot hd:4 grub)'. The prefix contains an OF device name which will not work i

Re: [patch] set prefix on PPC

2005-04-17 Thread Hollis Blanchard
Updated patch which uses devaliases. -Hollis 2005-04-17 Hollis Blanchard <[EMAIL PROTECTED]> * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_encode_devname): New prototype. (grub_ieee1275_get_filename): Likewise. * kern/powerpc/ieee1275/init.c (grub_tr

Re: [patch] set prefix on PPC

2005-04-15 Thread Marco Gerards
Hollis Blanchard <[EMAIL PROTECTED]> writes: > Marco, I believe I addressed all your comments in my mail on 23 Feb > 2005. I have implemented your suggestions, with the exception of > checking the device node property lengths, as this requires modifying > many callers elsewhere in the code. > > I

Re: [patch] set prefix on PPC

2005-04-14 Thread Marco Gerards
Hollis Blanchard <[EMAIL PROTECTED]> writes: > Marco, I believe I addressed all your comments in my mail on 23 Feb > 2005. I have implemented your suggestions, with the exception of > checking the device node property lengths, as this requires modifying > many callers elsewhere in the code. Ok.

Re: [patch] set prefix on PPC

2005-04-14 Thread Marco Gerards
Hollis Blanchard <[EMAIL PROTECTED]> writes: Hi Hollis, Sorry for the late reply. For some reason I did not see this email. >> You could get the property length and use that. It would be clearer. > > All these stack-based get_property calls are an accident waiting to > happen, but you've advoc

Re: [patch] set prefix on PPC

2005-04-14 Thread Marco Gerards
Hollis Blanchard <[EMAIL PROTECTED]> writes: >>> Users trying to boot with the old syntax will fail. >> >> In my case it will still work. :) > > In your case we are stuck with an inflexible syntax forever. There is > a reason that commandline tools use named switches, and do not require > them in

Re: [patch] set prefix on PPC

2005-04-13 Thread Hollis Blanchard
Marco, I believe I addressed all your comments in my mail on 23 Feb 2005. I have implemented your suggestions, with the exception of checking the device node property lengths, as this requires modifying many callers elsewhere in the code. I will commit this in a couple days if I don't hear any com

Re: [patch] set prefix on PPC

2005-02-23 Thread Hollis Blanchard
On Feb 21, 2005, at 1:01 PM, Marco Gerards wrote: +static void +grub_set_prefix (void) +{ + char bootpath[64]; /* XXX check length */ You could get the property length and use that. It would be clearer. All these stack-based get_property calls are an accident waiting to happen, but you've advoc

Re: [patch] set prefix on PPC

2005-02-23 Thread Hollis Blanchard
On Feb 20, 2005, at 11:50 AM, Marco Gerards wrote: If a user installs GRUB now with this bootargs patch, then later if we wish to add a debug option with "fancy parser" they will no longer be able to boot, as the syntax will change. Now: "boot grubof hd0,6" Later: "boot grubof prefix=hd0,6 debug=al

Re: [patch] set prefix on PPC

2005-02-21 Thread Marco Gerards
Hollis Blanchard <[EMAIL PROTECTED]> writes: > This code sets the GRUB "prefix" environment variable from the OF > /chosen/bootpath property. It must therefore translate between the two > syntaxes. Sven just told me bootpath does not work on the pegasos II, although it will be fixed. So the argu

Re: [patch] set prefix on PPC

2005-02-20 Thread Marco Gerards
Hollis Blanchard <[EMAIL PROTECTED]> writes: > On Feb 15, 2005, at 3:31 PM, Marco Gerards wrote: >> Ok. But the file does not need to be blessed to boot from it. It's >> just used so the user can use: >> >> boot hd,0 >> >> instead of: >> >> boot hd,0:grubof >> >> To me the second sounds good eno

Re: [patch] set prefix on PPC

2005-02-19 Thread Hollis Blanchard
On Feb 15, 2005, at 3:31 PM, Marco Gerards wrote: Ok. But the file does not need to be blessed to boot from it. It's just used so the user can use: boot hd,0 instead of: boot hd,0:grubof To me the second sounds good enough. Or does that cause other problems? Remember that resetting the PRAM (a

Re: [patch] set prefix on PPC

2005-02-15 Thread Marco Gerards
Hollis Blanchard <[EMAIL PROTECTED]> writes: >> How is the file blessed and why does that make it a problem to keep >> /boot on a HFS partition? > > The file is blessed with hfsutils, spefically hattrib(1). I do not > know if the in-kernel HFS(+) drivers allow for such changes (via > ioctls for ex

Re: [patch] set prefix on PPC

2005-02-15 Thread Hollis Blanchard
On Feb 14, 2005, at 1:01 PM, Marco Gerards wrote: Hollis Blanchard <[EMAIL PROTECTED]> writes: 2) HFS has a concept called "blessed"; basically the firmware can automatically find and boot blessed executables without needing to specify a file name or even partition. Some versions of Mac OS allegedl

Re: [patch] set prefix on PPC

2005-02-14 Thread Marco Gerards
Hollis Blanchard <[EMAIL PROTECTED]> writes: > On Feb 13, 2005, at 12:35 PM, Marco Gerards wrote: > >> Hollis Blanchard <[EMAIL PROTECTED]> writes: >> >>> This code sets the GRUB "prefix" environment variable from the OF >>> /chosen/bootpath property. It must therefore translate between the two >>

Re: [patch] set prefix on PPC

2005-02-13 Thread Hollis Blanchard
On Feb 13, 2005, at 12:35 PM, Marco Gerards wrote: Hollis Blanchard <[EMAIL PROTECTED]> writes: This code sets the GRUB "prefix" environment variable from the OF /chosen/bootpath property. It must therefore translate between the two syntaxes. Personally I don't like setting prefix to the path grubo

Re: [patch] set prefix on PPC

2005-02-13 Thread Marco Gerards
Hollis Blanchard <[EMAIL PROTECTED]> writes: Hi, > This code sets the GRUB "prefix" environment variable from the OF > /chosen/bootpath property. It must therefore translate between the two > syntaxes. Personally I don't like setting prefix to the path grubof was loaded from. Mainly because of

[patch] set prefix on PPC

2005-02-13 Thread Hollis Blanchard
Any comments on this patch? This code sets the GRUB "prefix" environment variable from the OF /chosen/bootpath property. It must therefore translate between the two syntaxes. I believe most of this code could be moved to a kern/ieee1275/device.c file, but that can wait until there is another supp