Hi, On 09/09/2014 11:57 AM, Peter Robinson wrote: > Hi Hans, > >>> On 9 September 2014 06:40:54 GMT+08:00, Robert Moskowitz <rgm@xxxxxxxxxxxxxxx> 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... >> >> This has been solved in u-boot in the mean time, u-boot now a days calculates a unique mac >> derived from the CPU serial id, and passes this to the kernel. > > Is this just on sunxi based devices or on all devices that have > ethernet without MAC addresses? This is done by soc specific code, I know that there is similar code in u-boot now a days to set the MAC address on some usb attached nics on panda-boards (iirc). But this is not done for all ethernet devices, since not all SOC-s have serial numbers, and even if they do, you need to know which bits of the serial number are random enough (e.g. on sunxi there are 128 bits, but some encode the soc model, so are rather non random). Regards, Hans _______________________________________________ arm mailing list arm@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/arm