Menu

RaspberryPiSetup

setup (2)
Anonymous karuna Yellow Mellow

Introduction

Description of the setup of pidora and all neccessary packages to develop this project. This setup is used for both, the server and the clients.

Details

1. Download and install pidora

  1. Download the image from here: http://www.raspberrypi.org/downloads/ (the server is running fedora-xfce from https://arm.fedoraproject.org/)
  2. Installation is described here: http://zenit.senecac.on.ca/wiki/index.php/Pidora_Installation
  3. Insert the card to the raspi, boot and follow the instructions on "firstboot"...

2. Install (and configure) the following packages:

C++ compiler

yum install gcc-c++

VNC server

yum install tigervnc-server
yum install switchdesk

create/edit /etc/init.d/vncserver (change VNCUSER and the "-geometry' argument of vncserver to fit your needs):

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#! /bin/bash
#
# vncserver       Bring up/down vncserver
#
# chkconfig: - 10 90
# description: Activates/Deactivates vncserver to start at boot time.
#
### BEGIN INIT INFO
# Provides: $vncserver
# Should-Start:
# Default-Start: 3 5                                                            
# Default-Stop: 0 1                                                             
# Short-Description: Bring up/down vncserver
# Description: Bring up/down vncserver
### END INIT INFO

VNCUSER='pi'
case "$1" in
    start)
    export HOME=/home/$VNCUSER
        su - $VNCUSER -c '/usr/bin/vncserver :1 -geometry 1680x1050'
        su - $VNCUSER -c '/usr/bin/switchdesk xfce'
        echo "Starting VNC Server for $VNCUSER "
        ;;
    stop)
        pkill Xvnc
        echo "VNC Server stopped"
        ;;
    restart)
    $0 stop
        $0 start
        ;;
   *)
        echo "Usage: /etc/init.d/vncserver {start|stop|restart}"
        exit 1
        ;;
esac
exit 0

run (optional)

chkconfig --level 35 vncserver on

start vncserver:

systemctl start vncserver.service

Edit ~/.vnc/xstartup, comment the following line.

#unset SESSION_MANAGER

watchdog

see: http://www.gieseke-buch.de/raspberrypi/eingebauten-hardware-watchdog-zur-ueberwachung-nutzen (german!)

modprobe bcm2708_wdog

echo "bcm2708_wdog" > /etc/modules-load.d/bcm2708_wdog

yum install watchdog

nano /etc/watchdog.conf

Diese Datei enthält bereits eine ganze von Einstellungen, die aber (fast) alle auskommentiert (#) sind. Zusätzlich sollten Sie diese beiden vorhandenen Zeilen aktivieren, indem Sie das # am Anfang entfernen:

watchdog-device = /dev/watchdog
max-load-1 = 24

/etc/init.d/watchdog start

!! configuration for HPCClient and HPCServer will be added soon !!

wiringPi with pca9685 devLib extension

yum install git-core
git clone git://git.drogon.net/wiringPi
cd wiringPi
git pull origin
./build
cd ..
git clone https://github.com/Reinbert/pca9685.git
cd pca9685/src
make install

install development tools and libraries

yum install qt5-base-mysql
yum install svn
yum install dbg
yum install mysql-devel
yum install i2c-tools
yum install gnuplot

Get the source

Get sourcecode with:

as guest: svn checkout http://home-power-control.googlecode.com/svn/trunk/ HomePowerControl-read-only

as member: svn checkout https://home-power-control.googlecode.com/svn/trunk/ HomePowerControl --username <your_mail_addr>

Crosscompiler setup

If you want to cross-compile the project (highly recommended), you find a description to setup the environment for a Fedora-based host here: CrossCompiler


Related

Wiki: CrossCompiler
Wiki: RaspberryPi