www.zeroshell.org Forum Index www.zeroshell.org
Linux Distribution for server and embedded devices
 
 SearchSearch  RegisterRegister  UsergroupsUsergroups 
 ProfileProfile  Log inLog in  Log in to check your private messagesPrivate Message 

APU2C add LEDs support

 
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell
View previous topic :: View next topic  
Author Message
iulyb



Joined: 02 Jun 2016
Posts: 79

PostPosted: Fri Jun 24, 2016 3:22 am    Post subject: APU2C add LEDs support Reply with quote

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.
Code:
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
Code:
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:
Code:
#/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:
Code:
# 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.
Back to top
View user's profile Send private message
argo



Joined: 13 Mar 2015
Posts: 8

PostPosted: Sat Jun 25, 2016 3:57 pm    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group