nanopir6: change network interface names and add triggers for leds on edge kernel
same as ea17706f47
This commit is contained in:
parent
23be92c454
commit
d56478a471
@ -23,3 +23,15 @@ function post_family_tweaks__nanopir6s_naming_audios() {
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
function post_family_tweaks__nanopir6s_udev_network_interfaces() {
|
||||
display_alert "$BOARD" "Renaming interfaces WAN LAN1 LAN2" "info"
|
||||
|
||||
mkdir -p $SDCARD/etc/udev/rules.d/
|
||||
cat << EOF > "${SDCARD}/etc/udev/rules.d/70-persistent-net.rules"
|
||||
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", KERNELS=="fe1c0000.ethernet", NAME:="wan"
|
||||
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="r8169", KERNELS=="0003:31:00.0", NAME:="lan1"
|
||||
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="r8169", KERNELS=="0004:40:00.0", NAME:="lan2"
|
||||
EOF
|
||||
|
||||
}
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
};
|
||||
|
||||
&lan2_led {
|
||||
/delete-property/ linux,default-trigger;
|
||||
label = "user_led";
|
||||
};
|
||||
|
||||
|
||||
@ -35,6 +35,7 @@
|
||||
wan_led: led-1 {
|
||||
label = "wan_led";
|
||||
gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "r8169-3-3100:00:link";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wan_led_pin>;
|
||||
};
|
||||
@ -42,6 +43,7 @@
|
||||
lan1_led: led-2 {
|
||||
label = "lan1_led";
|
||||
gpios = <&gpio1 RK_PC3 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "r8169-4-4100:00:link";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&lan1_led_pin>;
|
||||
};
|
||||
@ -49,6 +51,7 @@
|
||||
lan2_led: led-3 {
|
||||
label = "lan2_led";
|
||||
gpios = <&gpio1 RK_PC4 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "stmmac-0:01:link";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&lan2_led_pin>;
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user