[fedora-arm] Each boot on my Cubietruck, and different MACaddr
Andy Green
andy at warmcat.com
Tue Sep 9 01:53:43 UTC 2014
On 9 September 2014 06:40:54 GMT+08:00, Robert Moskowitz <rgm at htt-consult.com> wrote:
>I do not have this behaviour on the Cubieboard2, just on my Cubietruck.
>
>I thought it was a problem with the F21 build, but today I am working
>with F19 remix:
>
>http://docs.cubieboard.org/tutorials/cb2/installation/cb2_fedora_19_card_install
>
>And I keep getting a different MACaddr. This makes it really hard to
>use persistant.rules to control things based on MACaddr.
>
>Is this just my particular Cubietruck? I remember Hans talking about
>since there is no eeprom, he has to use SID as the basis for the
>MACaddr.
>
>Is there anyway for me to set the MACaddr. It is eating up all my dhcp
>
>addresses.
There are rules for what constitutes a valid mac address, if yours in invalid the kernel driver will assign you a random one, and then it looks like a new machine every time.
You can force the mac address in userland /etc/rc.d/rc.local using /sbin/nameif + /etc/mactab, it's dirty but it will get you out of the hole if it runs before the dhclient action poisons your dhcp server.
If the network driver uses phylib, there is a generic Device Tree name you can use like this inside the ethernet stanza to force it
local-mac-address = [ aa bb cc dd ee ff ];
if so, you can think about adding / overriding that DT node in U-Boot before passing to kernel.
I sent patches on lkml to improve this a couple of years ago (for Panda, which has no nonvolatile config onboard) by replacing an invalid MAC with computing a consistent per-board MAC from CPU serial ID but The Powers That Be felt it should be fixed by the distros... which as you see...
-Andy
>_______________________________________________
>arm mailing list
>arm at lists.fedoraproject.org
>https://admin.fedoraproject.org/mailman/listinfo/arm
More information about the arm
mailing list