Design proposal on removing /org/openbmc/settings/boot_policy"

vishwa vishwa at linux.vnet.ibm.com
Thu Aug 3 21:25:21 AEST 2017


This email is about the IPMI chassis command: Get-Boot-Options and 
Set-Boot-Options.

IPMI boot_flags could have one of these ["Network", "Disk", "Safe", 
"CDROM", "Setup", "Default"]

Original Settings implementation had any of the above values settable 
via "/org/openbmc/settings/host0:boot_flags"

There was another setting called "boot_policy" exported via 
"/org/openbmc/settings/host0:boot_policy" and the valid values were
[ONETIME, PERMANENT].

User would update "boot_flag" and "boot_policy" with the values and 
BMC-IPMID would supply these values when asked by Petitboot via 
Get-Boot-Options.

Petit boot would consume these and then if a setting was [ONETIME], then 
it would write boot_flag to [Default] via Set-Boot-Options IPMI command 
and IPMID would update /org/openbmc/settings/host0:boot_flags.

*Jeremy*, please help confirm.

As part of Settings refactoring, `boot_flags` was divided into 2 parts, 
still using "/org/openbmc/settings/host0:boot_policy"

*/xyz/openbmc_project/Control/Boot/Mode* : Catering to "Safe", "Setup" 
and "Regular", Where Regular meaning : 0

*/xyz/openbmc_project/Control/Boot/Source* : Catering to "Network", 
"Disk", "ExternalMedia". "Default", Where Default meaning : 0

Since IPMI could take any single value from either Mode or Source, IPMID 
code looked at Source first and if set, it used it and if not, it 
checked Mode and used if set. If none was set, it returned default as it 
used to do before.

Similiarly, as part of Set-Boot-Options, IPMID processed Source and then 
Mode and updated respective dbus objects.

Now, the proposal is to remove 
'"/org/openbmc/settings/host0:boot_policy"' and then put this as a 
boolean into 'persist' property into:

/xyz/openbmc_project/Control/Boot/Mode and 
/xyz/openbmc_project/Control/Boot/Source.

IPMID would then look at this new boolean to see if its ONETIME ( 
boolean : 0 ) or PERMANENT ( boolean : 1 ) and respond to Get-Boot-Options.

Similarly, for Set-Boot-Options, it would update 'persist' property 
depending on what is sent by Petit boot.

As part of persistency, Settings would save the data that gets written 
to /xyz/openbmc_project/Control/Boot/Mode and 
/xyz/openbmc_project/Control/Boot/Source D-Bus object.

Please provide your feedback on this.

Thank you.

!! Vishwa !!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20170803/2dfa312c/attachment.html>


More information about the openbmc mailing list