loading MAC address into hardware
I am trying to boot Linux from flash, but the problem is that the MAC address never gets initialized before starting Linux. Is there a way to instruct u-boot to load the MAC address into the hardware before starting Linux?
Quoted 4 lines · David Peters
I am trying to boot Linux from flash, but the problem is that the MAC address never gets initialized before starting Linux. Is there a way to instruct u-boot to load the MAC address into the hardware before starting Linux?
Yes.
http://www.denx.de/twiki/bin/view/DULG/UBootCmdGroupEnvironment
http://www.denx.de/twiki/bin/view/DULG/UBootEnvVariables
* ethaddr: Ethernet MAC address for first/only ethernet interface
(= eth0 in Linux).
This variable can be set only once (usually during manufacturing
of the board). U-Boot refuses to delete or overwrite this variable once it has been set.
* eth1addr: Ethernet MAC address for second ethernet interface (=
eth1 in Linux).
* eth2addr: Ethernet MAC address for third ethernet interface (=
eth2 in Linux).
Some assembly may be required: we don't know _your_ board, _you_ may have to implement the routine that actually stores the MAC in your hardware.
gvb
I understand how to set the ethaddr. I need the ethaddr loaded into the emac on the cpu. I'm using an at91rm9200 if that helps at all.
-----Original Message-----
From: [email protected] [mailto:u-boot-users-admin at lists.sourceforge.net] On Behalf Of Jerry Van Baren
Sent: Friday, March 04, 2005 11:38 AM
To: Linux U-Boot Users List
Subject: Re: [U-Boot-Users] loading MAC address into hardware
Quoted 4 lines · David Peters
I am trying to boot Linux from flash, but the problem is that the MAC address never gets initialized before starting Linux. Is there a way to instruct u-boot to load the MAC address into the hardware before starting Linux?
Yes.
http://www.denx.de/twiki/bin/view/DULG/UBootCmdGroupEnvironment
http://www.denx.de/twiki/bin/view/DULG/UBootEnvVariables
* ethaddr: Ethernet MAC address for first/only ethernet interface
(= eth0 in Linux).
This variable can be set only once (usually during manufacturing
of the board). U-Boot refuses to delete or overwrite this variable once it has been set.
* eth1addr: Ethernet MAC address for second ethernet interface (=
eth1 in Linux).
* eth2addr: Ethernet MAC address for third ethernet interface (=
eth2 in Linux).
Some assembly may be required: we don't know _your_ board, _you_ may have to implement the routine that actually stores the MAC in your hardware.
gvb
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users
Quoted 2 lines · In message <[email protected]> you wrote:
I understand how to set the ethaddr. I need the ethaddr loaded into the emac on the cpu. I'm using an at91rm9200 if that helps at all.
You may want to read the other FAQ's, too. Like this one:
http://www.denx.de/twiki/bin/view/DULG/EthernetDoesNotWorkInLinux
Best regards,
Wolfgang Denk
Signature · 4 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Nothing is easier than to denounce the evildoer; nothing is more difficult than to understand him. - Fyodor Dostoevski
Quoted 7 lines · Wolfgang Denk <wd <at> denx.de> writes:
Quoted 2 lines · In message <3rr5v6$5tg7h8 <at> mxip23a.cluster1.charter.net> you wrote:
I understand how to set the ethaddr. I need the ethaddr loaded into the emac on the cpu. I'm using an at91rm9200 if that helps at all.
You may want to read the other FAQ's, too. Like this one:
http://www.denx.de/twiki/bin/view/DULG/EthernetDoesNotWorkInLinux
Wolfgang,
I think we all understand that the bootloader does not set mac address if no network operations have been requested, e.g. if we boot from a local flash and not from a network. Now, what the question probably was:
"I stored my mac address in u-boot environmental variable. Now I need somehow set it in hardware. Is there a way to force u-boot to do it for me even though it does not use network for its own needs? If that is not possible then what is the best way to pass mac address to linux. I suppose then I can use ifconfig to set it"
I am in the same boat.. Any suggestions?
Thanks,
Sergei Sharonov
Quoted 7 lines · In message <[email protected]> you wrote:
I think we all understand that the bootloader does not set mac address if no network operations have been requested, e.g. if we boot from a local flash and not from a network. Now, what the question probably was:
"I stored my mac address in u-boot environmental variable. Now I need somehow set it in hardware. Is there a way to force u-boot to do it for me even though it does not use network for its own needs? If that is not possible then what
Technically it's trivial to do this. But it would be wrong to do it from the design, as there is no need for it (the Linux driver is
responsible itself for sufficiently complete hardware
initialization).
Quoted 2 lines
is the best way to pass mac address to linux. I suppose then I can use ifconfig to set it"
Yes, you can use ifconfig to set the MAC address, or you can fix your ethernet driver in Linux to initialize the hardware as needed.
There are many ways to pass the MAC address: on current PowerPC systems it's part of the bd_infor structure; or you can pass it as part of the boot arguments like some MIPS board do, or you can implement bi-recs and use a bi_record for the MAC address, or ...
Or you can use the existing tools to read the environment under Linux or ...
TIMTOWTDI.
Best regards,
Wolfgang Denk
Signature · 4 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "If you can, help others. If you can't, at least don't hurt others." - the Dalai Lama