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

Dustin Kirkland dustin.kirkland at us.ibm.com
Wed Sep 27 07:25:27 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) ?

Ok, I'd like to attempt to do this in nvram, but I need some sample
code...

(a) Set the variable in userspace ybin
	- I think I can do that with
	# nvsetenv yaboot-bootonce "sometarget"

(b) Please, some sample code for reading that yaboot-bootonce nvram
variable from within yaboot's second stage

(c) Please, some sample code for clearing out that yaboot-bootonce nvram
variable from within yaboot's second stage


If someone could show me these two items (b) and (c), I'll rework the
patches and test.


Thanks,
:-Dustin




More information about the Yaboot-devel mailing list