From: "Guillaume Dargaud" <dargaud@lpsc.in2p3.fr>
To: <linuxppc-dev@ozlabs.org>
Subject: Changing Mac address
Date: Mon, 28 Jul 2008 16:25:54 +0200 [thread overview]
Message-ID: <106201c8f0bd$dda4f640$ad289e86@LPSC0173W> (raw)
Hello all,
there's something I miss here. I'd like to setup a MAC address in software
at the start of the boot process. I'm trying to figure out where this is
done in the kernel code.
I'm on a custom variant of a Xilinx ML405 card, still in PPC arch.
So it appears to be going in the arch/ppc/boot/simple/embed_config.c piece
of code, but since I don't have I2C, the only 'relevant' code is this one:
#if (!defined(CONFIG_XILINX_MLxxx) || !defined(XPAR_IIC_0_BASEADDR) ||
!defined(XPAR_PERSISTENT_0_IIC_0_BASEADDR))
int get_cfg_data(unsigned char **cfg_data) {
#warning I2C needed for obtaining the Ethernet MAC address. Using hard-coded
MAC address
return 0; /* no cfg data found */
}
Nonetheless, ifconfig (from busybox) gives me a proper MAC address
(00:0A:35:01:02:03) and can even change it:
ifconfig eth0 down hw ether 00:0A:35:01:02:10 up
But I want to do that before the network is up.
What is the relevant kernel section to change in order to set the MAC
address ?
Thanks.
--
Guillaume Dargaud
http://www.gdargaud.net/
next reply other threads:[~2008-07-28 14:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-28 14:25 Guillaume Dargaud [this message]
2008-07-28 16:24 ` Changing Mac address Grant Likely
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='106201c8f0bd$dda4f640$ad289e86@LPSC0173W' \
--to=dargaud@lpsc.in2p3.fr \
--cc=linuxppc-dev@ozlabs.org \
/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