Hello,
I've been using OpenWRT on a Nexx WT3020 for a while. But the OpenWRT image got bigger and bigger over time and I decided to move to something more flexible.
I decided to go the custom way with a Raspberry Pi basis.
I bought a DFRobot router mini carrier board : https://www.dfrobot.com/product-2242.html
This board was initially designed for Compute Module 4.
I also bought a CM5 with 16Gb eMMC, 2Gb of RAM and embedded WiFi.
I installed Raspberry Pi 5b image, adding the missing dtb files, changing the config.txt and cmdline.txt to get the console redirected to the UART. I also added the missing modules to get the RTL8111 chip working.
I get boot, prompt, and RTL8111 recognised by the system.
Now my issue : I can't reach LuCi interface from the computer. In fact it seems there is no network communication between OpenWRT and the computer. While OpenWRT IP is 192.168.1.1 for BR-LAN, the computer selects another IP after a while like 169.x.x.x. Even manually setting the computer's IP to 192.168.1.2 does not change anything.
I'm now trying with plain Raspberry Pi 5 image with no modification (so RT8111 is not recognized), just modifying the config.txt and cmdline.txt to get the console over UART and using the correct dtb file. Situation is the same. This same image works fine on a Raspberry Pi 5.
Chip is the same between CM5 and RPi5 so there should be no difference.
Once the cable is disconnected, OpenWRT reacts saying the port is in disabled state, and gets in forwarding state when the cable is plugged in again which makes me thinking that there is no HW issue.
The RJ45 cable works fine as well.
brctl show br-lan is associated to eth0 which is the port I'm connecting to.
I'm now quite stuck here in my debugging becaus I don't know where to search next.
Could someone more experienced provide assistance ?
Thanks !
In addition to previous tests, I tried the Raspberry OS lite image and was able to connect the network, apt update and upgrade, from both ethernet ports of the carrier board. I think this eliminates hardware incompatibility topics and let us concentrate on SW issues.
So I guess there is one configuration somewhere which should differ between RPi5 and CM5.
Did you ever have any luck getting things working? I’m trying to get the same combination of hardware up and running and have hit the same roadblock as you.
Hello Dave,
Yes, it runs since about one week or a bit more. I just have a few issues with WiFi I have to check:
- I use Wifischedule and it does not work, I have to figure out why
- Embedded WiFi does not work on automatic channel selection, I suppose this to be due to close source driver or something like that
- In the same idea, I did not manage to activate both 2.4GHz and 5GHz networks at the same time
I have to post a request on how to submit the changes to have them added in the mainstream repo. I'm new to development and all that stuff.
I made an overlay as well to have an LED indicating the WiFi activation, and a button to turn WiFi ON and OFF. Both connected to GPIOs. They both work fine in Raspberry OS so they should work in OpenWRT. I'm just missing the wireless trigger to connect to the LED. But I'm quite close, it is just a matter of time.
Florent, did you do anything special to get the onboard Ethernet working on the Raspberry Pi 5 CM? Ethernet on the carrier board is working fine for me, but the CM’s Ethernet port will show the link is up with a cable connected but no traffic passes through it. No interrupts shown for the built in Ethernet port either in /proc/interrupts FWIW.
Hello Dave,
Yes, I made very few modifications.
I faced the same issue as you. I commented out the following lines in bcm2712-rpi-cm5.dtsi :
interrupt-parent = <&gpio>;
interrupts = <37 IRQ_TYPE_LEVEL_LOW>;
They are not present for Raspberry Pi 5B and it works as is. But they are present for Compute Module 5 in Raspberry OS and it works fine as well. So I don't know why we have those differences. I supposed there was a kernel change between the version used by OpenWRT (6.6.73) and Raspberry OS last revision. But I found nothing related to this.
I also added compute module 5 support in target/linux/bcm27xx/image/Makefile, in target/linux/bcm27xx/base-files/etc/board.d/02_network and target/linux/bcm27xx/base-files/lib/preinit/05_set_preinit_iface_brcm2708
I hope this helps
Just an update from my end — everything looks to be working well after I got the .dtb file corresponding to the 6.6.x kernel version.
I opened a PR to include the dtb files and the changes you mentioned to the two network files. Hopefully that’ll get accepted and we’ll have official support for the CM in the stock builds then.
Nice to have your feedback and see you got it working.
Thank you so much for opening the PR, I had no time to do it up to now.
Hi, I just received a waveshare cm5 dual eth mini today (https://www.waveshare.com/cm5-dual-eth-mini.htm), and I'm also struggling to boot the CM5 in it.
@dave-atx do you mind sharing the dtb so I don't have to build it from source and just check if I can get it working?
EDIT: usb Serial also doesn't give any signal, but works well during usb mass storage mount in pc.
EDIT: solved the serial issue, and dtbs are available below, in case someone else wants to try:
And here’s the direct GitHub link for those on 24.10.x looking for the dtbs. The bcm2712-* ones are the relevant files that need to go into /boot.
Wifi was not working for me, and this was in my dmesg:
[ 8.546550] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,5-compute-module.bin failed with error -2
[ 8.577260] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.txt failed with error -2
creating this two lns seem to made it work, but still need to test a little more:
root@OpenWrt:/lib/firmware/brcm# ls -lah | grep 5-compute
lrwxrwxrwx 1 root root 31 May 4 19:01 brcmfmac43455-sdio.raspberrypi,5-compute-module.bin -> ../cypress/cyfmac43455-sdio.bin
lrwxrwxrwx 1 root root 44 May 4 18:59 brcmfmac43455-sdio.raspberrypi,5-compute-module.txt -> brcmfmac43455-sdio.raspberrypi,4-model-b.txt
My cm5 emmc with the waveshare dual eth cm5 board is idling around 7.2Watts with wifi and bluetooth disabled, seems a little bit too much. I have another cm5 with microsd using the cm5-nano-b only consumes 2.5Watts (running raspberry pi os).
Even if I unplug the ethernet ports, it never falls below 5.6 Watts.
@dave-atx or @Screwface2591 do you by any chance have a power meter?
Hello João,
I have measured up to near 4W during boot process. At idle with both ethernet ports connected and low traffic, wifi ON, I'm at 2,6W. When WiFi is OFF, in the same situation, power consumption decreases down to 2,36W.
This is for DFRobot router mini, but HW is very close.
In my case, USB is disabled but it should not differ too much when enabled.
Regarding your issue with WiFi firmware, did you check in menuconfig, in Firmware if the selection is correct?
Thank you so much for the detailed analysis.
I also checked with raspberry OS to see if it was just an issue with openwrt, it was a little better, around 6 Watts idling, but still double what it should have been.
The WIFI issue was solved, the missing symlinks in the /lib/firmware/brcm folder helped.
Yes, it should be close, it is the same RTL8111 chip, connected through PCI express, the same as the DFRobot.
Some weird thing I noticed. If I place dtoverlay=disable-wifi in the config.txt, the wifi firmware is still being loaded, and I can still enable/disable it in openwrt, but I don't know if disabling the wifi through config.txt is something that should work in openWrt. Something wrong is happening, probably disable-bt is also not taking effect and still consuming power, or something else.
I can check on my side if disable-wifi and disable-bt has effect. But the measurements I provided are without those overlays, so with WiFi and Bluetooth.
I don't remember if the serial console is still active on my build but anyway, this won't explain why you have double my power consumption.