Skip to content

Commit

Permalink
v8.11
Browse files Browse the repository at this point in the history
- NanoPi R2S | Enabled the Ethernet status LEDs by default.
  • Loading branch information
MichaIng committed Nov 18, 2022
1 parent 6951e30 commit 427a899
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 24 deletions.
19 changes: 14 additions & 5 deletions .build/images/dietpi-installer
Original file line number Diff line number Diff line change
Expand Up @@ -1820,15 +1820,24 @@ _EOF_
# Disable Docker optimisations, since this has some performance drawbacks, enable on Docker install instead
G_CONFIG_INJECT 'docker_optimizations=' 'docker_optimizations=off' /boot/uEnv.txt

# NanoPi R2S
elif (( $G_HW_MODEL == 55 ))
then
G_DIETPI-NOTIFY 2 'Enabling NanoPi R2S Ethernet LEDs'
G_EXEC eval 'echo '\''ledtrig-netdev'\'' > /etc/modules-load.d/dietpi-eth-leds.conf'
cat << '_EOF_' > /etc/udev/rules.d/dietpi-eth-leds.rules
SUBSYSTEM=="leds", KERNEL=="wan_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1"
SUBSYSTEM=="leds", KERNEL=="lan_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth1", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1"
_EOF_
# NanoPi R5S
elif (( $G_HW_MODEL == 76 ))
then
G_DIETPI-NOTIFY 2 'Enabling NanoPi R5S Ethernet LEDs'
G_EXEC eval 'echo '\''ledtrig-netdev'\'' > /etc/modules-load.d/dietpi-nanopi5.conf'
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"
G_EXEC eval 'echo '\''ledtrig-netdev'\'' > /etc/modules-load.d/dietpi-eth-leds.conf'
cat << '_EOF_' > /etc/udev/rules.d/dietpi-eth-leds.rules
SUBSYSTEM=="leds", KERNEL=="wan_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1"
SUBSYSTEM=="leds", KERNEL=="lan1_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth1", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1"
SUBSYSTEM=="leds", KERNEL=="lan2_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth2", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1"
_EOF_
fi

Expand Down
69 changes: 50 additions & 19 deletions .update/patches
Original file line number Diff line number Diff line change
Expand Up @@ -796,25 +796,6 @@ 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
}

Patch_8_10()
Expand Down Expand Up @@ -916,6 +897,7 @@ Patch_8_11()
else
unset -v G_WHIP_BUTTON_CANCEL_TEXT
fi

elif (( $G_HW_MODEL == 56 ))
then
# Revert https://forum.armbian.com/topic/20133-nanopi-neo3-dtb-gone-since-linux-dtb-current-rockchip64-22021/ since dtb is available again
Expand All @@ -937,6 +919,55 @@ Patch_8_11()
done
G_EXEC chmod +x "${adesktop_items[@]}"
fi

if (( $G_HW_MODEL == 55 ))
then
G_DIETPI-NOTIFY 2 'Configuring NanoPi R2S Ethernet LEDs'
G_EXEC eval 'echo '\''ledtrig-netdev'\'' > /etc/modules-load.d/dietpi-eth-leds.conf'
cat << '_EOF_' > /etc/udev/rules.d/dietpi-eth-leds.rules
SUBSYSTEM=="leds", KERNEL=="wan_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1"
SUBSYSTEM=="leds", KERNEL=="lan_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth1", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1"
_EOF_
G_EXEC modprobe ledtrig-netdev
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 1 > /sys/class/leds/wan_led/rx'
G_EXEC_NOHALT=1 G_EXEC eval 'echo 1 > /sys/class/leds/wan_led/tx'
G_EXEC_NOHALT=1 G_EXEC eval 'echo netdev > /sys/class/leds/lan_led/trigger'
G_EXEC_NOHALT=1 G_EXEC eval 'echo eth1 > /sys/class/leds/lan_led/device_name'
G_EXEC_NOHALT=1 G_EXEC eval 'echo 1 > /sys/class/leds/lan_led/link'
G_EXEC_NOHALT=1 G_EXEC eval 'echo 1 > /sys/class/leds/lan_led/rx'
G_EXEC_NOHALT=1 G_EXEC eval 'echo 1 > /sys/class/leds/lan_led/tx'

elif (( $G_HW_MODEL == 76 ))
then
G_DIETPI-NOTIFY 2 'Configuring NanoPi R5S Ethernet LEDs'
[[ -f '/etc/modules-load.d/dietpi-nanopi5.conf' ]] && G_EXEC mv /etc/modules-load.d/dietpi-{nanopi5,eth-leds}.conf
[[ -f '/etc/udev/rules.d/dietpi-nanopi5.rules' ]] && G_EXEC mv /etc/udev/rules.d/dietpi-{nanopi5,eth-leds}.rules
G_EXEC eval 'echo '\''ledtrig-netdev'\'' > /etc/modules-load.d/dietpi-eth-leds.conf'
cat << '_EOF_' > /etc/udev/rules.d/dietpi-eth-leds.rules
SUBSYSTEM=="leds", KERNEL=="wan_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth0", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1"
SUBSYSTEM=="leds", KERNEL=="lan1_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth1", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1"
SUBSYSTEM=="leds", KERNEL=="lan2_led", ACTION=="add", ATTR{trigger}="netdev", ATTR{device_name}="eth2", ATTR{link}="1", ATTR{rx}="1", ATTR{tx}="1"
_EOF_
G_EXEC modprobe ledtrig-netdev
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 1 > /sys/class/leds/wan_led/rx'
G_EXEC_NOHALT=1 G_EXEC eval 'echo 1 > /sys/class/leds/wan_led/tx'
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 1 > /sys/class/leds/lan1_led/rx'
G_EXEC_NOHALT=1 G_EXEC eval 'echo 1 > /sys/class/leds/lan1_led/tx'
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'
G_EXEC_NOHALT=1 G_EXEC eval 'echo 1 > /sys/class/leds/lan2_led/rx'
G_EXEC_NOHALT=1 G_EXEC eval 'echo 1 > /sys/class/leds/lan2_led/tx'
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 @@ -10,6 +10,7 @@ New software:
Enhancements:
- Quartz64 | The firmware package has been updated to ship with Linux v6.1.0-rc1 and firmware for onboard WiFi, respectively the PINE64 WiFi module. Furthermore, we moved to mainline U-Boot, which solves some boot issues with certain SD card and eMMC models. You will be asked during dietpi-update whether you want to upgrade it on your system.
- NanoPi NEO3 | Switched back to the again available NEO3 device tree, resolving potential hardware feature issues.
- NanoPi R2S | Enabled the Ethernet status LEDs by default.
- DietPi-Software | Shairport Sync: Updated to version 4.1 and added the option to install an AirPlay 2 ready build. The update and offer to switch to AirPlay 2 can be applied via reinstall: dietpi-software reinstall 37
- DietPi-Software | NoMachine: Bumped version to latest stable v8.1.2_1, update via reinstall: dietpi-software reinstall 30
- DietPi-Software | HAProxy: Bumped version to latest stable v2.6.6, update via reinstall: dietpi-software reinstall 98
Expand Down

0 comments on commit 427a899

Please sign in to comment.