mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-03-14 23:09:45 +01:00
ramips: iptime,t5004: use nvmem for ubootenv
Userspace handling is deprecated. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://github.com/openwrt/openwrt/pull/14182 Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
parent
65f2b060a3
commit
8dd95cc6b5
2 changed files with 17 additions and 4 deletions
|
|
@ -55,6 +55,15 @@
|
|||
partition@80000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x80000 0xc0000>;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "u-boot,env";
|
||||
env-size = <0x1000>;
|
||||
|
||||
macaddr_uboot_ethaddr: ethaddr {
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@140000 {
|
||||
|
|
@ -85,10 +94,18 @@
|
|||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
nvmem-cells = <&macaddr_uboot_ethaddr 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
status = "okay";
|
||||
label = "wan";
|
||||
phy-handle = <ðphy0>;
|
||||
|
||||
nvmem-cells = <&macaddr_uboot_ethaddr 1>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
ðphy0 {
|
||||
|
|
|
|||
|
|
@ -274,10 +274,6 @@ ramips_setup_macs()
|
|||
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
|
||||
label_mac=$wan_mac
|
||||
;;
|
||||
iptime,t5004)
|
||||
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
|
||||
wan_mac=$(macaddr_add "$lan_mac" 1)
|
||||
;;
|
||||
jdcloud,re-sp-01b)
|
||||
lan_mac=$(mtd_get_mac_ascii config mac)
|
||||
wan_mac=$lan_mac
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue