Skip to content

Commit

Permalink
v8.9
Browse files Browse the repository at this point in the history
- NanoPi R5S | The Ethernet LEDs have been enabled. Many thanks to @3735943886 for providing the related sysfs triggers: #5679
  • Loading branch information
MichaIng committed Sep 24, 2022
1 parent 0ea9113 commit ce358db
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .build/images/dietpi-installer
Original file line number Diff line number Diff line change
Expand Up @@ -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 ))
Expand Down Expand Up @@ -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
Expand Down
19 changes: 19 additions & 0 deletions .update/patches
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ce358db

Please sign in to comment.