Utility to Sync BMC's UUID to U-Boot environment

Joel Stanley joel at jms.id.au
Tue Dec 4 09:11:22 AEDT 2018


On Fri, 30 Nov 2018 at 16:49, Nagaraju Goruganti <ngorugan at in.ibm.com> wrote:
>
> Hi All,
>
> We are planning to port UUID synching related code from current python script: openbmc/skeleton/pyinventorymgr/sync_inventory_items.pyto new bash script.
>
> The current py(invoked by systemd on the way to BMC ready state) is doing below given actions to sync BMC's UUID to U-Boot environment.
> 1. Getting the UUID from inventory.
> 2. Getting the UUID from U-boot environment
> 3. If the both are differing, write the UUID form inventory to U-Boot environment.
> 4. It also it has TODO task to reboot the BMC to make sure UUID from U-Boot env to  sync with /etc/machine-id.
>
> But this script is in broken state now: It is not updating UUID in U-boot env by reading it from inventory.
>
> We have few things to understand here:
> 1. Is there a need to write UUID to U-Boot environment?

I think that using the u-boot environment as a datastore is a design
that should be avoided. As the name says, it's an environment for
u-boot to store configuration, and by using it as a store for
non-uboot related settings, we risk the system bricking due to
non-boot related changes.

Additionally, by baking in the u-boot environment as a required
element of the system we cannot support boards that don't use u-boot,
or that don't have a modifiable environment.

I think the most obvious place for this data is BMC's non-volatile
storage (the same way we store other settings, eg in /etc). If that is
not workable then I think that a UUID would make more sense in a VPD
EEPROM.

Cheers,

Joel

> 2. Can machine-id be the source for UUID? or UUID is the source for machine-id?
> 3. If UUID (from inventory) is the source for machine-id, from where should the inventory get UUID? (on openpower systems the UUID is fetched from BMC  VPD, if present)
> 4. If machine-id is the source to UUID, how machine-id is getting its value?
>
> We need an inputs from community members who are having better understand on these things.
>
> Best Regards,
> Nagaraju G


More information about the openbmc mailing list