[OpenBIOS] Overriding default config with nvram?

Blue Swirl blauwirbel at gmail.com
Sun Apr 29 13:55:31 CEST 2007


Hi,

I'm adding support for nvram variables to Qemu (see attached patches), like:
qemu-system-sparc -prom-env "boot-device=zorg"

But this only works if the variable does not have any default value in
nvram.fs. I'd like to change this so that the nvram values override
defaults, but how?

For example:
qemu-system-sparc -boot n -prom-env "boot-device=foobar" -prom-env
"boot-device-foobar=foobar" -nographic -monitor stdio -hda /dev/null
Nvram id QEMU_BIOS, version 1, machine id 0x80
CPUs: 1
Welcome to OpenBIOS v1.0RC1 built on Apr 29 2007 07:39
  Type 'help' for detailed information

[sparc] Booting file 'net' without parameters.

0 > printenv
name                      "options"
boot-from                 "disk"
boot-device               "disk"
boot-device-foobar        "foobar"
boot-args                 ""
[cut]

Here boot-device is overridden to "disk" somewhere later but
boot-device-foobar survives.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nvram_vars.diff
Type: text/x-patch
Size: 7168 bytes
Desc: not available
Url : http://lists.openbios.org/pipermail/openbios/attachments/20070429/52a10099/attachment.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: prom_envs.diff
Type: text/x-patch
Size: 7168 bytes
Desc: not available
Url : http://lists.openbios.org/pipermail/openbios/attachments/20070429/52a10099/attachment-0001.diff 


More information about the OpenBIOS mailing list