router7 icon indicating copy to clipboard operation
router7 copied to clipboard

raspberry pi support ?

Open pengyunchou opened this issue 6 years ago • 6 comments

pengyunchou avatar Jul 17 '18 03:07 pengyunchou

I believe it can be quite challenging as the issue is raspberry pi has only 1 Ethernet port, and it's not 1Gbps either.

xinsnake avatar Jul 17 '18 04:07 xinsnake

At this point, I’m not looking to add any more supported platforms.

That said, I started development on a Raspberry Pi 3B with an Apple USB ethernet adapter, so it should be possible to run router7 in such a setup, possibly with a few changes. If you want to do the work, we can talk about getting pull requests merged to make this possible.

stapelberg avatar Jul 17 '18 05:07 stapelberg

With gokrazy/kernel change https://github.com/gokrazy/kernel/commit/88166bd9486e2273b8011c21d60a94ee5f850c79, the required kernel modules for router7 are now available.

So, if you change e.g. the image Makefile target: https://github.com/rtr7/router7/blob/12502113816c4f2a718e6dfea8469c5ad07ec0c1/Makefile#L14-L24

such that:

  1. GOARCH=arm64 is set instead of amd64 (for the Raspberry Pi vs. the PC Engines APU)
  2. -kernel_package=github.com/gokrazy/kernel
  3. -firmware_package=github.com/gokrazy/firmware

you should be able to run router7 on the Raspberry Pi just fine.


One caveat: even with the Raspberry Pi 4, which has a gigabit ethernet port as part of its system-on-chip, and USB3 ports to which you can connect an additional gigabit ethernet adapter, it proves tricky to get full gigabit speeds:

  1. using gokrazy.org, I get ≈500 Mbit/s: https://twitter.com/zekjur/status/1273513899187408897
  2. using Raspbian, I get ≈860 Mbit/s

The measured speed without the Raspberry Pi in the middle is ≈930 Mbit/s.

So, if your upstream connection is slower than 500 Mbit/s, running router7 on the Raspberry Pi 4 might be a good option for you.

That said, it’s still not a good option for me, so I won’t officially recommend doing so—if you’re willing to enter uncharted territory, let me know how it goes! :)

stapelberg avatar Jun 18 '20 17:06 stapelberg

Hi @stapelberg I think something like https://www.dfrobot.com/product-2242.html should work... if I can get my hands on a CM4 module, I will report back success (or lack of) here.

matthyx avatar Jun 08 '22 13:06 matthyx

Looks like a good option for the Raspberry Pi indeed. Looking forward to your report!

stapelberg avatar Jun 08 '22 21:06 stapelberg

For the moment it seems impossible to get one... maybe @geerlingguy can test it as a follow-up to https://www.jeffgeerling.com/blog/2021/two-tiny-dual-gigabit-raspberry-pi-cm4-routers

matthyx avatar Jun 10 '22 08:06 matthyx