It's possible, but depending on the driver you want to support you'd be doing a lot of work implementing the Linux API for your kernel. At which point, you've basically created an alternative Linux kernel.
this post was submitted on 01 Jan 2025
6 points (100.0% liked)
Operating System Development
196 readers
1 users here now
founded 5 years ago
MODERATORS
With the caveat that I've done some, but very little, kernel development -
NDISwrapper allows(allowed? Not sure if it's still used) Linux to use network drivers written for Windows.
So that kind of thing is certainly possible.
You would likely need to implement the relevant parts of the Linux kernel API as part of your translation layer, then map it (with additional translation code for compatibility) to your OS's native functions.
But it would certainly be a big undertaking.
Yes, this happens in Hurd and i think one (or some) of the BSDs in some way
I know there's a project for freebsd called wifibox which runs wifi drivers in a small linux VM for hardware that doesn't have native freebsd support