partition@800000 {
label = "ubi";
reg = <0x800000 0x6400000>;
+
+ volumes {
+ ubi-volume-ubootenv {
+ volname = "ubootenv";
+
+ nvmem-layout {
+ compatible = "u-boot,env-redundant-bool";
+
+ macaddr_uboot_ethaddr: ethaddr {
+ #nvmem-cell-cells = <1>;
+ };
+ };
+ };
+ };
};
partition@6C00000 {
ubi_rootdisk: ubi-volume-fit {
volname = "fit";
};
+
+ ubi-volume-ubootenv {
+ volname = "ubootenv";
+
+ nvmem-layout {
+ compatible = "u-boot,env-redundant-bool";
+
+ macaddr_uboot_ethaddr: ethaddr {
+ #nvmem-cell-cells = <1>;
+ };
+ };
+ };
};
};
};
reg = <0>;
phy-mode = "2500base-x";
+ nvmem-cells = <&macaddr_uboot_ethaddr 1>;
+ nvmem-cell-names = "mac-address";
+
fixed-link {
speed = <2500>;
full-duplex;
reg = <1>;
phy-mode = "2500base-x";
phy-handle = <&phy6>;
+
+ nvmem-cells = <&macaddr_uboot_ethaddr 0>;
+ nvmem-cell-names = "mac-address";
};
mdio-bus {
ip link set dev game address "$lan_mac"
ip link set dev eth1 address "$wan_mac"
;;
- acer,predator-w6x-stock|\
- acer,predator-w6x-ubootmod)
- wan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
- lan_mac=$(macaddr_add "$wan_mac" 1)
- ip link set dev lan1 address "$lan_mac"
- ip link set dev lan2 address "$lan_mac"
- ip link set dev lan3 address "$lan_mac"
- ip link set dev lan4 address "$lan_mac"
- ip link set dev eth1 address "$wan_mac"
- ;;
acer,vero-w6m)
wan_mac=$(mmc_get_mac_ascii u-boot-env WANMAC)
lan_mac=$(mmc_get_mac_ascii u-boot-env LANMAC)