en:bpi-r2:software
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
en:bpi-r2:software [2018/02/07 17:30] – frank | en:bpi-r2:software [2023/06/08 17:06] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Software ====== | ||
+ | ===== first steps ===== | ||
+ | download Operation System: | ||
+ | [[https:// | ||
+ | |||
+ | copy Image to SD-Card (Linux): | ||
+ | |||
+ | dd if=path/ | ||
+ | |||
+ | |||
+ | ===== Debian ===== | ||
+ | |||
+ | first boot (do this using [[bpi-r2: | ||
+ | |||
+ | **login:** root **password: | ||
+ | |||
+ | ==== System-Update & Clock-Settings ==== | ||
+ | |||
+ | apt-get update && apt-get upgrade | ||
+ | echo " | ||
+ | dpkg-reconfigure tzdata | ||
+ | |||
+ | some changes to environment (to make persistent: echo " | ||
+ | |||
+ | #fix for nano issues on debug-console | ||
+ | if [[ " | ||
+ | #prompt with time | ||
+ | export PS1=' | ||
+ | #easier access to GPIO by $GPIO | ||
+ | export GPIO=/ | ||
+ | |||
+ | |||
+ | ==== Network-Configuration ==== | ||
+ | |||
+ | [[.: | ||
+ | |||
+ | === temporary === | ||
+ | |||
+ | #4.4.70: | ||
+ | ifconfig eth0 192.168.0.10/ | ||
+ | route add default gw 192.168.0.5 | ||
+ | echo " | ||
+ | |||
+ | #4.14: | ||
+ | #ifconfig eth0 up | ||
+ | ip link set eth0 up | ||
+ | #ifconfig lan0 192.168.0.10/ | ||
+ | ip addr add 192.168.0.10/ | ||
+ | #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 " | ||
+ | |||
+ | === fixed (also after reboot) === | ||
+ | | ||
+ | 4.4.70: | ||
+ | |||
+ | nano / | ||
+ | |||
+ | auto eth0 | ||
+ | iface eth0 inet static | ||
+ | hwaddress ether 08: | ||
+ | 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: | ||
+ | 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: | ||
+ | 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: | ||
+ | #... | ||
+ | | ||
+ | auto lan3 | ||
+ | iface lan3 inet static | ||
+ | hwaddress ether 08: | ||
+ | #... | ||
+ | | ||
+ | auto wan | ||
+ | iface wan inet static | ||
+ | hwaddress ether 09: | ||
+ | #... | ||
+ | | ||
+ | in debian 9 hwaddress does not work, here you can set the MAC this way: | ||
+ | |||
+ | < | ||
+ | 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: | ||
+ | post-down ip link set $IFACE down | ||
+ | </ | ||
+ | |||
+ | UDEV-way from [[http:// | ||
+ | |||
+ | < | ||
+ | $ cat / | ||
+ | ACTION==" | ||
+ | </ | ||
+ | |||
+ | == DHCP == | ||
+ | < | ||
+ | allow-hotplug lan3 | ||
+ | iface lan3 inet dhcp | ||
+ | </ | ||
+ | |||
+ | == bridge (4.14) == | ||
+ | |||
+ | FIXME untested :!: | ||
+ | |||
+ | < | ||
+ | apt-get install bridge-utils | ||
+ | </ | ||
+ | < | ||
+ | brctl addbr br0 | ||
+ | brctl addif br0 lan1 lan2 lan3 #bridging lan1-lan3 (keep lan0 separately) | ||
+ | |||
+ | root@bpi-r2: | ||
+ | bridge name | ||
+ | br0 | ||
+ | lan2 | ||
+ | lan3 | ||
+ | </ | ||
+ | |||
+ | / | ||
+ | < | ||
+ | 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: | ||
+ | |||
+ | / | ||
+ | < | ||
+ | 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: | ||
+ | </ |