[HH] proprietary CPUs

Tom Metro tmetro+hhacking at gmail.com
Sun May 27 15:37:21 EDT 2012


Bill Bogstad wrote:
>Federico Lucifredi wrote:
>>Tom Metro wrote:
>>> (This is one of the reasons you can't run FreeBSD on consumer routers.)
>> Do you have a specific example?
> 
> I suspect Tom was thinking about the prevalence of binary blobs for
> wireless chips rather then video in this case.

Correct.

(There may be other hardware peripherals, like Ethernet and the built-in
switches, that similarly use binary drivers.)


> Consumer router manufacturers who do provide the Linux source for
> their software never seem to provide the wireless drivers in source
> form.

So I wonder why this situation doesn't result in a GPL violation. These
are kernel modules, not user-space drivers, right? (I know some of the
proprietary bits are command line tools for configuring peripherals, but
I can't see how the absence of those would be a show stopper...unless
the open source drivers conveniently lack the steps to initialize the
hardware.)


There are some parts of this situation that don't add up.

To my knowledge, I've never seen a consumer router capable of running
FreeBSD. (There are a bunch of OEM-style boards, like the PC Engines,
RouterBoard, etc., where FreeBSD is available.) The lack of full
source/documentation is the reason I've seen given.

OpenWRT is supposed to differentiate itself from the other third party
router firmwares by being a "built from scratch" Linux distribution,
unlike all the others, like Tomato and DD-WRT, that are based on the
vendor's distribution. I thought this also meant that OpenWRT didn't
make use of proprietary binary drivers. And this was why it had been
ported only to a much smaller subset of routers.

If that's accurate, then it implies that at least some of the consumer
routers have full source available. Which then raises the "why no
FreeBSD then?" question.

Here's the relevant bit from the OpenWRT wiki:
http://wiki.openwrt.org/about/history

  OpenWrt uses official GNU/Linux kernel sources and only adds patches
  for the system on chip and drivers for the network interfaces. The
  developer team tries to re-implement most of the proprietary code
  inside the GPL tarballs of the different vendors. There are free tools
  for writing new firmware images directly into the flash (mtd), for
  configuring the wireless lan chip (wlcompat/wificonf) and to program
  the VLAN-capable switch via the proc filesystem.

That implies that "most", but not all, proprietary code has been replaced.


Another factor is that most consumer routers run a MIPS architecture CPU
(at least true for Broadcom, Atheros, RaLink, and Infineon which I'd
estimate covers about 90% of all consumer routers made before 2011; See
the OpenWRT hardware table: http://wiki.openwrt.org/toh/start). Is the
problem that FreeBSD hasn't been ported to MIPS?

If you look on the Linux side, there is a site dedicated to MIPS support:
http://www.linux-mips.org/

which specific pages for the major CPUs:
http://www.linux-mips.org/wiki/Broadcom_SOCs
http://www.linux-mips.org/wiki/Atheros_SOC

Over on the FreeBSD side I find:

FreeBSD/MIPS Project
http://www.freebsd.org/platforms/mips.html
  Status
  MIPS is a Tier 3 architecture, and as such is currently regarded as
  experimental. It is not supported by the FreeBSD project.

http://wiki.freebsd.org/FreeBSD/mips
  MIPS32
    * Atheros/mips24k support:
          o AR71xx, AR724x, AR913x SoC boards are supported, including
            integrated switch devices
    * Specific boards (non-exhaustive):
          o Ubiquiti Networks Router-Station
          o Ubiquiti Networks Router-Station Pro
          o TP-Link TL-WR1043ND
          o Mikrotik RouterBoard RB450G


Broadcom MIPS progress
http://freebsd.1045724.n5.nabble.com/Broadcom-MIPS-progress-td4198131.html
(The post itself isn't too interesting and just talks about getting some
bits of hardware working.)

Atheros MIPS CPU Reverse Engineering Page
http://wiki.freebsd.org/AtherosMIPS
(Not really anything on the page except a list of CPUs and specs.)


So the impression I get is that while MIPS support is still immature on
FreeBSD, it does sound like they are largely being held back by the
proprietary nature of thees CPUs.

However, the info about suggests that they have had some success with
router SoCs, so where are the ready-to-load firmware binaries for
FreeBSD? Is the above misleading, and the code is really in too rough of
a state to be useful yet? (i.e. non-functioning wireless)


Now there is a trend towards ARM-based router CPUs. FreeBSD seems to be
better supported on ARM, but that probably won't make much of a
difference if the new SoCs continue to keep a bunch of their peripherals
proprietary.

 -Tom




More information about the Hardwarehacking mailing list