[U-Boot] [PATCHv4] Retrieve MAC address from EEPROM

Olliver Schinagl oliver at schinagl.nl
Mon Nov 28 11:45:49 CET 2016


On 28-11-16 10:13, Igor Grinberg wrote:
> Hi Olliver,
>
> On 11/25/16 17:30, Olliver Schinagl wrote:
>
> [...]
>
>> The current idea of the eeprom layout, is to skip the first 8 bytes, so that
>> other information can be stored there if needed, for example a header with some
>> magic to identify the EEPROM. Or equivalent purposes.
>>
>> After those 8 bytes the MAC address follows the first macaddress. The macaddress
>> is appended by a CRC8 byte and then padded to make for nice 8 bytes. Following
>> the first macaddress one can store a second, or a third etc etc mac address.
>>
>> The CRC8 is optional (via a define) but is strongly recommended to have. It
>> helps preventing user error and more importantly, checks if the bytes read are
>> actually a user inserted address. E.g. only writing 1 macaddress into the eeprom
>> but trying to consume 2.
> While reading the above, I'm wondering, have you considered the eeprom layout
> feature that we have in: common/eeprom/... ?
Last year, when starting this patch series, this did not really exist in 
so far (iirc).
>
> The layout feature was actually designed for these tasks, but in a more generic
> way then just Ethernet MAC address.
I did see it and I was quite excited. I think a follow up patch should 
switch over. I did not yet use the new eeprom layout thing as I am 
hoping for Maxime's patches to land first, where he makes the whole 
eeprom interfacing more generic.
>
> What do you think?
I'll have to look at the eeprom layout feature a little more in depth, 
the one thing that was a little 'annoying' (from a short quick glance) 
was that the layout was jumping around a bit (eth0, eth1, something 
else, eth2, eth3). But yes, I was quite intrigued herein.

Olliver


More information about the U-Boot mailing list