Linux driver "wrapper" for more diverse hardware support?

There is a bunch of hardware that’s not supported by FreeBSD, and therefore won’t work in Haiku since it uses FreeBSD drivers, but is supported by Linux. One prominent example that I currently have sitting on my desk is the Broadcom BCM4312 LP-PHY WiFi card (14e4:4315). I’d love to install Haiku on the machine I have that uses that card, but without working WiFi, and insufficient means to replace the card, Haiku is… a bit useless to me. Therefore, I wonder if there’s any way Haiku might be able to incorporate a compatibility “wrapper” for Linux drivers, similar to the way it seems to have been done for FreeBSD drivers. Such a thing would save people in similar situations a bunch of headache.

This doesn’t have to only apply to network cards, either; I believe there’s a bunch of other hardware that Haiku doesn’t support because it restricts itself to using FreeBSD drivers. I vaguely recall that, in the past, one reason for not implementing Linux driver support was GPL licensing; I’d hate for something like that to be the one thing that holds back the possibility of truly diverse hardware support in Haiku. The OS is already so good in so many other ways.

2 Likes

You could install a USB wifi card?

GPL licensing is a problem - it’s incompatible with the haiku licensing (MIT). But it’s not the only problem.

2 Likes

If I had money with which to buy one, and any assurance that I could find one that’d ship to my location. The latter is because I’m in Hawaii, and around half of all sellers of computer components in the US refuse to ship to here or Alaska.

Of course, the other half of that is, I don’t know at the moment which USB WiFi cards are compatible. I’m operating under the assumption that roughly half of them won’t be. Even if I had money, I’d rather not take the risk of spending it on something that would turn out to not work. I’ve been burned in similar scenarios before.

I see. That’s disappointing…

2 Likes

From what I understand, it’s more of a technical issue than a licensing one. A lot of Linux drivers are actually MIT-licensed. While the GPL is a “viral” license, this only applies when you put the whole project together. If you take out the individual MIT-licensed parts and only use those, the MIT license is still the only license that you need to consider.

1 Like

The technical issue is that Linux has no stable internal API for this. Basically, by the time we have ported drivers from one version of Linux, a new version is out and they will have changed a lot of things, and the compatibility wrapper will need a not of changes. And the API surface is rather large (drivers can use whatever they need from all the little things hrovided in the kernel).

It may be easier to port the drivers one by one to Haiku, at least in the long term.

7 Likes

It is worth noting that some of the BSD actually do port linux drivers, FreeBSD uses amd gpu drivers from linux (in-kernel) and iirc some network drivers.

But also there is webcamd which plants some drivers for usb devices in userspace.

In my experience the gpu driver was constant kernel panics and not useable to me as a result while webcamd was mostly fine (userspace drivers normally can’t crash your system)

So some of this is possible inspite of the API/ABI, but would require the dev to either port a fixed version and hope to not have to do it again or follow linux kernel development and adjust the compat layer when the source interface changes.

That’s a quirk of open-source code licensing that I didn’t know about. Interesting.

I see. I guess I wasn’t fully aware of exactly how often things get changed/updated in Linux.

It does begin to look that way.

Interesting. I guess I’ve never looked deeply enough into modern BSD to know that.

So basically what PulkoMandy said. I see. Thank you all for the info.

12.- €uro

3 Likes

Yup. That’s how support for NVIDIA cards is in the works.

2 Likes