mediatek: bug fixes for abt asr3000 ubootmod

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen
2024-07-06 15:45:52 +08:00
parent 1311befc45
commit c7f4b77279
2 changed files with 9 additions and 7 deletions

View File

@@ -17,8 +17,8 @@
led-boot = &mesh_led;
led-failsafe = &mesh_led;
led-upgrade = &mesh_led;
serial0 = &uart0;
label-mac-device = &gmac1;
serial0 = &uart0;
};
chosen {
@@ -42,7 +42,7 @@
label = "mesh";
linux,code = <BTN_9>;
linux,input-type = <EV_SW>;
gpios = <&pio 0 GPIO_ACTIVE_HIGH>;
gpios = <&pio 0 GPIO_ACTIVE_LOW>;
};
};
@@ -150,7 +150,6 @@
partition@0 {
label = "BL2";
reg = <0x00000 0x100000>;
read-only;
};
partition@100000 {
@@ -180,6 +179,7 @@
factory: partition@280000 {
label = "Factory";
reg = <0x280000 0x100000>;
read-only;
};
partition@380000 {
@@ -202,7 +202,7 @@
port@0 {
reg = <0>;
label = "lan1";
label = "lan3";
};
port@1 {
@@ -212,7 +212,7 @@
port@2 {
reg = <2>;
label = "lan3";
label = "lan1";
};
port@6 {

View File

@@ -11,9 +11,11 @@ board=$(board_name)
case "$board" in
abt,asr3000-ubootmod)
addr=$(get_mac_label)
# Originally, phy1 is phy0 mac with LA bit set. However, this would conflict
# addresses on multiple VIFs with the other radio. Use label mac to set LA bit.
addr=$(cat /sys/class/net/eth1/address)
[ "$PHYNBR" = "0" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress
[ "$PHYNBR" = "1" ] && macaddr_setbit_la $(macaddr_add $addr 1) > /sys${DEVPATH}/macaddress
[ "$PHYNBR" = "1" ] && macaddr_setbit_la $addr > /sys${DEVPATH}/macaddress
;;
acer,predator-w6)
key_path="/var/qcidata/data"