Error LED on Soekris net5501

How to use the error led on a Soekris net5501 as system heartbeat/load indicator.

Necessary linux kernel configuration.

Device Drivers  --->
   [*] GPIO Support  --->
         AMD CS5535/CS5536 GPIO support
   [*] Multifunction device drivers  --->
         Support for CS5535 and CS5536 southbridge core functions
   [*] LED Support  --->
      [*]   LED Class Support
         LED Support for Soekris net5501 series Error LED
         LED Support for GPIO connected LEDs
         [*]     Platform device bindings for GPIO LEDs
      [*]   LED Trigger support
         LED Heartbeat Trigger

Note: If the item under “GPIO Support” doesn’t show up, look into the “Staging drivers” section and disable the old GPIO driver.

Start the new kernel and load the necessary modules and set the trigger.

modprobe leds_net5501
modprobe ledtrig_heartbeat
echo heartbeat > /sys/class/leds/error/trigger

If everything went well, the LED flashes. And if the system load goes up, it’s going faster.

Save the settings, so everything is up and running after a reboot.

Instructions for Gentoo linux(requires baselayout-2/OpenRC).
Add the modules to /etc/conf.d/modules

modules="leds_net5501 ledtrig_heartbeat"

Create a new file /etc/local.d/heartbeat.start

echo heartbeat > /sys/class/leds/error/trigger

Make the file executable

chmod 755 /etc/local.d/heartbeat.start

Update, Linux kernel > 3.6.0:
Sysfs layout has been changed with Linux kernel 3.6.0.
FileĀ /etc/local.d/heartbeat.start need a little change.

echo heartbeat > "/sys/class/leds/net5501:1/trigger"

Leave a Reply

Your email address will not be published.