Static component to generate unique hw-identifier

Hi,

I have a bunch of Rockchip R2S devices which I would like to generate static identifiers for that stick to a given device. I did use the MAC-Address in the past but for the R2S this can't be used anymore. Are there any other components you could think of that are unique to a device and can be queried through openwrt?

Thanks a lot for any ideas.
Cheers,
Mischa

Most SoCs have a unique ID fused/written into the chip by the manufacturer during production. You may be able to access this from within Linux as follows:

cat /sys/bus/soc/devices/soc0/soc_id

1 Like

Thanks for your fast reply and idea. The SoC in my case is a Rockchip RK3328 (https://wiki.friendlyarm.com/wiki/index.php/NanoPi_R2S) and looking around within /sys/bus I can't identify any such ID.

Yeah, sorry. I don't have any rockchip experience but this should really be quite generic. Maybe we are just missing some upstream patches:

https://lkml.org/lkml/2020/4/2/342

In this commit: https://github.com/openwrt/openwrt/commit/a8a17fd22326f0d1aa7644556eea6010e0779afe

@blocktrron states:
There is however a semi-unique identifier available to us, which is the
CID of the used SD card. It is unique to each SD card, hence we can use
it to generate the MAC address used for LAN and WAN.

I guess if there were any other more "sticking" UID it would have been chosen instead?