From ce358dbe44cfd50b8f02775e1dc8073e447c8185 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 24 Sep 2022 22:24:27 +0200 Subject: [PATCH] v8.9 - NanoPi R5S | The Ethernet LEDs have been enabled. Many thanks to @3735943886 for providing the related sysfs triggers: https://github.com/MichaIng/DietPi/issues/5679 --- .build/images/dietpi-installer | 20 +++++++++++++++----- .update/patches | 19 +++++++++++++++++++ CHANGELOG.txt | 1 + 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/.build/images/dietpi-installer b/.build/images/dietpi-installer index 965d80e45f..1a454b14bc 100644 --- a/.build/images/dietpi-installer +++ b/.build/images/dietpi-installer @@ -988,11 +988,11 @@ _EOF_ G_EXEC rm "firmware-$variant.deb" # - NanoPi R5S - elif [[ $G_HW_MODEL == 76 && $(findmnt -Ufnro TARGET -T /boot) == '/' ]] - then - G_EXEC curl -sSfO 'https://dietpi.com/downloads/binaries/firmware-nanopi5.deb' - G_EXEC_OUTPUT=1 G_EXEC dpkg -i firmware-nanopi5.deb - G_EXEC rm firmware-nanopi5.deb + #elif [[ $G_HW_MODEL == 76 && $(findmnt -Ufnro TARGET -T /boot) == '/' ]] + #then + # G_EXEC curl -sSfO 'https://dietpi.com/downloads/binaries/firmware-nanopi5.deb' + # G_EXEC_OUTPUT=1 G_EXEC dpkg -i firmware-nanopi5.deb + # G_EXEC rm firmware-nanopi5.deb # - NanoPi M2/T2 Linux 4.4: Requires dedicated boot partition, starting at 4 MiB for U-Boot, with ext4 filesystem elif [[ $G_HW_MODEL == 61 && $(findmnt -Ufnro FSTYPE -M /boot) == 'ext4' ]] && (( $(sfdisk -qlo Start "$BOOT_DEVICE)" | mawk 'NR==2') >= 8192 )) @@ -1777,6 +1777,16 @@ _EOF_ # Enable second USB port by default local current=$(sed -n '/^[[:blank:]]*overlays=/{s/^[^=]*=//p;q}' /boot/armbianEnv.txt) [[ $current == *'usbhost2'* ]] || G_CONFIG_INJECT 'overlays=' "overlays=$current usbhost2" /boot/armbianEnv.txt + + # NanoPi R5S + elif (( $G_HW_MODEL == 76 )) + then + G_DIETPI-NOTIFY 2 'Enabling NanoPi R5S Ethernet LEDs' + cat << '_EOF_' > /etc/udev/rules.d/dietpi-nanopi5.rules +SUBSYSTEM=="leds", KERNEL=="wan_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth0", ATTR{link}="1" +SUBSYSTEM=="leds", KERNEL=="lan1_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth1", ATTR{link}="1" +SUBSYSTEM=="leds", KERNEL=="lan2_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth2", ATTR{link}="1" +_EOF_ fi # Armbian special diff --git a/.update/patches b/.update/patches index cb6098d7cb..bec270260d 100755 --- a/.update/patches +++ b/.update/patches @@ -839,6 +839,25 @@ Patch_8_9() grep -q '^[[:blank:]]*use-auth-secret' /etc/turnserver.conf && grep -q '^[[:blank:]]*lt-cred-mech' /etc/turnserver.conf && G_EXEC sed -i 's/^[[:blank:]]*lt-cred-mech/#lt-cred-mech/' /etc/turnserver.conf grep -q '^[[:blank:]]*no-loopback-peers' /etc/turnserver.conf && G_EXEC sed -i -e '/^[[:blank:]]*no-loopback-peers/d' -e 's/^[[:blank:]]*allow-loopback-peers/#allow-loopback-peers/' /etc/turnserver.conf fi + + if (( $G_HW_MODEL == 76 )) + then + G_DIETPI-NOTIFY 2 'Enabling NanoPi R5S Ethernet LEDs' + cat << '_EOF_' > /etc/udev/rules.d/dietpi-nanopi5.rules +SUBSYSTEM=="leds", KERNEL=="wan_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth0", ATTR{link}="1" +SUBSYSTEM=="leds", KERNEL=="lan1_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth1", ATTR{link}="1" +SUBSYSTEM=="leds", KERNEL=="lan2_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth2", ATTR{link}="1" +_EOF_ + G_EXEC_NOHALT=1 G_EXEC eval 'echo netdev > /sys/class/leds/wan_led/trigger' + G_EXEC_NOHALT=1 G_EXEC eval 'echo eth0 > /sys/class/leds/wan_led/device_name' + G_EXEC_NOHALT=1 G_EXEC eval 'echo 1 > /sys/class/leds/wan_led/link' + G_EXEC_NOHALT=1 G_EXEC eval 'echo netdev > /sys/class/leds/lan1_led/trigger' + G_EXEC_NOHALT=1 G_EXEC eval 'echo eth1 > /sys/class/leds/lan1_led/device_name' + G_EXEC_NOHALT=1 G_EXEC eval 'echo 1 > /sys/class/leds/lan1_led/link' + G_EXEC_NOHALT=1 G_EXEC eval 'echo netdev > /sys/class/leds/lan2_led/trigger' + G_EXEC_NOHALT=1 G_EXEC eval 'echo eth2 > /sys/class/leds/lan2_led/device_name' + G_EXEC_NOHALT=1 G_EXEC eval 'echo 1 > /sys/class/leds/lan2_led/link' + fi } # v6.35 => v7 migration diff --git a/CHANGELOG.txt b/CHANGELOG.txt index e75ae11715..b04d8c21c6 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,7 @@ v8.9 Enhancements: - Raspberry Pi | The raspberrypi-sys-mods package has been replaced with an own one, using only the small subset of the contained tweaks, which are useful on DietPi as well. A recent update of the package added a large number of dependencies, required for rpi-imager setup steps on Raspberry Pi OS only: https://github.com/MichaIng/DietPi/issues/5734 +- NanoPi R5S | The Ethernet LEDs have been enabled. Many thanks to @3735943886 for providing the related sysfs triggers: https://github.com/MichaIng/DietPi/issues/5679 - DietPi-Installer | The root user home directory and login shell are now reset to /root and /bin/bash, as expected by the fresh DietPi system. Many thanks to @symbios24 for reporting a case where root logins did fail because zsh was the login shell, but missing on a fresh DietPi system: https://github.com/MichaIng/DietPi/issues/5749 - DietPi-Survey/DietPi-BugReport | From Debian Bookworm on, for survey and bug report uploads to DietPi servers, the deprecated RSA host key algorithm has been replaced by the modern Ed25519 algorithm. The known hosts entry has been additionally hardened to allow only connecting to a specific non-default port. - DietPi-Drive_Manager | mergerfs fstab entries are now preserved. Many thanks to @paradix for suggesting this enhancement: https://github.com/MichaIng/DietPi/issues/5622