The vendor U-Boot on the Cudy M3000 and the Yuncore AX835 assign random
mac addresses on boot and set the 'local-mac-address' property which
prevents Openwrt from assigning the correct address from evmem.
This patch removes the alias for ethernet0 so that U-Boot doesn't add the
property, removes the workaround from 02_network, and adds back the nvmem
definition for the M3000.
Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
(cherry picked from commit
a55ab9e1343e85021253e9c55f67adf33ad68f09)
compatible = "cudy,m3000-v1", "mediatek,mt7981-spim-snand-rfb";
aliases {
- ethernet0 = &gmac0;
label-mac-device = &gmac0;
led-boot = &led_status;
led-failsafe = &led_status;
phy-mode = "2500base-x";
phy-handle = <&rtl8221b_phy>;
- /* the MAC address assignment using nvmem-cells doesn't work, so it's done through 02_network */
+ nvmem-cell-names = "mac-address";
+ nvmem-cells = <&macaddr_bdinfo_de00 1>;
};
gmac1: mac@1 {
;;
esac
;;
- cudy,m3000-v1)
- wan_mac=$(macaddr_add $(cat /sys/class/net/eth1/address) 1)
- ;;
glinet,gl-mt6000)
label_mac=$(mmc_get_mac_binary factory 0x0a)
wan_mac=$label_mac