BananaPro (Armbian ab 1/2018)

Aus www.electronic-man.randschtoischlotzer.de
Wechseln zu: Navigation, Suche

Armbian (Debian Server Mainline Kernel) (ab 1/2018)

Download

https://www.armbian.com/banana-pi-pro/

Infos zur Hardware

https://linux-sunxi.org/Banana_Pro

Erstanmeldung

Benutzer:

root

Kennwort:

1234

Datum, Uhrzeit etc. einstellen

armbian-config

Locale auf Deutsch stellen

sudo apt-get install task-german
sudo dpkg-reconfigure locales
locale -a
env | egrep '(LC|LANG)
sudo nano /etc/default/keyboard
sudo nano /etc/default/locale
armbian-config

NTFS-formatierte USB-HDD bei Start mounten

  • falls nicht vorhanden ntfs-3g für Zugriff auf Windows-NTFS-formatierte Datenträger installieren:
apt-get install ntfs-3g
  • die Cron-Job-Tabelle um einen Mount-Befehl erweitern:
crontab -e
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h  dom mon dow   command
@reboot sleep 60;  mount -t auto /dev/sda1 /media/usb0

  • Zeile einfügen:
@reboot sleep 60;  mount -t auto /dev/sda1 /media/usb0

Quelle:

SMB-Zugriff (Share) einrichten

  • Software installieren
apt-get install samba samba-common-bin
  • Benutzer einrichten
smbpasswd -a pi
  • Server einstellen
service samba stop
nano /etc/samba/smb.conf
  • Inhalt der smb.conf
    [global]
       workgroup = WORKGROUP
       #usershare allow guests = yes
       #security=share
       security=user
       follow symlinks = yes
       wide links = no
       unix extensions = no
       lock directory = /var/cache/samba
   [Pi]
       browsable = yes
       read only = no
       #guest ok = yes
       valid users = pi
       path = /home/pi
   [devices]
       browsable = yes
       read only = no
       #guest ok = yes
       valid users = pi
       path = /media
       force user = root
  • optional:
      [MEDIA USB-HDD 1.0 TB]
      browsable = yes
      read only = no
      #guest ok = yes
      valid users = pi
      path = /media/usb0
  • Server starten
service samba start

Quelle:

RPi.GPIO auf Banana Pro einrichten

Voraussetzungen: Paket sudo muss instaliert sein.

  • GIT installieren:
sudo apt-get update
sudo apt-get install git 
  • Paket herunterladen:
cd /root
git clone https://github.com/LeMaker/RPi.GPIO_BP -b bananapro
  • Installation:
sudo apt-get update
sudo apt-get install python-dev
  • Kompilieren und Installieren:
cd RPi.GPIO_BP
python setup.py install                 
sudo python setup.py install

Quelle:

TM1637 LED Display ansteuern - Only 4 PIN Red Common Anode 4-Segment Digital Tube Display For Arduino Raspberry

TFTP-Server installieren

  • Server installieren:
apt-get install tftpd-hpa
  • Einstelllungen anpassen:
nano /etc/default/tftpd-hpa

Inhalt der Datei wie folgt ändern:

TFTP_USERNAME=”tftp”
TFTP_DIRECTORY=”/srv/tftp”
TFTP_ADDRESS=”0.0.0.0:69″ 
TFTP_OPTIONS=”–secure -4
  • Server neu starten:
service tftpd-hpa restart

Quelle:

Hinweis: Dateien in /srv/tftp ablegen.

Evtl. Rechte anpassen:

chmod g+s /srv/tftp/
chmod 775 /srv/tftp/

PXE einrichten

sudo nano /etc/dnsmasq.d/04-pxe.conf
sudo service dnsmasq restart

TFTP-Server "zusehen"

  • tcpdump installieren:
sudo apt-get install tcpdump
  • Auf Port 69 "lauschen":
tcpdump port 69 -vv