Hi Olliver, On 15 May 2017 at 18:02, Olliver Schinagl <oli...@schinagl.nl> wrote: > This patch allows Kconfig to enable and set parameters to make it > possible to read the MAC address from an EEPROM. The net core layer then > uses this information to read MAC addresses from this EEPROM. > > Besides the various tuneables as to how to access the eeprom (bus, > address, addressing mode/length, 2 configurable that are EEPROM generic > (e.g. SPI or some other form of access) which are: > > NET_ETHADDR_EEPROM_OFFSET, indicating where in the EEPROM the start of > the MAC address is. The default is 8 allowing for 8 bytes before the MAC > for other purposes (header MAGIC for example).
Note that Olimex has started to write their own data to the EEPROM for their A20 boards: https://github.com/OLIMEX/OLINUXINO/blob/master/SOFTWARE/A20/A20-eeprom-contents/Olimex-A20-EEPROM-september-2017.pdf > > NET_ETHADDR_EEPROM_CRC8, indicating the MAC is appended with a CRC8-CCIT > checksum that should be verified. > > Currently only I2C eeproms have been tested and thus only those options > are available, but shouldn't be a limit. NET_ETHADDR_EEPROM_SPI can be > just as created and added. > > The code currently first checks if there is a non-zero MAC address in > the eeprom. If that fails to be the case, the read_rom_hwaddr can be > used by a board to supply the MAC in other ways. > > If both these fails, the other code is still in place to query the > environent, which then can be used to override the hardware supplied > data. > > Signed-off-by: Olliver Schinagl <oli...@schinagl.nl> Regards, Jonathan -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.