Coreboot - Populating /sys/class/dmi/id/product_uuid

Hi,

Recently, I tried to use my laptop at work, however, a script (which is not owned by me) to join the work network failed because it didn’t find the file “/sys/class/dmi/id/product_uuid”. Output of “dmidecode” for UUID also displays “Not settable”.

From some searching on the internet, I understand that this should come from the SMBIOS.
Is there any way that I can set this value by flashing/upgrading to the latest version of coreboot or some other method to tweak coreboot?

Thanks and regards,
Akshay

Hi,

Posting a possible solution in case it proves useful to someone else.

I got it to work by adding an implementation for the void smbios_mainboard_set_uuid(u8 *uuid) function to the coreboot/src/mainboard/purism/librem_skl/mainboard.c file as follows:

void smbios_mainboard_set_uuid(u8 *uuid)
{
    memcpy(uuid, "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", 16);
}

However, I would like to manage this in a CBFS file much in the same way that the “Serial Number” field is maintained right now, therefore, I’ll tinker with that next.

Thanks and regards,
Akshay

P.S. Since updating to coreboot 4.11 release, function void smbios_mainboard_set_uuid(u8 *uuid) has been renamed to void smbios_system_set_uuid(u8 *uuid)

1 Like

@kakaroto I would love your input here. Are there any plans to introduce setting of UUID in Purism’s coreboot install script? Can I help with it?

I don’t think kakaroto works at Purism anymore, but @MrChromebox is the Coreboot guy now

I’m not sure what we’d use this field for, but adding the facility to read a value from a file in CBFS and populate the table entry would be trivial

@MrChromebox Right, it will most probably only be used in corporate networks to identify machines joining the network like in my case, however, having to opt-in to set it will be great, especially if the effort is trivial.

One of the reasons I wanted to use this computer at work was to increase the awareness about the company. What better way of advertising than showing off a working product, right? Would be a shame not to be able to do that because of this problem.

well, I can do a custom build for you based on our current release, if a 1-off firmware that you flash yourself and add the serial/UUID will suffice. But if you’re looking for it to be part of an official release, and have a function to set the UUID via our script like you can the serial, then that’s a harder sell since there’s no internal use case for it

Why not just do some tricks and tweaks to that script, and hard code or give some fake numbers as that UUID ?

It makes no sense for a “script to join a network” to access firmware information.

Thanks @MrChromebox, however, if it is not going upstream, since I plan to flash coreboot on almost every release to get the latest fixes, I’ll myself try to keep a patch handy.

@yw662 Yes, the modification I’m using right now does hardcode the value, however, through changing the coreboot source code that the official script fetches and then changing the script itself to stop it from checking out the git tag again so that it doesn’t fail because of uncommitted changes to the git repo post-modification. It isn’t much effort for me to do this for my own builds, however, I also wanted to see if any other users have faced any problems because of the lack of this attribute for some other use cases.

Also, I mostly agree that there should be better ways to identify unique devices joining the network (which may take more effort to identify), however, I didn’t look into that much, as I don’t own the script and I can’t modify it. Also, as it works for every other machine on the network, the chances of requesting modification to it are zero.