From: York Sun <york.sun@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCHv5 00/21] Retrieve MAC address from EEPROM
Date: Mon, 10 Apr 2017 08:52:26 -0700 [thread overview]
Message-ID: <bbed4f05-79f6-5c30-e58d-770b69a22438@nxp.com> (raw)
In-Reply-To: <20170410153356.2664-1-oliver@schinagl.nl>
On 04/10/2017 08:34 AM, Olliver Schinagl wrote:
> First off:
> P.S. Joe, for some reason my previous patches where added with me as:
> "oliver at schinagl.nl <oliver@schinagl.nl>" I see that it comes from patchwork
> as such. Is there some way to fix this to
> "Olliver Schinagl <oliver@schinagl.nl>"?
>
> Below the updated summary:
>
> This patch-series introduces methods to retrieve the MAC address from an
> onboard EEPROM. The series does a few small cleanups at the start, as either
> I ran into them while doing this series and fixed them along the way or
> actually depended on them.
>
> A manufacturer wants to produce boards and may even have MAC addresses for
> boards. Maintaining unique environments on a per-board basis however is
> horrible. Also this data should be very persistent, and not easily deletable
> by simply wiping the environment or device tree. Finally there are
> chips available on the market with a pre-programmed MAC address chips
> (proms)
> that a board manufacturer wants to use. Because of this, the MAC needs to be
> stored be able to read from such an 'external' source.
>
> 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
> macaddress.
>
> 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.
Interesting solution. We have used EEPROM to store board ID, version
number, MAC addresses on many of our boards. We have a command "mac" to
read/write these addresses. Would you take a look to see if it is
possible to integrate?
York
next prev parent reply other threads:[~2017-04-10 15:52 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-10 15:33 [U-Boot] [PATCHv5 00/21] Retrieve MAC address from EEPROM Olliver Schinagl
2017-04-10 15:33 ` [U-Boot] [PATCHv2 01/21] net: cosmetic: Do not use magic values for ARP_HLEN Olliver Schinagl
2017-04-13 21:16 ` Simon Glass
2017-05-30 20:32 ` Joe Hershberger
2017-04-10 15:33 ` [U-Boot] [PATCHv2 02/21] net: core: Sanitize get/set operations for enetaddr Olliver Schinagl
2017-04-13 21:16 ` Simon Glass
2017-04-10 15:33 ` [U-Boot] [PATCHv2 03/21] net: core: Inform the user of the device MAC address Olliver Schinagl
2017-04-15 23:39 ` Simon Glass
2017-04-10 15:33 ` [U-Boot] [PATCHv2 04/21] net: core: Add function to check/set MAC locality Olliver Schinagl
2017-04-11 13:49 ` Olliver Schinagl
2017-04-10 15:33 ` [U-Boot] [PATCHv2 05/21] net: Add ability to set MAC address via EEPROM Olliver Schinagl
2017-04-10 15:33 ` [U-Boot] [PATCHv2 06/21] net: core: print the source of the MAC address Olliver Schinagl
2017-04-10 15:33 ` [U-Boot] [PATCHv2 07/21] net: cosmetic: A MAC address is not limited to SROM Olliver Schinagl
2017-04-10 15:33 ` [U-Boot] [PATCHv2 08/21] fdt: fixup_eth: Remove code duplication with a function Olliver Schinagl
2017-04-10 15:33 ` [U-Boot] [PATCHv2 09/21] fdt: fixup_eth: improve error catching/reduce identation Olliver Schinagl
2017-04-10 15:33 ` [U-Boot] [PATCHv2 10/21] net: sunxi: Enable I2C bus set via NET_ETHADDR_EEPROM_I2C_BUS Olliver Schinagl
2017-04-10 15:33 ` [U-Boot] [PATCHv2 11/21] net: sunxi_[eg]mac: Convert to Kconfig Olliver Schinagl
2017-04-10 15:33 ` [U-Boot] [PATCHv2 12/21] arm: sunxi: Expose function to generate sunxi-specific a MAC address Olliver Schinagl
2017-04-10 15:33 ` [U-Boot] [PATCHv2 13/21] net: sunxi_emac: Write HW address via net_ops hook Olliver Schinagl
2017-04-10 15:33 ` [U-Boot] [PATCHv2 14/21] net: sunxi: Have sunxi common functions together Olliver Schinagl
2017-04-10 15:33 ` [U-Boot] [PATCHv2 15/21] net: sunxi_emac: Add read_rom_hwaddr hook Olliver Schinagl
2017-04-10 15:33 ` [U-Boot] [PATCHv2 16/21] net: sunxi_gmac: Make the sunxi variant of dw driver a subclass Olliver Schinagl
2017-04-10 15:33 ` [U-Boot] [PATCHv2 17/21] net: dw: Expose designware_eth_start Olliver Schinagl
2017-04-10 15:33 ` [U-Boot] [PATCHv2 18/21] net: sunxi_gmac: Add read_rom_hwaddr hook Olliver Schinagl
2017-04-10 15:33 ` [U-Boot] [PATCHv2 19/21] net: sun8i_gmac: " Olliver Schinagl
2017-04-10 15:33 ` [U-Boot] [PATCHv2 20/21] net: sun8i: fix whitespace Olliver Schinagl
2017-04-10 15:33 ` [U-Boot] [PATCHv2 21/21] net: core: Check return value of read_rom_hwaddr Olliver Schinagl
2017-04-10 15:52 ` York Sun [this message]
2017-04-10 15:57 ` [U-Boot] [PATCHv5 00/21] Retrieve MAC address from EEPROM Olliver Schinagl
2017-04-10 16:23 ` York Sun
2017-04-11 14:38 ` o.schinagl at ultimaker.com
2017-04-11 15:32 ` York Sun
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=bbed4f05-79f6-5c30-e58d-770b69a22438@nxp.com \
--to=york.sun@nxp.com \
--cc=u-boot@lists.denx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox