From: Wolfgang Denk Date: Sun, 20 Mar 2005 17:17:26 +0100 Subject: [U-Boot-Users] Re: loading MAC address into hardware In-Reply-To: Your message of "Sat, 19 Mar 2005 02:15:11 GMT." Message-ID: <20050320161731.3AA08C1510@atlas.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In message 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). > 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 -- 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