Benutzer-Werkzeuge

Webseiten-Werkzeuge



bpi-r2:software

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.


Vorhergehende Überarbeitung
bpi-r2:software [2023/06/08 17:06] (aktuell) – Externe Bearbeitung 127.0.0.1
Zeile 1: Zeile 1:
 +====== Software ======
  
 +===== erste Schritte =====
 +Betriebssystem herunterladen:
 +[[https://drive.google.com/drive/folders/0B_YnvHgh2rwjTkdwNnE2VmFoNzg|Google Drive]]
 +oder
 +[[https://dev.banana-pi.org.cn/Image/BPI-R2/|dev.banana-pi.org.cn]]
 +
 +Image auf SD-Karte bringen (Linux):
 +
 +  dd if=pfad/zum/image.img of=/dev/sdx bs=1M
 +
 +
 +===== Debian =====
 +
 +erstes Booten (am besten mit [[bpi-r2:debug-uart|Debug-UART]])
 +
 +**Login:** root **Passwort:** bananapi
 +
 +==== System aktualisieren & Uhrzeit einstellen ====
 +
 +  apt-get update && apt-get upgrade
 +  #hostname bpi-r2 # and
 +  #sysctl kernel.hostname=bpi-r2 #does not work
 +  echo "bpi-r2">/etc/hostname
 +  dpkg-reconfigure tzdata
 +  #echo "export PS1='[\A] \u@\h:\W# '">>~/.bashrc
 +  
 +Umgebungsvariablen (dauerhaft: echo "...">>~/.bashrc, " vom Befehl selbst mit \ maskieren)
 +
 +  #fix für nano probleme auf der debug-console
 +  if [[ "$(tty)" =~ "ttyS" ]]; then export TERM=vt100;fi
 +  #prompt mit Zeitstempel
 +  export PS1='[\A] \u@\h:\W# '
 +  #leichterer Zugriff auf die GPIO mit $GPIO
 +  export GPIO=/sys/devices/platform/1000b000.pinctrl/mt_gpio
 +
 +==== Netzwerkeinstellungen ====
 +
 +[[.:network:|Netzwerkeinstellungen]]
 +
 +=== temporär ===
 +
 +  #4.4.70:
 +  ifconfig eth0 192.168.0.10/24
 +  route add default gw 192.168.0.5
 +  echo "nameserver 192.168.0.5" > /etc/resolv.conf
 +
 +  #4.14:
 +  #ifconfig eth0 up
 +  ip link set eth0 up
 +  #ifconfig lan0 192.168.0.10/24
 +  ip addr add 192.168.0.10/24 dev lan0
 +  #ip -6 addr add 2001:0db8:0:xxxx::1/64 dev lan0 
 +  #ifconfig lan0 up
 +  ip link set lan0 up
 +  #route add default gw 192.168.0.5
 +  ip route add 0.0.0.0/0 via 192.168.0.5 
 +  echo "nameserver 192.168.0.5" > /etc/resolv.conf
 +
 +  
 +=== dauerhaft (auch nach reboot) ===
 +
 +4.4.70:
 +
 +  nano /etc/network/interfaces
 +
 +  auto eth0
 +    iface eth0 inet static
 +    hwaddress ether 08:00:00:00:00:01
 +    address 192.168.0.10
 +    netmask 255.255.255.0
 +    gateway 192.168.0.5
 +  
 +  auto eth1
 +    iface eth1 inet static
 +    
 +4.14:
 +
 +  auto eth0
 +  iface eth0 inet manual
 +    pre-up ip link set $IFACE up
 +    post-down ip link set $IFACE down
 +  
 +  auto lan0
 +  iface lan0 inet static
 +    hwaddress ether 08:00:00:00:00:00 # if you want to set MAC manually
 +    address 192.168.0.10
 +    netmask 255.255.255.0
 +    gateway 192.168.0.5
 +    pre-up ip link set $IFACE up
 +    post-down ip link set $IFACE down
 +  
 +  auto lan1
 +  iface lan1 inet static
 +    hwaddress ether 08:00:00:00:00:01 # if you want to set MAC manually
 +    address 192.168.1.10
 +    netmask 255.255.255.0
 +    pre-up ip link set $IFACE up
 +    post-down ip link set $IFACE down
 +  
 +  auto lan2
 +  iface lan2 inet static
 +    hwaddress ether 08:00:00:00:00:02 # if you want to set MAC manually
 +    #...
 +  
 +  auto lan3
 +  iface lan3 inet static
 +    hwaddress ether 08:00:00:00:00:03 # if you want to set MAC manually
 +    #...
 +  
 +  auto wan
 +  iface wan inet static
 +    hwaddress ether 09:00:00:00:00:01 # if you want to set MAC manually
 +    #...
 +
 +unter debian 9 funktioniert hwaddress nicht mehr, hier lässt sich das setzen der MAC so erreichen:
 +
 +<code>
 +iface lan0 inet static
 +  address 192.168.0.10
 +  netmask 255.255.255.0
 +  gateway 192.168.0.5
 +#  pre-up ip link set $IFACE up
 +  pre-up ip link set $IFACE address 02:01:02:03:04:08 up
 +  post-down ip link set $IFACE down
 +</code>
 +
 +Möglichkeit via UDEV von [[http://forum.banana-pi.org/t/bpi-r2-ethernet-mac-address/4361/23|hier]]
 +
 +<code>
 +$ cat /etc/udev/rules.d/00-static-mac-address.rules
 +ACTION=="add", SUBSYSTEM=="net", KERNELS=="1b100000.ethernet", RUN+="/sbin/ip link set dev %k address ae:fc:de:ad:be:ef"
 +</code>
 +
 +== DHCP ==
 +<code>
 +allow-hotplug lan3
 +iface lan3 inet dhcp
 +</code>
 +
 +== Netzwerkbrücke (4.14) ==
 +
 +FIXME ungetestet :!:
 +
 +<code>
 +apt-get install bridge-utils
 +</code>
 +<code>
 +brctl addbr br0
 +brctl addif br0 lan1 lan2 lan3 #bridging lan1-lan3 (lan0 separat lassen für vlan-tagging o.ä.)
 +
 +root@bpi-r2:~# brctl show br0
 +bridge name     bridge id               STP enabled     interfaces
 +br0             8000.6acba7512bc1       no              lan1
 +                                                        lan2
 +                                                        lan3
 +</code>
 +
 +/etc/network/interfaces:
 +<code>
 +iface br0 inet static
 +    address 192.168.40.1
 +    netmask 255.255.255.0
 +    bridge_ports lan1 lan2
 +    bridge_fd 5
 +    bridge_stp no
 +</code>
 +
 +== vlan ==
 +4.14:
 +
 +/etc/network/interfaces:
 +<code>
 +auto lan3
 +iface lan3 inet manual
 +
 +auto lan3.60
 +iface lan3.60 inet static
 +  address 192.168.60.10
 +  netmask 255.255.255.0
 +#  gateway 192.168.0.5
 +  pre-up ip link set $IFACE address 02:01:02:03:04:03 up #setting mac does not work currently
 +</code>