Skip to contentSkip to conversation

Where to Put Ethernet MAC Addresses?

DISCUSSION Kent Borg 4 participants 5 messages Oct 1, 2003 – Oct 3, 2003

lore
Share & tools
lore

Kent Borg

author
#0 lore raw

In boards where there is ethernet but no manufacturered in MAC address in the ethernet hardware, where does one get it? Does this become a userland problem to be handled in init scripts? It seems that ethernet initialization could also set the "manufacturer" MAC address, and it might be stored in flash next to the Linux image, or in some extra SPD bits, etc.

What are the various right ways to do this?

Thanks,

-kb

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 8 lines · Kent Borg

In boards where there is ethernet but no manufacturered in MAC address in the ethernet hardware, where does one get it? Does this become a userland problem to be handled in init scripts? It seems that ethernet initialization could also set the "manufacturer" MAC address, and it might be stored in flash next to the Linux image, or in some extra SPD bits, etc.

What are the various right ways to do this?

Most embedded devices will handle this in the boot ROM. When Linux is booted, the hardware address can be passed in along with other platform information like amount of memory installed, etc.

--
Gary Thomas <[email protected]>
MLB Associates

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#2 lore raw
In reply to Kent Borg
Quoted 8 lines · Kent Borg

In boards where there is ethernet but no manufacturered in MAC address in the ethernet hardware, where does one get it? Does this become a userland problem to be handled in init scripts? It seems that ethernet initialization could also set the "manufacturer" MAC address, and it might be stored in flash next to the Linux image, or in some extra SPD bits, etc.

What are the various right ways to do this?

Serial PROM.

Check if the ethernet part allows reading the MAC directly from a small serial PROM. Many board manufacturers have processes for programming serial proms for this type of thing.

Otherwise, just have the processor read the serial PROM and program it into the ethernet MAC.

-Bret

--
Bret Indrelee QLogic Corporation
[email protected] 6321 Bury Drive, St 13, Eden Prairie, MN 55346

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#3 lore raw
In reply to Kent Borg
Quoted 1 line · Kent Borg

What are the various right ways to do this?

As Gary mentioned, most are handled in some way by the boot rom. Many people put them in the boot rom flash (or rom if anyone uses that anymore), and on PowerPC we use the first level linux bootloader to recover this information and create some form of data record that is passed to the kernel driver for further initialization if necessary.

User 'init' scripts are usually too late, especially if you want to use tftp in the rom for debug, or dhcp discovery.

There isn't any standard way, sometimes in flash, sometimes in serial EEPROM along with other data. Sometimes the mac address is derived from the serial number. It all depends upon what you have available and how you may want to upgrade programmable devices with new software in the field (you normally don't want to be erasing mac addresses or serial numbers or such information as part of programming new boot rom code).

	-- Dan

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

author
#4 lore raw
In reply to Kent Borg
Quoted 1 line · Kent Borg

What are the various right ways to do this?

Thanks for the various answers.

-kb, the Kent who will be putting MAC adress setting off onto the boot ROM.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/