Forum Discussion
Altera_Forum
Honored Contributor
13 years ago --- Quote Start --- Where is the board serial number coming from? You'll have the same issue with that as a MAC, i.e., either can get erased. --- Quote End --- The serial is coming from the motherboard of the host PC. You can get one through the DMI sub-system of the Linux kernel, for example:
# include <linux/dmi.h>
static int get_board_serial(u64 *dst)
{
const char *s;
s = dmi_get_system_info(DMI_BOARD_SERIAL);
if (!s)
return -1;
if (kstrtou64(s, 10, dst))
return -1;
return 0;
}
This should make the unique, consistent MAC address (I don't like the idea of a random one!). I am also planning to provide a way to change it through ethtool.