Hacker News new | ask | show | jobs
by weland 3868 days ago
> Why isn't OpenBSD more widely used?

For many of the scenarios you listed, it really boils down to peer pressure.

People who make decisions know that Linux is Good (TM). Convincing them that there is a better alternative for <this particular project> requires them to grasp technical concepts that they simply don't grasp.

And then you have a lot of programmers who know that <this operating they used> is Good (TM). Convincing them that there is a better alternative for <this particular project> requires them to have some broader, often theoretical understanding understanding of things, so that they can compare approaches and judge which one is better for a particular task. A lot of them don't have it; it goes against their belief that there is an operating system that is Good (TM). In fact, they'll go to incredible lengths to ensure that any operating system is like their Good (TM) operating system.

As far as IoT goes, though, hardware and software compatibility is always a problem. Most of them are built on tightly-closed SoCs. You're stuck with whatever the manufacturer wants to support, and that's usually Linux. I guess that partly boils down to the fact that, back when manufacturers started looking into this free operating systems niche, fitting Linux in 4 MB was a lot easier than fitting any BSD. But at the moment, why they'd jump (often imperfectly) through GPL's hooks is beyond me.

> It's hard to believe it's all politics or personality conflicts.

You poor soul :-).

2 comments

> As far as IoT goes, though, hardware and software compatibility is always a problem. Most of them are built on tightly-closed SoCs. You're stuck with whatever the manufacturer wants to support

Aren't most IoT products custom built and therefore the designer chooses the specs? I know that choice is limited to realistic availability, but some hardware that runs Linux also can run OpenBSD - I would guess that applies to IoT too, but maybe not ...

Unfortunately, while this is true in the server/desktop world, this isn't true for embedded systems.

Hardware that can reliably run OpenBSD tends to be in the more expensive space -- x86 or PowerPC based. There are exceptions, and OpenBSD supports them (see e.g. http://www.openbsd.org/armish.html , http://www.openbsd.org/octeon.html), but these are exceptional cases where you have some documentation of reasonable quality released by the manufacturer (or outright support for porting from the manufacturer), open-ish specifications and so on.

In the IoT (read: severely price-constrained) space, you don't get to work with this kind of hardware.

To give you just one example, most cheap router SoCs are based on a MIPS core with a bunch of peripherals around (basically they're a very glorified microcontroller). Porting OpenBSD on one of these requires:

* Supporting the MIPS core. This is ok at the moment, MIPS CPUs are supported.

* Drivers for the peripherals (which include e.g. the wifi radio). This is very hard at the moment. Most manufacturers don't open source their drivers. You get a binary blob and a wrapper module, a la what nVidia does, and the specs are closed, supposedly in order to protect "intellectual property".

* And a bunch of boilerplate information, like the device tree, because these systems don't have a BIOS. There's no standard regarding this aspect, which is why even compiling Linux for these platforms is pretty painful. You generally need the manufacturer's SDK, which varies in quality, albeit after a while that gets adapted into a set of patches that get integrated in a distribution like OpenWRT or Yocto. If you're really lucky, the manufacturer might offer a Yocto or Buildroot-based distribution. If not, you get a bunch of build scripts developed in-house, with hardcoded paths and comments written in Chinese.

You do get to choose the specs, but you're still constrained to what manufacturers offer you. The cheapest available things run only Linux and maybe, if they're based on a legacy, but important product, they'll run VxWorks. But you're typically confined to what the manufacturer gives you, and the manufacturer usually gives you Linux. On 90% of the hardware popular in the IoT community, even that Linux barely works. The amount of hackery (in the pejorative sense), duct tape and outright crap code I've seen in manufacturer-provided kernelspace code is horrific. E.g. there's at least one fairly popular SoC, used in a lot (tens of thousands, if not hundreds of thousands or even million) consumer-grade routers in whose drivers I've seen synchronization based on sleep()-ing, writing to hardcoded memory addresses and so on. Yes, in kernelspace code. You don't want to see userspace code.

Thing is, most IoT companies don't want to bother with this anyway. They want something that runs an OS their development team in SE Asia or Eastern Europe (full disclosure: I'm in Eastern Europe) already knows, and they don't really care about kernelspace or userspace code because, preferably, their development team will program it in PHP and JavaScript, since three of them cost less than one C programmer who will stare at the code and quizzically mumble "how the fuck does this even boot?"

(This also accounts for the can of worms that IoT security is. A security-minded programmer would need less than a week to find several disastrous security-related bugs in the SDK of basically every popular-ish platform.)

tl;dr IoT is built on cheap, low-quality hardware where you get whatever the manufacturer gives you, and the companies are OK with this because really, they just want a box that runs a web server.

Why are you typing "(TM)" after "Good"? I've seen other examples of this. Phrases like "A Good Thing! (TM)" or "Good (TM) Distribution". What does it mean?
It "sloganizes" the phrase before it to prop it up as somehow official/authoritative (as though it were trademarked), often with ironic intent. In this case, "People who make decisions know that Linux is Good™" indicates an idea with mindshare and hints at an underlying dogma or cliché.
Yep, what ics said :-).

Basically, I think OpenBSD is a good operating system. It has a clean architecture, great code quality, and I am fond of its engineering principles.

I don't think it's Good (TM) -- there are things that other operating systems do better, and I don't think its engineering principles apply everywhere.

I admire its design, but I don't try to emulate it in any system I build.