[Solved] OpenWRT 18.x and 19.x on Raspberry Pi boards - generic USB Ethernet and WiFi drivers compilation & support request

Hi,

I own a few Raspberry boards, including Pi Zeros (the simple ones without WiFi) and since finding an OpenWRT compatible router has become so hard (literally - archeology & investigation in the IT shops and online), I started considering using some of these boards as routers.
I found & used the images available here:
https://openwrt.org/toh/raspberry_pi_foundation/raspberry_pi
and learned that the kernel built for the Raspberry target is really limited, doesn't have support for any external USB Ethernet & WiFi adapters.

Since the Raspberry Pi needs a SD Card to boot the OpenWRT, and you cannot find such a SDCard smaller than 16GB these days, wouldn't be appropriate (useful,wonderful,extraordinary) to compile the kernel (actually the modules) with support for all the USB networking adapters (ETH& WiFi, maybe even BT)?
I doubt the modules will add more than 50-100MB to the image size.
For example, the Atheros athx modules are useful for many WiFi USB adapters, then there are many cheap USB Ethernet adapters using Realtek chipsets (r8152 kernel driver), etc.

I know I can build my own OpenWRT image and I also tried it once and failed (OpenWRT 15.x), due to some distribution specific instructions and dependencies (Debian/Ubuntu). Not really interested to try it again and I believe it'll be also beneficial for OpenWRT to improve the support for SBCs, not only Raspberries. Especially now, with the upcoming version 19, which will wipe the support for all 4/32 routers, and again regarding how difficult has become to find/obtain OpenWRT compatible routers.

Thanks!

... just noticed, I should have maybe opened this thread in a different forum section. Sorry if that's the case, please move it where it belongs (not in the trash! :wink: ).

  • For Developers

  • Hardware Questions and Recommendations

When doing something like this... one faces the challenge of where to stop... and what is considered "commonly required" vs "bloat"...

Being an sdcard only device... it is pretty much in the same "category" as x64/x86 in terms of storage management and packages... And the vast userbase on that target is not "calling" for "full-feature" builds...

Traditionally you have the option of;

  1. Post install scripts
  2. Use Image Builder or the buildroot

If such an option was to be implemented... I see possibly and option within the build systems.... for "choose full featured package set"... which may include an extended selection of core tools / packages... but with drivers its still difficult to know where to draw the line... or such a simple mod could likely be achieved with one or several "config.seed" flavours which people can use / extend / share etc.

So... do I see some scope for "fuller-featured" [selectable] builds for targets that have large storage by default... yes. Devising a "common selection" is likely more of a political debate than a technical one.

That is slightly exaggerated, there are plenty of easily world-wide-obtainable devices supported by OpenWrt. Yes, depending on your budget and requirements it makes sense to investigate thoroughly, but there aren't many circumstances where an RPi would be a better or considerably cheaper solution than a more target specific router (ath79, lantiq, mt7621, ipq40xx, ipq806x, mvebu, … come to mind), now if you had said x86_64 instead of RPi I might have agreed (towards the higher end of spectrum).

Where to start, where to stop (keep in mind, OpenWrt doesn't have a concept of autoloading modules, all installed modules will be loaded on boot --> RAM usage). /lib/modules/$(uname -r)/ on a typical x86_64 desktop distribution is almost 250 MB in size (uncompressed, xz compressed this goes down to around 45 MB). OpenWrt is not a desktop distribution, nor does it attempt to be one - the situation isn't any different for OpenWrt's x86/ x86_64 images either.

Which ones?
The RPi doesn't have PCIe lanes, so you can't refer to ath5k, ath9k or ath10k, leaving only USB (or SDIO, but you need that for your sdhc card already). The only USB wireless chipsets designed by QCA-Atheros would be ar5523 (802.11g), ar9170 (802.11draft-n), ar9271/ ar7010 (802.11n) and QCA9377 (802.11ac), neither of the earlier ones have been produced in years and QCA9377 (Linksys WUSB6100M) is very rare.

1 Like

@anon50098793

I do understand the concern about what is considered "commonly required" vs. "bloat" and I'd focus, at least for the Raspberry target (or SBCs in general) on the commonly available USB devices.
Generally, enable all of them available in the kernel config.
Specifically, or just for orientation, there is a list for Raspberry (focused on what the upstream Raspberry kernel already provides (has enabled - compiled)):
https://elinux.org/RPi_USB_Wi-Fi_Adapters
https://elinux.org/RPi_USB_Ethernet_adapters

On your other points, my view is that the SBCs are increasingly popular and OpenWRT should become a solution to turn them into routers/GWs, without too much effort. I believe it's also beneficial for OpenWRT's popularity/adoption and the userbase for the SBCs targets won't mind about some extra MB of drivers and would be definitely happy to have connectivity support out of the box.
Sorry, I can't follow your "full-feature builds", I'm only focusing on the kernel here with my suggestion, in English, providing the initial connectivity for allowing the user to develop.
I loaded OpenWRT on a PiZero (without WiFi) and got stuck on how to add some extra drivers & packages. Then I loaded OpenWRT on a Pi2B, had connectivity (local LAN) and wasn't able to get on the Internet to use opkg, grab the driver (don't know if it even exists) for the second USB Ethernet adapter I had connected (r8152) and wanted to define as WAN.
On building OpenWRT myself, it's not really easy and I sincerely wouldn't bother, I'll go for a full-fledged Linux instead.

@slh
I didn't know OpenWRT cannot autoload modules, sorry, this is really bad...still plenty of RAM available to load them all. The 5USD Pi Zero comes already with 512MB RAM.
On the USB athx drivers, I just cannot follow your arguments.

# lsusb
Bus 001 Device 004: ID 0cf3:9271 Qualcomm Atheros Communications AR9271 802.11n
...
# lsmod | grep ath
ath9k_htc              69632  0
ath9k_common           16384  1 ath9k_htc
ath9k_hw              454656  2 ath9k_htc,ath9k_common
ath                    28672  3 ath9k_htc,ath9k_hw,ath9k_common
mac80211              659456  1 ath9k_htc
cfg80211              569344  4 ath9k_htc,mac80211,ath,ath9k_common

On how hard is to get an OpenWRT compatible router these days, in the range of 50-80EUR (actually not even the expensive ones with many antennas were compatible - mainly Asus), the next time I go and "exasperate" the personnel at an IT shop (big store), I'll take you with me. I'll also pay you a lunch & beer after you teach me how to obtain the firmware version from an online shop :slight_smile:
The last time, some weeks ago, out of the 20-30 models they had exposed, none was compatible. I spent there almost an hour with the OpenWRT compatibility list displayed on my phone, reading firmware versions on the boxes and getting confused about the new TP-Link Archer A5 & A7 & co models (plenty of them). The firmware versions for the 4/32 routers I knew working were too new and a few other "smarter" routers were under development - found them here in the forum, not yet fully supported.

Can't be that hard if I can find one in under a minute online.

Assuming it's still a v3

These were selling for as low as £23 a few months ago, as I recall, though that killer deal has since gone.

1 Like

So, you want to qualify for a free lunch? (and a beer)
Should i call Amazon and ask them to tell me what's written on the labels (box/router)
:slight_smile:

EU "right of return" -- for example https://europa.eu/youreurope/citizens/consumers/shopping/guarantees-returns/index_en.htm#shortcut-3

In the EU(In this case, the 28 EU member states + Iceland, Liechtenstein and Norway) you have the right to return purchases made online or through other types of distance selling , such as by phone, mail order or from a door-to-door salesperson, within 14 days for a full refund . You can do so for any reason – even if you simply changed your mind.

Edit: Even cheaper through Amazon.es

image

I know, I'm in the EU and annoyed a few already with returns ... and waited (usually) more than 2 weeks for the refunds.

Well, I expressed my view & suggestion. It's up to the devs to make up their minds.

I'm happy with OpenWRT for simple GW/routers and I wish I could use it also on SBCs, hope also that this would be beneficial for other users and ultimately for the future of the OpenWRT Project.
ATM I'm loading full Linux distros on my Raspberries just to do simple NAT/VPN/routing and I don't have the nice LuCI available...

Brushing up on some basic networking skills or package installation commands can seem like a bug hurdle. If your willing to spend hours in a shop reading serial numbers... I'm curious as to why this poses such an impediment.

Bloat for all as a solution for one may be unreasonable. As is the assumption that;

Using imagebuilder or the buildroot is a much simpler undertaking than "installing full blown linux", let alone configuring it.

It really sounds like you're trying to reinvent the wheel. Those 'bare' SBCs tend to be pathetic networking devices, especially when it comes to routing performance. And then there's the wireless everyone wants but needs to buy adapters for.

You have a valid argument when you say it's not easy to get a router that actually supports OpenWrt; there's quite a few threads in this forum though that talk about cheap, supported models. The way to get an OpenWrt supported device is to read up before purchasing, not the other way around.

My first router had a Broadcom SoC. I was lucky to get to load OpenWrt onto it. All my newer routers or APs, however, have been devices with known full OpenWrt support (be it stable or master).

1 Like

Tangentially:
Have you actually gotten them for that price? The cheapest offers (take 1, only) I've seen so far are around 15 EUR[0] (including 19% VAT, aside from taxes you can assume 1 EUR ~= 1 USD), plus a fiver for an sdhc card, plus a tenner for a PSU - that's before even thinking about a USB hub, USB wireless (which is generally 'not good' for AP mode) and USB ethernet card(s) and an ethernet switch for your LAN. Even new, decent low-end routers with full OpenWrt support start at ~20 EUR new/ delivered to your doorstep.

--
[0] and the only interesting specimen for these tasks, the RPi4 with native USB3 is far beyond that price

1 Like

I need a solution that I don't need to maintain myself anymore, that's why I spent time looking for a compatible router. LuCI does the job well for users that are not *nix experts.

Your opinions were already addressed in the previous posts in which I also took you serious. My mistake.

1 Like

My point was to improve the Raspberry images, make them usable. Only one argument was about the scarcity of compatible routers.

A 20 EUR low end router is pretty useless.
For 20 EUR I have a raspberry Pi Zero (incl. onboard WiFi, case and SD Card) that can handle a 6-8Mbit 128bitAES VPN link and I can hook it in the internal LAN as a VPN Proxy. For 5 EUR more I can also get one of those cheap USB Ethernet adapters and turn it into a Wireless Router.

Anyways, the topic was about something else. Improving the Raspberry Pi image(s).

Since I use the work you good people are delivering, OpenWRT, and care to respect you for that. Noticing this thread is turning into a typical useless discussion, I'll stop and put in on resolved.

Keep doing your good work on the router images, keep focusing on them, forget the "SBCs - pathetic networking devices" and ... also keep the actually useless Raspberry images available.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.