Installation von GNU Debian 8.x aka Jessie auf dem Cubietruck (ARMv7 AllWinner A20)

Quellen

Debian 8.x Jessie Installation

Installation wie in [1] beschrieben durchführen.

wget http://ftp.uk.debian.org/debian/dists/jessie/main/installer-armhf/current/images/netboot/SD-card-images/firmware.Cubietruck.img.gz
wget http://ftp.uk.debian.org/debian/dists/jessie/main/installer-armhf/current/images/netboot/SD-card-images/partition.img.gz
zcat firmware.Cubietruck.img.gz partition.img.gz > /dev/sde
  • Serielles Kabel (FTDI-Kabel) anschließen um die folgenden Schritte auf der Konsole beobachten zu können
  • sudo minicom -b 115200 -o -D /dev/ttyUSB0
  • Cubietruck mit der neu erstellten SD-Karte booten
  • Installation nach [1] fortführen
  • Reboot

Konfiguration des Grundsystems

#login als root via serieller Konsole
apt-get update
apt-get upgrade
apt-get install mc apt-transport-https
dpkg-reconfigure locales
 [*] de_DE.UTF-8
 [*] en_GB.UTF-8

Netzwerkkonfiguration

nano /etc/systemd/resolved.conf
[Resolve]
DNS=192.168.100.1
#
ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
#
# falls ''systemd-resolved'' schon läuft: 
systemctl restart systemd-resolved.service
#
# sonst:
systemctl enable systemd-resolved.service
systemctl start systemd-resolved.service
#
# nach [3]
nano /etc/systemd/network/eth0.network
#
[Match]
Name=eth0
[Network]
Address=192.168.100.3/24
Gateway=192.168.100.1
DNS=192.168.100.1
#
# LAN Schnittstelle abschalten:
ifdown eth0
#
cp /etc/network/{interfaces,interfaces_bak}
cat /dev/null > /etc/network/interfaces
update-rc.d networking remove
systemctl enable systemd-networkd.service
systemctl start systemd-networkd.service
#
# Login für den Benutzer ''root'' via SSH ermöglichen:
nano /etc/ssh/sshd_config
...
PermitRootLogin without-password -> PermitRootLogin yes
...
#

Sundtek DVB-C Tuner

Installation

ssh -l root <VDR-IP>
cd /root
wget http://www.sundtek.de/media/sundtek_netinst.sh
chmod +x sundtek_netinst.sh
./sundtek_netinst.sh
/opt/bin/mediaclient --dtvtransfermode=bulk -d /dev/dvb/adapter0/frontend0
# Reconnect Tuner #1
/opt/bin/mediaclient --dtvtransfermode=bulk -d /dev/dvb/adapter1/frontend0
# Reconnect Tuner #2
#
# VDR erneut starten wenn DVB-Tuner Treiber geladen sind:
echo "device_attach=service vdr restart" >> /etc/sundtek.conf

VDR

Auf keinen Fall die automatisch generierte Kanalkonfiguration (channels.conf für vdr) aus dem Kabel Deutschland Forum verwenden - die Parameter für die HD Sender der Öffentlich-Rechtlichen sind fehlerhaft und bringen den VDR regelmäßig zum Absturz (data stream broken → emergency exit).
echo "deb https://packages.e-tobi.net/vdr-experimental jessie base vdr-multipatch" >> /etc/apt/sources.list
gpg --keyserver keyring.debian.org --recv-keys 041390BC
gpg --armor --export 041390BC | apt-key add -
apt-get update
apt-get install vdr vdr-plugin-streamdev-server vdr-plugin-vnsiserver vdradmin-am vdr-plugin-epgsearch dvb-apps
#
# VDR und VDRadmin-am Dienst via sytemctl starten:
systemctl start vdr && systemctl start vdradmin-am
#
# VDR und VDRadmin-am Dienst via sytemctl stoppen:
systemctl stop vdr && systemctl stop vdradmin-am
#

Sendersuche

sudo su
apt-get install w-scan
w_scan -fc -c DE >> channels.conf

Konfiguration

nano /etc/default/vdradmin-am
... ENABLED="1"
#
nano /etc/vdr/setup.conf
# automatische Kanalsuche abschalten:
UpdateChannels = 0
#
nano /etc/vdradmin-am/vdradmind.conf
LANG = 
LANGUAGE = Deutsch
#
nano /etc/vdr/conf.d/00-vdr.conf
#--lirc
#--vfat
#
nano /etc/default/vdr
#VDR_CHARSET_OVERRIDE=ISO-8859-9
#

vor und nach Aufnahmen ...

/etc/vdr/recording-hooks/R90.custom
case $1 in
    before)
        # do here whatever you would like to do right BEFORE
        # the recording $2 STARTS
        echo 1 > /sys/class/leds/blue\:ph21\:led1/brightness
        ;;
 
    started)
        # do here whatever you would like to do right AFTER
        # the recording $2 STARTED
        ;;
 
    after)
        # do here whatever you would like to do right AFTER
        # the recording $2 ENDED
        echo 0 > /sys/class/leds/blue\:ph21\:led1/brightness
        chmod -R g+w $2/..
        ;;
 
    edited)
        # do here whatever you would like to do right AFTER
        # the recording $2 has been EDITED
        # $3 is the original recording
        ;;
    deleted)
        # do here whatever you would like to do right AFTER
        # the recording $2 has been DELETED
        ;;
esac

Radiorecorder Web GUI

sudo su
apt-get install lighttpd streamripper at
systemctl status lighttpd
usermod -G vdr -a www-data
#chown -R www-data:www-data /var/www/html
#chmod -R 775 /var/www/html
# zuerst lighttpd installieren da sonst auf Grund von Abhängigkeiten evtl. der apache2 Webserver installiert wird!
apt-get install php5-common php5-cgi php5
lighty-enable-mod fastcgi
lighty-enable-mod fastcgi-php
systemctl restart lighttpd
echo "<?php phpinfo(); ?>" >> /var/www/html/phpinfo.php
# Im Browser öffnen: http://<RASPBERRYPI-IP/phpinfo.php
# www-data aus /etc/at.deny entfernen
sed -i -e '/www-data/d' /etc/at.deny
cd ~
wget https://netcologne.dl.sourceforge.net/project/radiorecwebgui/0.3.x/radiorecorder_0.3.1.tar.gz
tar xfz radiorecorder_0.3.1.tar.gz
mkdir -p /var/www/html/radiorecorder
cp -R radiorecorder_0.3.1/* /var/www/html/radiorecorder/
#
echo "NDR2;http://ndr-ndr2-niedersachsen.cast.addradio.de/ndr/ndr2/niedersachsen/mp3/128/stream.mp3" > /var/www/html/radiorecorder/res/streams.txt
echo "NDR Kultur;http://ndr-ndrkultur-live.cast.addradio.de/ndr/ndrkultur/live/mp3/128/stream.mp3" > /var/www/html/radiorecorder/res/streams.txt
echo "NDR Info;http://ndr-ndrinfo-niedersachsen.cast.addradio.de/ndr/ndrinfo/niedersachsen/mp3/128/stream.mp3" > /var/www/html/radiorecorder/res/streams.txt
echo "N-Joy;http://ndr-njoy-live.cast.addradio.de/ndr/njoy/live/mp3/128/stream.mp3" > /var/www/html/radiorecorder/res/streams.txt
echo "NDR Blue;http://ndr-ndrblue-live.cast.addradio.de/ndr/ndrblue/live/mp3/128/stream.mp3" > /var/www/html/radiorecorder/res/streams.txt
echo "NDR Plus;http://ndr-ndrplus-live.cast.addradio.de/ndr/ndrplus/live/mp3/128/stream.mp3" > /var/www/html/radiorecorder/res/streams.txt
#
chown -R www-data:www-data /var/www/html/
mkdir /mnt/video0/radiorecorder
chown -R vdr:vdr /mnt/video0/radiorecorder/
chmod -R g+w /mnt/video0/radiorecorder/
#
systemctl restart lighttpd
# Im Browser öffnen: http://<RASPBERRYPI-IP/

/var/www/html/radiorecorder/res/settings.php

settings.php
<?php
 
class Settings {
 
  public static $siteRoot = '/var/www/html/radiorecorder';
  public static $recordedFilesDestination = '/mnt/video0/radiorecorder';
  public static $language = 'de'; //"de" for german or "en" for english
  public static $locale = 'C'; // default is "C"; other possible locales: "de_AT.UTF-8" to enable all corresponding characters for the filename
  public static $defaultStreamripperParams = '';	// adds streamripper params to each call
  public static $addDatePrefixToFilename = null;	// prefix format (e.g. 'Y-m-d') or null if no prefix to add
  public static $postCommand = '';	// command to be executed after the recording is finished
  public static $logThreshold = 3; //Level of log messages, possible values : LEVEL_DEBUG=4, LEVEL_INFO=3, LEVEL_WARN=2, LEVEL_ERROR=1
 
}
 
?> 

SAMBA installieren und einrichten

aptitude install samba
echo "wins server = eth0:192.168.100.1" > /etc/samba/dhcp.conf
adduser christoph
smbpasswd -a christoph
aptitude install cifs-utils

Samba Konfiguration

smb.conf
#======================= Global Settings =======================
 
[global]
   workgroup = WG
   server string = %h server
   wins support = no
 
   wins server = 192.168.100.1
   dns proxy = no
   name resolve order = lmhosts host wins bcast
 
#### Networking ####
;   interfaces = 127.0.0.0/8 eth0
;   bind interfaces only = yes
 
 
#### Logging ####
   log file = /var/log/samba/log.%m
 
# Cap the size of the individual log files (in KiB).
   max log size = 1000
 
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
 
 
####### Authentication #######
 
   security = user
   encrypt passwords = true
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes
   map to guest = bad user
 
#======================= Share Definitions =======================
[homes]
   comment = Home Directories
   browseable = yes
   writeable = yes
   read only = no
   create mask = 0700
   directory mask = 0700
   valid users = %S
 
[Aufnahmen]
   comment = VDR Aufnahmen
   path = /mnt/video0
   browseable = yes
   writeable = yes
   read only = no
   #create mask = 0700
   #directory mask = 0700
   #valid users = %S
   create mask = 0664
   directory mask = 0775
   force group = users
 
 load printers = no
 printing = bsd
 printcap name = /dev/null
 disable spoolss = yes

QR-Code
QR-Code Installation von GNU Debian 8.x aka Jessie auf dem Cubietruck (ARMv7 AllWinner A20) (erstellt für aktuelle Seite)