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/
  • Download: Armbian_5.35_Bananapipro_Debian_stretch_next_4.13.16.7z (249.265 kB)
  • momentanes Image: Armbian_5.35_Bananapipro_Debian_stretch_next_4.13.16.img (1.355.776 kB)

Infos zur Hardware

https://linux-sunxi.org/Banana_Pro

Erstanmeldung

Benutzer:

root

Kennwort:

1234

Aktualisieren

apt-get update
apt-get upgrade

Neustarten

  • Notwendig, weil der dbus-Dämon ersetzt werden soll: A reboot is required to replace the running dbus-daemon. Please reboot the system when convenient.
reboot

Zeitzone einstellen

armbian-config

Locale auf Deutsch stellen

Ein Workaround, weil armbian-config hier wohl momentan einen Fehler (Bug) hat:

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

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
  • Mountpunkt erstellen:
mkdir /media/usb0
  • 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
mv /etc/samba/smb.conf /etc/samba/smb.conf.original
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 neu starten
service smbd restart

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

  • den DNSMASQ-Dämon um ein Startscript erweitern:
nano /etc/dnsmasq.d/04-pxe.conf
#port=0
#enable-tftp
tftp-root=/srv/tftp
#dhcp-no-override
dhcp-range=192.168.178.0,proxy
dhcp-boot=/boot/pxelinux.0,0.0.0.0.0
## PXE's native menu ###
pxe-prompt="Bitte F8 druecken fuer Bootoptionen", 3
pxe-service=X86PC,"Raspbian x86 Jessie Pixel", /boot/raspbianx86/pxelinux
pxe-service=X86PC,"Netzwerk Boot Ubuntu", /boot/ubuntu/pxelinux
pxe-service=X86PC,"Netzwerk Boot PuppyLinux", /boot/puppy/pxelinux
pxe-service=X86PC,"Netzwerk Boot MS-DOS 6.22", /boot/msdos/pxelinux
pxe-service=X86PC,"Mem Test86 v4.37", /boot/memtest/pxelinux
  • den DNSMASQ-Dämon neu starten:
sudo service dnsmasq restart

Quelle1: Quelle2: Quelle3: Quelle4: Quelle5:

TFTP-Server "zusehen"

  • tcpdump installieren:
sudo apt-get install tcpdump
  • Auf TFTP7PXE-Ports "lauschen":
tcpdump port 69 -vv
tcpdump port 4011 -vvvvv
sudo tcpdump -i eth0 port bootpc