Pi in the sky V (Raspberry Pi 5 support)

These are commands you type (or copy-and-paste) into your terminal. The lines starting with # are comments and are not executed.

So to Download and update the sources:

  1. Type git clone https://git.openwrt.org/openwrt/openwrt.git and press enter.
  2. Wait until the operation completes. It involves downloading the sources so it will take some time.
  3. Type cd openwrt and press enter.
  4. Type git pull and press enter.

And so on for the rest of the commands, except for make menuconfig. This step will present a screen that allows you to pick which target and packages to build. The "Build system usage" page I linked earlier has a more detailed explanation:

When you open menuconfig you will need to set the build settings in this order (also shown in this order in menuconfig's interface):

  1. Target system (general category of similar devices)
  2. Subtarget (subcategory of Target system, grouping similar devices)
  3. Target profile (each specific device)
  4. Package selection
  5. Build system settings
  6. Kernel modules

You really only need to configure settings 1, 2, and 3, in that particular order. For the Raspberry Pi 5 you want to pick bcm27xx as the target system, bcm2712 as the subtarget, then pick the Raspberry Pi 5 target profile. You might also want to configure setting 4 to build and include LuCI into the image.


Looks like snapshot is now working again. I was able to install additional packages and install using ext4 custom image.

Modify cmdline.txt if you are doing usb boot install
console=serial0,115200 console=tty1 root=/dev/sda2 rootfstype=squashfs,ext4 rootwait

Modify config.txt if you want to turn off leds and ignore voltage warning

#turn off leds
dtparam=pwr_led_trigger=default-on # The default
dtparam=act_led_trigger=default-on # The default
#disable high current warning

I asked this question in another category and was advised to ask it here.

I've been trying to use openvpn on my raspberry pi 5 for a few days and can't get more than 50-ish mbps. I know it can go faster as I have connected to the same server on an x86 machine and got way higher speeds. I followed this page (https://openwrt.org/docs/techref/hardware/cryptographic.hardware.accelerators) to try and get it going faster, but I'm not seeing any change, even after a reboot. I installed libopenssl-devcrypto and kmod-cryptodev.

When I run "openssl engine -t -c" I get (and this isn't redacted)
(dynamic) Dynamic engine loading support
[ unavailable ]
(devcrypto) /dev/crypto engine
[ available ]

I also tried using "openssl speed -elapsed -evp aes-128-cbc" and "env OPENSSL_ia32cap=0 openssl speed -elapsed -evp aes-128-cbc" to test hw vs non-hw crypto speeds and they are nearly identical.

I'm pretty sure the pi has crypto acceleration according to this reddit post , though they probably were using raspberry pi os or something other than openwrt. I'm using the snapshot builds to do this. Do I need to recompile it altogether? The image builder appears to have the kmod-crypto-core and kmod-cryptodev modules selected in the .config file so I'm not sure what else I need to do.

I'm using openvpn-openssl if that matters.

Have you tried adding engine devcrypto in the client config?

I assume you mean in the openvpn client config. I just tried adding that and I get no change in performance. The logs also start showing "Note: OpenSSL hardware crypto engine functionality is not available", but that goes away when I reverse the change.

Yes. The setting should have went into the openvpn client config and I believe the error message is self explanatory

Edit. @dilio3 let's run the benchmark:

openvpn --genkey --secret /tmp/secret
time openvpn --test-crypto --secret /tmp/secret --verb 0 --tun-mtu 20000 --cipher aes-256-gcm

real 0m 0.79s
user 0m 0.54s
sys 0m 0.00s

The openvpn config is using aes-256-cbc if that matters. Those benchmarks look like this.
real 0m 1,20s
user 0m 0.95s
sys 0m 0,00s

3200/0.79 gives around 4000 so pi5 should be able to do a maximum of 4gbps openvpn under ideal circumstances with aes-256-gcm
And ~2.6gbps with aes-256-cbc

On a hunch, I looked into the Raspberry Pi 5's image builder and noticed that CONFIG_CRYPTO_HW is not set in the .config file. I think the default for that value is n, so that gives me to impression that the image simply doesn't have HW crypto enabled at all.

I'm trying to compile it with that enabled, but am running into other unrelated problems in the build process. Am I possibly on the right track with this or is it a red herring?

I think CONFIG_CRYPTO_HW is only for dedicated hw and that's not the case for rpi5 as there are only cpu crypto extensions enabled by default and that's working fine according to the benchmark above.

just fyi - some interesting hats that transform the pi5 into a real router (the ones that add +1 NIC) https://www.cnx-software.com/2024/03/08/pineberry-pi-hat-plus-boards-raspberry-pi-5-2-5gbe-gbe-m2-nvme/

I've been using a rpi 5 NVMe hat + M.2 to PCIe adapter + dual 2.5 NIC

1 Like

A better solution for 2.5gbps routing imo https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/602

1 Like

Is anyone having issues with today's build starting up? It keeps getting stuck on the Bluetooth module for me on boot.

Does anyone have a basic image that runs? I'd like to get this working on my Pi but I can't get the images from today to work.

How did you determine your Pi was faulty? What tests did you run? I am having issues with mine too and just want to make sure it is or isn't the actual board.

Does the issue reproduce the raspberryPiOS?

Downloaded today's snapshot, booted, and ssh'd in. Works for me. Noticed a welcome change to cmdline.txt. It's now using partition ids so I didn't need to manually edit my usb drive partition location. Nice.

Hmmm... How did you write the image? I was using Rufus in windows but maybe I need to boot up a Linux distro to write it.

Linux command line:
dd if=openwrt-bcm27xx-bcm2712-rpi-5-ext4-factory.img of=/dev/sdb bs=1M
Double check the destination partition...


None of the operating systems I tried would boot – Ubuntu, Raspberry Pi OS, OpenWrt, or even for firmware updates, the Raspberry Pi was unresponsive.

It was completely bricked.

I suspected an issue with the main power rail based on my limited electronic knowledge. I checked the integrated circuits and capacitors on the card with my fingertips for short circuits because a short circuit equals heat.

And I noticed that when I plugged in the power, the PMIC was suddenly heating up incredibly for a moment and then cutting off power. This made me realize that the card itself was faulty.

The rest is simple. They sent me a new one as soon as it was restocked.