Compile your kernel, once compiled we enable all needed drivers via menuconfig
user@Minnowboard:~$ cd linux
user@Minnowboard:~$ make menuconfig
@Linux Kernel Menuconfig > Device Drivers
Symbol: NEW_LEDS [=y]
Prompt: LED Support
@Linux Kernel Menuconfig > Device Drivers > LED Support
Symbol: LEDS_CLASS [=y]
Prompt: LED Class Support
@Linux Kernel Menuconfig > Device Drivers > LED Support
Symbol: LEDS_GPIO [=m]
Prompt: LED Support for GPIO connected LEDs
@Linux Kernel Menuconfig > Device Drivers > LED Support > LED Trigger support
Symbol: LEDS_TRIGGERS [=y]
Prompt: LED Trigger support
And within this "LED Trigger support" section select a variety of triggers to work with, let's start with Hearbeat and OneShot
@Linux Kernel Menuconfig > Device Drivers > LED Support > LED Trigger support
Symbol: LEDS_TRIGGER_ONESHOT [=m]
Prompt: LED One-shot Trigger
@Linux Kernel Menuconfig > Device Drivers > LED Support > LED Trigger support
Symbol: LEDS_TRIGGER_HEARTBEAT [=m]
Prompt: LED Heartbeat Trigger
Once configured, we save the changes, compile and reboot
user@Minnowboard:~$ cd linuxlearning/kernelspace
user@Minnowboard:~$ make
Now insert and make use of both triggers, ledtrig_heartbeat and ledtrig_oneshot. You can also go back to your kernel menuconfig and enable the rest of the triggers