[SLOF] [PATCH 1/2] envvar: Set properties in /options during "(set-defaults)"
Nikunj A Dadhania
nikunj at linux.vnet.ibm.com
Wed Oct 26 15:58:43 AEDT 2016
Thomas Huth <thuth at redhat.com> writes:
> The properties in /options are currently only populated from
> the NVRAM common partition or if the user explicitely sets and
> environment variable with "setenv". This causes two problems:
>
> 1) The properties in /options are not reset when the user runs
> the "set-defaults" Forth word, e.g. like this:
>
> setenv auto-boot? false
> dev /options
> printenv auto-boot?
> s" auto-boot?" get-node get-property drop type
> set-defaults
> printenv auto-boot?
> s" auto-boot?" get-node get-property drop type
>
> After the "set-defaults", the property in /options has the
> wrong value and is not in sync with the environment variable
> anymore.
>
> 2) If the common NVRAM partition is not containing all the
> required variables, SLOF currently also does not create
> default values in /options for the missing entries. This
> causes problems for example when we want to initialize the
> NVRAM from QEMU instead (to support the "-prom-env" parameter
> of QEMU). Boot loaders like grub2 depend on the availability
> of certain properties in the /options node and thus refuse
> to work if the NVRAM did not contain all the variables.
>
> To fix both issues, let's always populate the /options
> properties during "(set-default)" already.
>
> Signed-off-by: Thomas Huth <thuth at redhat.com>
Reviewed-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>
More information about the SLOF
mailing list