I have an Intel NIC attached to the PCI slot. u-boot is complaining about a MAC mismatch on every boot. Normally I wouldn’t care, but it is slowing down boot time by a couple of seconds. There appear to be various ethXaddr environment variables in the u-boot stored environment, which are probably the cause of this problem.
Sorry, I should have checked before posting. Deleting the environment variable doesn’t help, as it comes back after reboot. I assume these get populated by the firmware.
So how do you get rid of the check/change the MAC?
The env variable should not have anything to do with an add on PCIe card. Regardless if you remove the env environment you also need to save your env or else the variable will be set on the next reboot.
Yes, I know the environment needs to be saved. Just tried one more time to make sure, also adding another variable to ensure that the environment was saved properly:
Net: eth0: DPMAC3@xgmii, eth1: DPMAC4@xgmii, eth2: DPMAC5@xgmii, eth3: DPMAC6@xgmii, eth4: DPMAC7@xgmii, eth5: DPMAC8@xgmii, eth6: DPMAC9@xgmii, eth7: DPMAC10@xgmii, eth8: DPMAC17@rgmii-id [PRIME]e1000: 68:05:ca:93:67:59
Warning: e1000#0 MAC addresses don't match:
Address in ROM is 68:05:ca:93:67:59
Address in environment is d0:63:b4:03:db:8f
, eth9: e1000#0
MMC read: dev # 0, block # 20480, count 4608 ... 4608 blocks read: OK
MMC read: dev # 0, block # 28672, count 2048 ... 2048 blocks read: OK
crc32+
fsl-mc: Booting Management Complex ... SUCCESS
fsl-mc: Management Complex booted (version: 10.28.1, boot status: 0x1)
Hit any key to stop autoboot: 0
=> env print eth9addr
eth9addr=D0:63:B4:03:DB:8F
=> env delete eth9addr
=> env print eth9addr
## Error: "eth9addr" not defined
=> env set was_i_saved yes
=> env print was_i_saved
was_i_saved=yes
=> env save
Saving Environment to MMC... Writing to MMC(0)... OK
Looks like these entries get added by u-boot’s fdt_fixup_ethernet(), based on the FDT’s ethernet nodes. For the Honeycomb there are 18 of those under fsl-mc@80c000000.
I have no idea where the MACs come from, though, nor why u-boot thinks that #9 should match the PCI NIC.
Sorry, my mistake. fdt_fixup_ethernet() just reads these values. They are set by mac_read_from_eeprom(), and only if the environment variable is not already set. So a simple fix is to just add eth9addr with the desired MAC address.