[BPI-R3] [BPi-R3-Mini] Imagebuilder R3 ArchlinuxArm, linux-rolling-stable

ALERT!!!

Upgrading systemd will break router function (disable ipforward)

Edit:

For me this is not really so clear that it will break my setup, but the title of this does:

NEWS: mention backward incompatibility of IP forwarding by yuwata · Pull Request #33018 · systemd/systemd (github.com)

So, when relying on the IPForward=yes setting in one of the .network files to enable global IPv4 forwarding, your setup will be broken. This is the case with my (previous) default setup.

Actually this one is also very interesting:

And there are still issues concerning ipv6…

Temporary fix for this:

echo 1 | sudo tee /proc/sys/net/ipv6/conf/all/forwarding

/etc/sysctl.conf (iirc) does not work?

There is also sysctl command to show and set temporarily,no need to use procfs

Sure they will work, but I’ll try to keep it in systemd-networkd files.

IPv4 forwarding need a new setting in all interfaces where forwarding should be enabled. Then it can be left disabled if one wants to for other interfaces.

IPv6 forwarding only can set globally.

Edit:

Until now I have managed to put all network related settings in /etc/systemd/network so that I can easily maintain different versions of this folder for different network setups. See:

https://github.com/ericwoud/buildR64arch/tree/main/rootfs/network

The systemd-networkd solution of this ipv6 problem is in /etc/systemd/networkd.conf, so that will complicate this a bit. I will solve this using a symlink in /etc/systemd/networkd.conf.d/ later today (will be added by the build-r64-arch-utils-git package, that I will rebuild tonight).

So when upgrading archlinuxarm, you’ll need to edit some settings manually. This is really only needed for RouTer network setup. If you have chosen AccessPoint network setup, you are not using IP4/6 forwarding and are not affected by the recent change in systemd-networkd. Because these are user-settings, I will not automate this fix. On fresh installation using the buildR64arch script, this is not needed.

Edit the two files, using sudo nano <file>:

/etc/systemd/network/10-eth1.network
/etc/systemd/network/10-brlan.network

If on BPI-R64 10-eth1.network is not present, then check 10-wan.network.

Remove in these files under [Network] (if present):

IPForward=yes

And write under [Network]:

IPv4Forwarding=yes
IPv6Forwarding=yes

Create a new systemd-networkd global setting:

echo -e "[Network]\nIPv6Forwarding=yes" | sudo tee /etc/systemd/network/networkd.conf

A symlink to it will be created by upgrading build-r64-arch-utils-git.

So finally upgrade all packages:

sudo pacman -Syu

The result will be the same as a fresh install, from ipv4/6 forwarding point of view that is.

Hi, I flashed bpir3-sdmmc-rtnosfp.img.gz. I works fine. How can I enable wlan1 (wifi 5Ghz)?

I haven’t really used 5Ghz wlan1 on the R3 at all until recently.

A few days ago, I also noticed that it sometimes stops functioning quite soon when the first client connects. Then

iw dev

is not showing the SSID anymore (or it wasn’t showing at all from startup?).

Temporarily can fix it by restarting hostapd:

systemctl restart [email protected]

I believe you are experiencing the same. I have not gotten to looking for the root cause of it yet. Since I haven’t really used it myself, I can also not say since when this is an issue.

Maybe service is not enabled so not starting at boot? Or regulatory domain not setup at this point?

I’ not sure exactly yet, but only restarting the service will already fix it. It seems stable after it happens and restarted once.

I am pretty sure that the service is enabled… The build.sh script does this automatically.

Maybe there is a message in dmesg or journalctl -r that is usefull, but haven’t dived in to this.

I was experimenting with hw_offload wlan and moved to 5Ghz to test higher byte rates. I want to finish hw_offload first, but my time is very limited and I need to spend some decent amount of time on it to test properly.

I have to say, the last 3 days, not having changed anything about wlan, I have rebooted the R3 and not experienced it. So it may be a timing issue, something is not set up in time, reg domain? But this is purely guessing…

Could try:

sudo nano /etc/systemd/system/[email protected]

And change:

After=network.target

to:

After=graphical.target

And reboot. That should delay starting hostapd a bit, just to see if this helps…

Wlan1 is enabled by default and starts. Had to use channel 36 and not 149 in the wlan1.conf file. Seems to be working fine so far.

Thanks for the info. I still cannot re-create the fault I experienced… To be continued…

Hi. My understanding is that just flash the img bpir3-emmc-rtnosfp.img to the emmc using dd if=bpir3-emmc-rtnosfp.img of=/dev/mmcblk0? I didn’t boot from emmc after flashing. Did I miss any steps?

Flash bl2 to boot0 and set partconf

Read the readme.

Only 1 of sd or emmc can be active.

I wrote a little tool to help, folloiw step by step.

Operation not permitted.

Yes, I know. I was able to flash Debian but not Arch linux.

Then copy the bpir.img.gz to the SD card /tmp/ folder. It is accessable without root.

If using a pre-build image, rename it to bpir.img.gz

Boot the R64/R3 with the SD card with UART connected. When kernel starts keep ‘shift E’ keys pressed. When finised, you can reboot.

You can keep ‘x’ pressed instead if you want to enter a busybox ash.

Note for R3: To run on EMMC, only the switch most near to powerplug (D) should be down, the rest up. This is different from the normal switch settings. It is done so that you do not need mmcblk0boot0.

Just read the readme and follow step by step.

I really cannot make it more simple then this.

Thanks a lot. Good to know. I have already booted.

After=graphical.targe - won’t start hostapd at all. I have also noticed that sometimes wlan1 goes down and a restart helps. It rarely happens, but it does happen. I tried to tune the 5GHz WiFi, but I can’t get a traffic higher than about 26Mbps. I got about 100Mbps with Openwrt. WiFi 2.4GHz reached about 50Mbps with Arch Linux.