All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joel Stanley <joel@jms.id.au>
To: Patrick Rudolph <patrick.rudolph@9elements.com>
Cc: OpenBMC Maillist <openbmc@lists.ozlabs.org>
Subject: Re: Aspeed platforms: MAC address provisioning
Date: Tue, 10 May 2022 01:28:52 +0000	[thread overview]
Message-ID: <CACPK8XdU5C-_TdFDDxobOL4-jkwPZsjHts5hv2Jx2r1n3PuY6w@mail.gmail.com> (raw)
In-Reply-To: <CALNFmy39ph1pQoVavHZbdTCACLMxf38f86WKH-CbPbrHDoomNg@mail.gmail.com>

On Fri, 6 May 2022 at 06:04, Patrick Rudolph
<patrick.rudolph@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

      reply	other threads:[~2022-05-10  1:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-06  6:04 Aspeed platforms: MAC address provisioning Patrick Rudolph
2022-05-10  1:28 ` Joel Stanley [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACPK8XdU5C-_TdFDDxobOL4-jkwPZsjHts5hv2Jx2r1n3PuY6w@mail.gmail.com \
    --to=joel@jms.id.au \
    --cc=openbmc@lists.ozlabs.org \
    --cc=patrick.rudolph@9elements.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.