Hi,
I am working on changes to add a new Sonic platform.
I am trying to follow the guidelines set forth by the Platform API 2.0 as I understand it
Initially I have code working to provide access to the ONIE syseeprom.
My specific question is about how the ONIE "Base MAC Address" field within the ONIE syseeprom is treated by Sonic.
The HW platform in question was delivered with a base MAC address correctly programmed in the ONIE syseeprom.
Note that in my case the HW platform CPU SOC includes an embedded Ethernet Controller having its own dedicated eeprom.
The MAC address programmed within this internal eeprom has not been programmed - hence all instances have same default MAC address.
My thinking was that somewhere within Sonic init I would find logic that ensures that the eth0 interface is configured with the base MAC address from the ONIE syseeprom. Perhaps by customizing /etc/network/interfaces? I do see logic that reads the ONIE syseeprom base MAC address and stores that away within the Config DB DEVICE_METADATA section. But running 'ifconfig eth0' from the Sonic CLI shows that the MAC address is set to the default address within the Ethernet Controller eeprom.
So I'm wondering if there is an established convention for setting the eth0 MAC address?
I can generate an ONIE image to set the eth0 MAC address in the Ethernet Controller eeprom if preferred.
Alternatively I could use ethtool to set that value during platform initialization.
Suggestions welcome.
Best,
Dennis
P.S. Is there a formal Spec. or user guide for the Platform 2.0 API?
The Porting Guide still talks about the earlier version of the API.