On Wed, Feb 13, 2019 at 7:01 AM Bin Meng <bmeng...@gmail.com> wrote: > > On Tue, Feb 12, 2019 at 6:23 PM Andreas Schwab <sch...@suse.de> wrote: > > > > On Feb 12 2019, Bin Meng <bmeng...@gmail.com> wrote: > > > > > The env var is stored in whatever supported media in U-Boot. Not like > > > PCI NICs which normally have EEPROM to store pre-flashed MAC address > > > by their vendors, for most embedded network controllers in the SoC, > > > normally there is no hardware provided mechanism to ensure a unique > > > MAC address, instead it relies on software to program one to the > > > hardware before bringing it up. > > > > On the Hifive the MAC is part of the initial DT, so there is no need to > > use a secondary store. > > > > So for the HiFive board, who is supposed to guarantee the uniqueness > of the MAC address? Does SiFive program DT with different MAC to every > board they shipped? If so, we can just read "local-mac-address" from > DT in U-Boot.
General practice (atlease what I have seen on few boards), is that board will have unique MAC address printed/labelled for each Ethernet port. We can just set-and-save "ethaddr" U-Boot env variable based on MAC address printed on board. Unfortunately, I was not able to find printed MAC address on Unleashed board. Regards, Anup _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot