radxa e54c board config: enable system and network leds

This commit is contained in:
Kamil Saigol 2025-10-31 12:25:03 -04:00 committed by Igor
parent 399513dec4
commit 8cfee8cbe8

View File

@ -11,7 +11,7 @@ IMAGE_PARTITION_TABLE="gpt"
# The kernel config hooks are always called twice, once without being in kernel directory and once with current directory being the kernel work directory.
# Hook to enable the distributed switch architecture to expose the individual LAN and WAN interfaces.
# Enable the distributed switch architecture to expose the individual LAN and WAN interfaces.
function custom_kernel_config__radxa_e54c_enable_ethernet_switch_arch() {
if [[ ! -f .config ]]; then
# kernel_config_modifying_hashes is only needed during first call of this function to calculate kernel artifact version string. It serves no purpose whatsoever during second call.
@ -26,3 +26,54 @@ function custom_kernel_config__radxa_e54c_enable_ethernet_switch_arch() {
kernel_config_set_m NET_DSA_REALTEK_RTL8366RB
fi
}
# Enable system and network LEDs
function post_family_tweaks_bsp__radxa_e54c_enable_leds() {
display_alert "$BOARD" "Creating Board Support LED Config" "info"
cat <<- EOF > "${destination}"/etc/armbian-leds.conf
[/sys/class/leds/lan1-led]
trigger=netdev
interval=52
brightness=1
link=1
tx=0
rx=1
device_name=lan1@end1
[/sys/class/leds/lan2-led]
trigger=netdev
interval=52
brightness=1
link=1
tx=0
rx=1
device_name=lan2@end1
[/sys/class/leds/lan3-led]
trigger=netdev
interval=52
brightness=1
link=1
tx=0
rx=1
device_name=lan3@end1
[/sys/class/leds/wan-led]
trigger=netdev
interval=52
brightness=1
link=1
tx=0
rx=1
device_name=wan@end1
[/sys/class/leds/mmc0::]
trigger=mmc0
brightness=0
[/sys/class/leds/sys-led]
trigger=heartbeat
brightness=0
invert=0
EOF
}