[PATCH] 0/2 RFC: yaboot --bootonce

Dustin Kirkland dustin.kirkland at us.ibm.com
Tue Sep 19 12:19:38 EST 2006


On Tue, 2006-09-19 at 00:50 +0200, sparky at pld-linux.org wrote:
> On Mon, Sep 18, 2006 at 05:07:15PM -0500, Dustin Kirkland wrote:
> 
> > - 1/2: In userspace, extend ybin to understand a --bootonce parameter,
> > which takes a bootloader entry label.  If this is an existing, valid
> > label in the bootloader configuration file, perform a raw write of that
> > value to an empty block in the PReP boot partition.
> 
> Isn't it easier/better to save that information in NVRAM ? Or am I
> missing something (maybe nvram is mac-specific) ?
> 
> It's quite easy to use nvram-stored variables from OpenFirmware, and on
> linux site 'nvsetenv' tool would need to be extended to be able to
> create new variables (only when used with --create flag).
> I had to write some patch for nvsetenv, because I need such funcionality
> but I wrote really simple perl script instead.

I'm certainly open to that sort of approach, though I don't know much
about how this would work, nor its portability across ppc platforms.

The key requirements are that a flag has to be set in userspace, and the
flag has to be read and _unset_ in bootloader-space.  The later is the
part that's proving to be a kicker at the moment.

I would be quite interested to see anyone with any sort of 'Hello World'
type patch demonstrating Yaboot writing/clearing data to/from disk.


:-Dustin




More information about the Yaboot-devel mailing list