OpenWrt One / project update

Daniel Golle daniel at makrotopia.org
Thu Apr 11 06:20:45 PDT 2024


Hi Ivan,

On Thu, Apr 11, 2024 at 10:15:58AM +0000, Ivan Ivanov wrote:
> > there are no Wifi-5+ chips on the market that can run without blobs
> 
> This is true, but at the same time - undoubtedly - some chips are more
> likely to be liberated from blobs than the others. Some WiFi chip may
> have been partially researched (i.e. someone tried to reverse-engineer
> its binary blob) or at least a detailed-enough public PDF datasheet is
> available so that its clear how the hardware operates, while some
> other WiFi chip may lack these advantages and even use a firmware
> signature that prevents the binary blob replacement by the opensource
> alternative.
> 
> What I am afraid of, and what forces me to write e-mails like this
> once-in-a-while - is a POSSIBILITY that OpenWrt One project has not
> taken this "liberation-potential" into consideration while choosing a
> chip for a new router - and as result, it may turn out after that
> OpenWrt One project becomes popular and the people would like it to
> become blobless (i.e. by some crowdfunding initiative), but then find
> out it impossible to liberate because of some technical limitation
> like that firmware signature.

We are well aware of that and of course would appreciate any efforts
towards a blob-less system. The advantage of the chosen MT7981+MT7976
chip combination is that it is generally well-understood and people
of our community have been working with the vendor (MediaTek) to write
a high-quality WiFi driver for it. It this moment, this is definitely
as good as it gets, the situation for all other modern WiFi chips is a
lot worse. For this SoC we are going to have open source datasheets
which cover most parts. We already got an Open Source implementation
of the ARM TrustedFirmware-A as well as U-Boot (see DDR4-exception
below, however).

> 
> > Could you please list the wifi chips you know of which ether have
> > a) completely open source firmware, or
> > b) no firmware at all (neither loaded in ram, nor in internal flash)?
> 
> The best WiFi hardware capable of working on 100% opensource, I am
> aware of and using at the moment, is based on the chips of Atheros
> ath9k / ath9k_htc families:
> 1) Netgear WNDR3800 router, SoC : Atheros AR7161 rev 2, yes it is
> 802.11n but it supports 5 GHz, and my ISP is slower than 300 Mbps in
> any case
> (bought it locally but you may visit this page for a more complete
> description - shop [dot] vikings [dot]
> net/product/wndr3800-wlan-router/ )
> This router runs on LibreCMC (fork of OpenWRT to designate the routers
> which could work on 100% opensource) and its U-Boot is blobless too
> AFAIK

And here comes the next serious limitation:
You won't find *any* device using DDR3 or more recent and faster DRAM
chips which do not need to run proprietary code to carry out the
initial calibration of the DRAM controller. The DRAM consortium
enforce this with their patents and licensing strategies down to the
SoC companies. Literally *all* of them ever since DDR3 require such
blobs which have increased size with every generation of DRAM.

In case of MediaTek those blobs are neither obfuscated nor not signed,
they are merely compiled objects with a symbol table (which is probably
the most relaxed interpretation of those DRAM consortium rules, but
who knows, even the rules themselves are not public).

> 2) AR9462 MiniPCIe WiFi module, also 802.11n with 5 GHz support, for
> G505S laptop with a coreboot opensource BIOS
> (btw this G505S is the most powerful coreboot-supported laptop without
> Intel ME/AMD PSP backdoors, has a quadcore AMD and up to 16/32GB RAM)

AR9462 can't be bought new any more at this point in time.
I remember that TP-LINK had licenced some older QCA silicon and was
still building batches of it for a while, but even this is now more
than 5 years ago and I believe they have stopped doing that.

> 3)  There are also ath9k-based USB adapters which work on 100%
> opensource, but those with 5 GHz support are rare (haven't been able
> to find in the wild)

Also those you can't order or buy new anywhere at this point.

> 
> However, of course it does not mean that there is nothing newer than
> this "ath9k" that could theoretically work on 100% opensource without
> any blobs in userspace.

Sorry, but none of those blobs run in userspace. Userspace is 100%
built from Free Open Source Software for practically all
OpenWrt-supported devices.

What we do have are blobs which are part of linux-firmware and published
under a license which allows their free distribution, and those blobs
are uploaded to the WiFi chip itself, and they typically contain bytecode
which is run on the various built-in processors of those WiFi chips.

As you correctly stated, there isn't any post-WiFi-4 chip which does not
require such firmware blobs.


> A couple of years ago I've seen someone trying to reverse-engineer a
> newer chip's blob (think it was 802.11ac ), but a Google does not want
> me to find this page atm :P

They key factors which would allow reverse engineering here are:
 - known architecture and available free toolchain
 - the small the blob the easier

In case of the WiFi part of the MT7981 the total size of all blobs is
around 2.4 MiB. They seem to bytecode for different microcontroller
architectures, and this is a dual-band Wi-Fi 6 solution.

The blobs of a comperable Qualcomm/Atheros Wi-Fi 6 solution are about
3.7 MiB, that's more than 1.5x the size.

Imho much more important is the (publicly documented) interface to
the firmware once running: In case of MediaTek the functionality
covered by the firmware is quite minimal, while for literally all
other vendors the firmware is excessive and takes care of practically
all aspects of running an access point.

While it may not be completely up-to-date any more, I still recommend
to watch this talk given by Felix Fietkau in 2015:

https://www.youtube.com/watch?v=hiUosbhR0Wo


> 
> > And don't forget about the "bootROM", stored in silicon
> 
> BootROM is considered by Free Software Foundation as a part of
> hardware, + it is not as bad as those bloated&buggy binary blobs
> running at your OpenWRT space

There aren't any blobs running on the CPU inside OpenWrt, neither
in kernel nor in userland. This is a misunderstanding.


> 
> On Thu, Apr 11, 2024 at 9:51 AM Piotr Dymacz <pepe2k at gmail.com> wrote:
> >
> > Hi,
> >
> > On 11.04.2024 10:52, Bjørn Mork wrote:
> > > Ivan Ivanov <qmastery16 at gmail.com> writes:
> > >
> > >>> SOC: MediaTek MT7981B , Wi-Fi: MediaTek MT7976C
> > >>
> > >> Are these Mediateks capable of working without any binary blobs, at
> > >> least in theory?
> > >
> > > A simple question back to you: Could you please list the wifi chips you
> > > know of which ether have
> > > a) completely open source firmware, or
> > > b) no firmware at all (neither loaded in ram, nor in internal flash)?
> >
> > [...]
> >
> > And don't forget about the "bootROM", stored in silicon, taking care of
> > (among other things) booting the SoC from different media.
> >
> > --
> > Cheers,
> > Piotr
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list