159 points · by teleforce · 5y ago · 94 comments
My hope is to make a somewhat minimal board for CM4 clustering. Eventually I will make a version with 4 CM4s and a single RJ45 jack, but I started with two CM4s and three jacks so I could test the ethernet switch independently of a CM4. And it turns out this board has some interesting uses too. I will break out both PCIe ports for the CM4s, so this board could have two intel wifi adapters plus three ethernet ports. It seems like that would make it a useful general purpose network thing. For example you could put a long range parabolic antenna on one wifi adapter and an omni antenna on the other and make it into a remote network access point (like a Ubiquiti Nanobeam connected to an AP). It should support VLANs etc as I will connect to the management interface on the switch via SPI or I2C.
However it is one of many projects I am working on, so I can't give a firm completion date. Microchip tells me they will ship me the ICs I need in a month, so it would be nice to have layout done by then. But we'll see.
Fork or star it on github to follow along. https://github.com/tlalexander/rpi-cm4-switch-board
Also if you have other thoughts about the design please share!
The comments on that Banana Pi board point that the SoC doesn't have any network specific features i.e. HW NAT, WiFi offloading and so it would be bad for a router.
That seems like a reasonable criticism and if so it could apply to RPi CM4 as well, AFAIK they don't have network specific accelerators. Are you planning to address this with some additional co-processors?
If you end-up adding network specific accelerators, Please do work with OpenWrt team as lack of HW accelerator support (WiFi offloading) unlike proprietary firmware is a major pain point.
Does this really matter? It only has 1Gbps Ethernet, so shouldnt software NAT be fine? I have a significantly less powerful router with no hardware acceleration, and its never been an issue to get maximum speed, though my connection is only 100Mbit (over-provisioned to be about 20% faster).
Even with OpenWrt there are forks which can make use of HW NAT and give proprietary firmware level performance but are closed source!
This seems like a Rev2 thing. I could get the basic system up and running without additional complexity. But I really like the idea of forks of my work so once I've proven the basic layout I'd be happy to collaborate with the community on improvements.
Do you have any more information on that type of hardware or suggestions on how to learn more? Maybe I should get on the OpenWRT mailing list and introduce myself.
Rpis are notorious for just dying though. You may want to consider something more robust. Don't know if it's SSD corruption or what.
I agree. OpenWrt's HW NAT support seems to be limited to mt7621 (i.e. At least upstream version).
Unless the SoC is purpose built for network computation I don't think they feature HW NAT, But open-source drivers for the SoC's which has HW acceleration is a bigger problem.
I think aiming for a good SW offloading is a more reasonable goal to start with, Which OpenWrt seems to be doing with MIPS based CPUs.
https://www.pishop.us/product/raspberry-pi-compute-module-4-...
The thing about industrial customers is that they are willing to buy whatever variant is available now for testing, spend a year doing design and integration, and then switch to the correct module for final system tests. I'm doing this with a project at work right now.
I could speculate that some hobbyist customers who might buy a raspberry pi would just as soon buy something else if they're just trying to learn electronics. So I would think commercial customers would be more resilient to delays than the hobby customers (as long as one or two variants are in stock to test).
And releasing 32 different variants of a new design during a global chip shortage seems reason enough for delays.
Frustrating though!
I'm actively looking for a CM4 board that will support hardware timestamp so that I can use a CM4 to build a NTP + PTP master.
I was hoping that I can built my own router with it, but so far it is still a learning process. Although, it is still fun.
The onboard mediatek wifi isn't usable but using a mini pcie ath10k supported wifi module has worked great.
It definitely wasn't easy initially tracking down info for getting things working. No argument there.
I'd be happy to share my OpenWrt build config for the r2 for anyone interested.
I had them on ethernet. Disabled wifi, verified they're getting enough power. And between 18-30 hours of operation, all the nodes will go unresponsive. A serial cable shows the machines up, but they lose all network connectivity.
There's nothing in dmesg. The networks are just dead.
It's not worth enough for me to troubleshoot them. They're terrible hardware platforms, badly supported, and garbage to use.
at least raspbian is very close to stock debian.
if trying to DIY your own router and you are willing to spend just a little bit more money, you can save a great deal of hassle with non-standard weird SOC-vendor-specific linux problems...
use an ordinary small x86-64 motherboard, put a 4-port intel 1000BaseT card in it, and run regular debian, or pfsense, or openbsd or something.
Debian supports the Raspberry Pi, best to avoid Raspbian.
Not knocking the Debian build, just wondering.
[1]: "This site is not an official Debian project. While the maintainer (Gunnar Wolf) is a Debian Developer, content herein provided should be considered unofficial. "
I can recommend the replacement, a PC engines board with four Gigabit Lan ports running OpenWRT.
So that should allow full speed switching (if not routing) without touching CPU, right? That'd be a welcome touch in a network box
It's not nearly as rare as all that, your basic OpenWRT-running 5-port router has the same setup. But those cheap SOHO routers aren't going to do really fast routing, because they typically come with very slow CPUs.
This board's Rockchip RK3568 looks pretty capable though.
IME, this kind of divided switching/routing setup became ubiquitous after gigabit became widely available. I remember that while buying my previous router (Cisco Linksys E4200), this architecture was advertised explicitly, and it was exclusive to E4200 in that generation of Cisco/Linksys routers.
The main firmware of E4200 was prone to crashing under some circumstances, so having a good network sans DNS was a good trade-off back then.
Both of which are a similar price point, and include a case by default.
Another is that I believe RPI-R2 can support the mainline Linux kernel with normal distributions (e.g. Ubuntu), do MikroTik and EdgerouterX support that as well in addition to OpenWRT?
Does BPI-R2 actually supports those distributions, or rather those distributions "can run" on that hardware? That's a difference. OpenWRT can be run on Mikrotik, yet Mikrotik doesn't support that. OpenBSD runs on Edgerouter, yet I doubt they support that. Will anyone that I will buy BPI-R2 from, fix my "normal distribution" if it fails to detect some hardware, or with a failed upgrade?
It's an awesome device but I think we are confusing a few important things here. Like the word "support" for a start.
But some do, or pay those samaritans to, and as a result you can definitely get boards (including this kind of 5-port switches) that run completely supported on a mainline kernel.
My home gateway is a Turris Omnia, supported in mainline for years. I run a plain Debian on it, works great.
Ebay or a licensed reseller (if there are any) should be easier anyways. I remember them requiring a VAT ID for EU customers. I ordered a couple for a small business so that was no problem back then but private individuals are pretty much out of luck.
Higly unlikely, though.
Until then: AVOID!
Wiki: https://www.fw-web.de/dokuwiki/doku.php?id=en:bpi-r2:start
In my case, the best compromise I've found, is to accept having a bigger a computer and recycle some older EliteDesk / OptiPlex or similar, which usually are very quiet and can take PCIe network cards. The thinner ones use low-profile cards, which can accommodate 4 ports.
Here's an example Atom system from another seller: https://www.aliexpress.com/item/1005002902302326.html
I'm happy with it.
The company didn't have a reasonable, up to date kernel. Everything was out of date, and they were seemingly incapable of doing it. MediaTek people stepped in, because the board was getting press as a reference for how people could use their SOC. It was still not usable as a router. For example, while there is WiFi on the board, there is no Linux WiFi driver, only an Android driver. And other weird things that I forget right now.
Maybe things have improved, but definitely take care on this.
I'd be super interested in a Pi with a few SDRs built in. Currently I currently play with a Pi with a bunch of USB SDR dongles jammed into it but wouldn't it be nice to have all the RF hardware and connectors built into the main board?
I am currently getting Vyos to run on it (I have nearly everything working, apart from the 5G module I have on the board).
That said, I think Vyos is in a state to support being run on this board as well, which would be cool.
Vyos looks interesting and might be my next setup when my ER4 runs out of oomph.
Remember for true AVB you're asking for network wide sync to the nanosecond with stream based traffic shaping and bandwidth reservations done in hardware accurate to those timings. It's all a real PITA to implement hence the price. That being said you can get a semi-reasonably priced switch like the MOTU AVB for <$500. If you need tons of ports the best way is going to be an older enterprise switch that supports AVB up for resale but beware you'll likely need the AVB license along with the hardware and it's an uncommon license.
Heaven would be any board that can run Debian and has 2 GigE NICs, and for psychological reasons $100 feels like a hard limit. Annoyingly hard niche to fill!
Not what I'd call affordable at $90 but the hardware and software abilities look promising.
It is a really good board hardware wise. And mainline Linux support is coming along pretty quickly.
You can check the Quartz64 development wiki for updates for that board, which should carry over to other rk3566/rk3568 boards too. Right now the major drivers that have not been ported are the hdmi output and sink output driver.
The blocker for me buying one of these boards is that firmware sources have not been published, so devs are still using u-boot from the soc vendor (rockchip). It isn't terrible, but I have high standards now that my rk3328 and rk3399 devices run mainline u-boot with open source boot firmware.
Most people's WAN uplink is in the single or maybe double digit megabit range.