APU2C add LEDs support

Home Page Forums Network Management ZeroShell APU2C add LEDs support

This topic contains 0 replies, has 0 voices, and was last updated by  iulyb 2 years, 4 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #44586

    iulyb
    Member

    Hi,
    I just spent some time looking to add support for LEDs on APU2C. http://pcengines.ch/apu2c4.htm
    Basically I needed to compile the kernel module and a small daemon supplied by pcengines http://pcengines.ch/howto.htm#gpio
    You need first to create a dev environment, preferably on virtual box.
    For those who trust me enough I am offering the module and the daemon for download here:
    http://jb68.com/pkg/
    Just make sure you download the right version.

    How to make it work. SSH into ZH
    First create some structure, download and unpack.

    mkdir -p /DB/opt/apu2led
    cd /DB/opt/apu2led
    wget http://jb68.com/pkg/apu2led-ZH-4.4.9.tar.gz
    tar -xzvf apu2led-ZH-4.4.9.tar.gz

    Now we should insert the new module and test it with heartbeat

    insmod /DB/opt/apu2led/leds-apu2.ko
    lsmod |grep led #this should display our module
    modprobe ledtrig_default_on
    modprobe ledtrig_heartbeat

    If after this we get the first led blicking we can make the install definitive.
    On ZH web interface go on scripts and on preboot script add:

    #/bin/bash

    # LED Module
    /sbin/insmod /DB/opt/apu2led/leds-apu2.ko

    # heartbeat
    /sbin/modprobe ledtrig_default_on
    /sbin/modprobe ledtrig_heartbeat

    echo heartbeat > /sys/class/leds/apu2:1/trigger

    Enable and save then go on postboot script and add some actions for the other 2 LEDs to display activity on VPN and Wireless networks:

    # Startup Script

    # map led1 -> no; led2->no; led3->activity for WLAN
    /DB/opt/apu2led/apu2led WLAN00 -c nna -f &

    # map led1 -> no; led2->activity for VPN; led3->no
    /DB/opt/apu2led/apu2led VPN99 -c nan -f &

    Enable, save then reboot and enjoy.
    You may change LEDs activity to fit your needs.

    #54174

    argo
    Member

    Hi,

    thanks for providing the binaries, would it be possible that you share your development VM, too? I’m interrested in compiling a newer openssl version for aes-ni support.

    Thanks!

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.