Benutzer-Werkzeuge

Webseiten-Werkzeuge


Übersetzungen dieser Seite:

bpi-r2:software

Software

erste Schritte

Betriebssystem herunterladen: Google Drive oder 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 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

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:

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

Möglichkeit via UDEV von hier

$ 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"
DHCP
allow-hotplug lan3
iface lan3 inet dhcp
Netzwerkbrücke (4.14)

FIXME ungetestet :!:

apt-get install bridge-utils
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

/etc/network/interfaces:

iface br0 inet static
    address 192.168.40.1
    netmask 255.255.255.0
    bridge_ports lan1 lan2
    bridge_fd 5
    bridge_stp no
vlan

4.14:

/etc/network/interfaces:

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
bpi-r2/software.txt · Zuletzt geändert: 2023/06/08 17:06 von 127.0.0.1