Figuring out steps, please skip unless need back tracing. Used cheap SD card, 32 GB, on an Ubuntu 20.04 laptop, downloaded @frank-w r2-pro-ubuntu2204.tar.gz on Google Drive (May 24, 2022), untarred, then
sudo dd if=...img of=sd card block=4M conv=fsync status=progress
Unplug SD card and insert into slot powered off. Hold Maskrom and apply power to boot into SD. I plan to press the Maskrom every time, so… This image is wonderful, no heavy desktop overhead, the UART serial console is interactive, and the HDMI is presumably outputting another tty. No overzealous NetworkManager trying to claim every port it could find and do configs trying to show it knows better than the user.
I am using an M1 Mac Pro to access serial console. On /dev/tty.usbserial-1130, tried cu, screen, and minicom and finally settled on picocom
picocom -b 1500000 /dev/tty.usbserial-1130
Booted up the board and logged in.
Now my problems and solutions come
- try configuring an interface
ip link set dev lan0 up
ip addr add 192.168.88.140/24 dev lan0 (I am configuring Mikrotik too, so hence the 88 default choice)
ip route (shows the /24 subnet entry, OK)
ping 192.168.88.141 (MacOS, no response...)
Wondering what’s wrong, used tcpdump
tcpdump -i lan0 (the ping immediately responds?!)
Ctrl+C stops tcpdump capture and blocks the ping!
dmesg (says lan0 enters promiscuous state..., so need to enable eth1 promiscuous?)
Could this be a MAC address block that the eth1 port is rejecting frames that doesn’t match its MAC address? This behavior is not observed in the official Ubuntu 22.04 (provided by BPi, heavy version), but all interfaces have the same MAC. Try enable promisc on eth1
ip link set dev eth1 down (this brings lan0 down together)
ip link set dev eth1 promisc on
ip link set dev eth1 up (the route and addr are preserved)
ping 192.168.88.141 (now responds!)
- Try speed test a DSA port
iperf3 -s -p 5002 (on MacOS)
iperf3 -c 192.168.88.141 -p 5002 -t 300 (this image has iperf3 shipped with, continuous performance at 940 Mbps)
iperf3 -c 192.168.88.141 -p 5002 -t 300 -R (bad performance at 93.9 Mbps, driver problem)
This prompts the kernel upgrade exercise/figuring out stuff.
- Try use secure shell, side tracked by
service --status-all
shows sshd is running
ssh [email protected] (MacOS, yes to recognize fingerprint, default password kept rejecting)
cd /etc/ssh
vi sshd_config
PermitRootLogin yes (this is a bad practice, but in an isolated LAN, whatever, :wq, of course)
Now I could login via ssh with the same serial console username and password.
- Upgrade the kernel from 5.18 to 6.1 from Frank’s Github release (CI build 6.1 main 6.1.22, 04-02-2023). My first time dealing with Linux kernel upgrade. Before did some apt guided distro upgrade but probably doesn’t count. Downloaded linux-image-6.1.22…deb, linux-libc-dev and linux-headers 6.1.22…deb, Frank advised only linux-image is necessary, oh well.
scp *.deb [email protected]:/root/ (MacOS, again, might not want to write to the root home folder in a production device)
dpkg -i *.deb (unpacking... takes a long time, maybe I am inpatient, but should complete without errors and nothing seemed to happen after dpkg)
~~ apt -f install ~~ (useless command #1)
Now needs to modify the bootloader (?, excuse me on the terminology)
df (where is the /boot mount point?)
cd /boot (this just magically takes you to the /boot and now /boot could be found in df)
cd extlinux
ls (see the new 6.1.22 Image....gz and new 6.1.22 r2pro.dtb)
vi extlinux.conf
linux <replace with new 6.1.22 Image name>
fdt <replace with new 6.1.22 .dtb>
:wq
reboot (reboot seems to just turn off, to boot up again, you need to press reset while pressing maskrom because I have something in the eMMC I don't want to boot)
uname -r (I got 6.1.22)
Retry 2.
[usual promisc config exercise]
ip addr add 192.168.88.140/24 dev lan0
ip addr add 192.168.1.39/24 dev eth0 (another LAN segment)
iperf3 -s -p 5002 &
iperf3 -s -p 5003 &
iperf3 -c 192.168.88.140 -p 5002 -t 300 (MacOS, continuous performance at 940 Mbps)
iperf3 -c 192.168.1.39 -p 5003 -t 300 (from a second computer, Windows continuous performance at 890 Mbps+, not bad)
I also have an Intel AX210 and ip rule, ip xfrm, and strongswan to get working before I will achieve what I have planned to achieve with this $107 board.