Hi,
From the /var/log/kern.log it seems that the MAC address for the on-board LAN is set as a kernel parameter. However, it's not in /boot/config.txt.
We have our own OUI and would like to use it. I figure this kernel param is being set by the closed source broadcom code (start.elf or so). I see a few possibilities:
- Hack the Broadcom binaries (took a quick look in a hex editor and the kernel parameters were not obvious)
- Hack the smsc95x driver source and recompile
- Change the MAC address with a script in /etc/init.d (need to make sure this happens before any higher level networking initialization)
None of these seem particularly good.. does anyone have any other suggestions?
Re: Changing MAC address passed to kernel
That's probably your best option.rfi wrote:Hi,
- Change the MAC address with a script in /etc/init.d (need to make sure this happens before any higher level networking initialization)
But I'd do it in the /etc/network/interfaces file
pre-up ifconfig eth0 hw ether 00:00:00:00:00:00
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044
-
- Raspberry Pi Engineer & Forum Moderator
- Posts: 6062
- Joined: Wed Aug 17, 2011 7:41 pm
- Location: Cambridge
Re: Changing MAC address passed to kernel
If you include
smsc95xx.macaddr=B8:27:EB:59:EB:25
in your own cmdline.txt then start.elf won't set the default one.
smsc95xx.macaddr=B8:27:EB:59:EB:25
in your own cmdline.txt then start.elf won't set the default one.
Re: Changing MAC address passed to kernel
Learn something new every daydom wrote:If you include
smsc95xx.macaddr=B8:27:EB:59:EB:25
in your own cmdline.txt then start.elf won't set the default one.

Out of curiosity, is there any real use for doing that ?
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044
Re: Changing MAC address passed to kernel
Thanks for the replies - that's useful to know about the kernel parameter.
I was hoping to change just the vendor code and keep using the last three octets from the pi's serial number. It seems like that we could do that in our config script (which is already writing /etc/network/interfaces) using the pre-up option (I didn't know about that one). I guess that way the MAC address will be initialised before Linux sends any data including ARPs or DHCP requests?
Thanks for the help!
I was hoping to change just the vendor code and keep using the last three octets from the pi's serial number. It seems like that we could do that in our config script (which is already writing /etc/network/interfaces) using the pre-up option (I didn't know about that one). I guess that way the MAC address will be initialised before Linux sends any data including ARPs or DHCP requests?
Thanks for the help!