Aspeed platforms: MAC address provisioning

Joel Stanley joel at jms.id.au
Tue May 10 11:28:52 AEST 2022


On Fri, 6 May 2022 at 06:04, Patrick Rudolph
<patrick.rudolph at 9elements.com> wrote:
>
> Hi,
> I'm looking for the generic "OpenBMC way" of provisioning the BMC MAC
> address on platforms with an integrated NIC. In the past there has
> been the u-boot "u-boot-initial-env" target to create an environment,
> but it's no longer used on u-boot-common-aspeed-sdk_2019.04.

I wasn't aware of this. One option you have is to add this
functionality to the new SDK.

>
> What's the default/common/preferred way of provisioning an unique MAC
> address in production? Should it be stored in an I2C EEPROM or should
> the u-boot env be created from the running system?

Take a look at first-boot-set-mac.

AFAIK there's code that populates the Inventory with the MAC addresses
from the VPD.

There's another service, first-boot-set-mac, that reads the inventory
and configures the network service with the mac addresses. This
persists the mac address in the network configuration (eg
/etc/systemd/network/00-bmc-eth0.network) and optionally calls
fw_setenv to configure the u-boot environment:

 https://github.com/openbmc/phosphor-networkd/blob/master/src/ethernet_interface.cpp#L995

 https://github.com/openbmc/phosphor-networkd/blob/master/src/ethernet_interface.cpp#L1206

A design goal was to not have to read the I2C EEPROM and parse the VPD
in u-boot, hence doing it on first boot.

Cheers,

Joel


More information about the openbmc mailing list