nanopir5s: add friendly interface names in udev, add device tree overlay for front leds
This commit is contained in:
parent
ee565514c9
commit
ea17706f47
@ -17,6 +17,8 @@ BOOTPATCHDIR="v2023.10"
|
||||
BOOTCONFIG="nanopi-r5s-rk3568_defconfig"
|
||||
BOOTDIR="u-boot-${BOARD}" # do not share u-boot directory
|
||||
|
||||
DEFAULT_OVERLAYS="nanopi-r5s-leds"
|
||||
|
||||
# Newer blobs...
|
||||
RKBIN_GIT_URL="https://github.com/rpardini/armbian-rkbin.git"
|
||||
RKBIN_GIT_BRANCH="update-3568-blobs"
|
||||
@ -33,3 +35,14 @@ function add_host_dependencies__new_uboot_wants_python3() {
|
||||
declare -g EXTRA_BUILD_DEPS="${EXTRA_BUILD_DEPS} python3-pyelftools" # @TODO: convert to array later
|
||||
}
|
||||
|
||||
function post_family_tweaks__nanopir5s_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", KERNELS=="fe2a0000.ethernet", NAME:="wan"
|
||||
SUBSYSTEM=="net", ACTION=="add", KERNELS=="0000:01:00.0", NAME:="lan1"
|
||||
SUBSYSTEM=="net", ACTION=="add", KERNELS=="0001:01:00.0", NAME:="lan2"
|
||||
EOF
|
||||
|
||||
}
|
||||
|
||||
@ -8,7 +8,8 @@ dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
|
||||
rockchip-pwm2.dtbo \
|
||||
rockchip-pwm9.dtbo \
|
||||
rockchip-i2c0.dtbo \
|
||||
rockchip-i2c1.dtbo
|
||||
rockchip-i2c1.dtbo \
|
||||
rockchip-nanopi-r5s-leds.dtbo
|
||||
|
||||
scr-$(CONFIG_ARCH_ROCKCHIP) += \
|
||||
rockchip-fixup.scr
|
||||
|
||||
@ -0,0 +1,15 @@
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
|
||||
&{/gpio-leds/led-wan} {
|
||||
linux,default-trigger = "stmmac-0:01:link";
|
||||
};
|
||||
|
||||
&{/gpio-leds/led-lan1} {
|
||||
linux,default-trigger = "r8169-0-100:00:link";
|
||||
};
|
||||
|
||||
&{/gpio-leds/led-lan2} {
|
||||
linux,default-trigger = "r8169-1-100:00:link";
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user