Is it possible to use Linux USB drivers on Mac OS X?
No. The kernel interfaces are completely different. Though MacOSX and Linux are both UNIXes-ish (in fact, Mac OS X is 100% UNIX Certified) they’re vastly different in architecture. Your best bet would be to try VMWare and use a Linux instance under VMWare to try and access it.
EDIT: I just saw your edit, saying you have source and don’t want VMWare. I’d still say no. The underpinnings of Linux and MacOSX are radically different. The source wouldn’t ‘just work’ unless someone made it work specifically for MacOSX. I’d check the source for ‘#ifdef darwin’ or something similar to that, it won’t work. You’d have to have the right version too — Apple changes it’s kernel enough between major releases that a very old port may not work.
Many years ago, there was a project for device drivers to be portable across platforms. It was called Project UDI. The theory was to have a Device Driver Environment in your kernel. The APIs would be consistent across all OSes. Device drivers were source code compatible everywhere, and binary compatible (what you would like) across machines with the same ABI (x86, AMD64, etc). There was a port I remember for Darwin, but I think it was much more theoretical on MacOSX than anything.
The environment worked technically (it actually shipped as the native Device Driver Interface for UnixWare, with the old DDI a compatibility layer on top of UDI) but flopped for human/political reasons. Having SCO/Caldera as the main push for the project didn’t help much. For an OS with good driver support (say, Solaris, Windows) having those drivers is an advantage over kernels that don’t, so the only support would come by definition from OSes that didn’t have drivers, and not a lot of influence. Stallman didn’t like it much either — binary compatibility would make it less likely (he posited) to ship source for drivers.
Is it possible to use Linux USB drivers on Mac OS X?
No. The kernel interfaces are completely different. Though MacOSX and Linux are both UNIXes-ish (in fact, Mac OS X is 100% UNIX Certified) they’re vastly different in architecture. Your best bet would be to try VMWare and use a Linux instance under VMWare to try and access it.
EDIT: I just saw your edit, saying you have source and don’t want VMWare. I’d still say no. The underpinnings of Linux and MacOSX are radically different. The source wouldn’t ‘just work’ unless someone made it work specifically for MacOSX. I’d check the source for ‘#ifdef darwin’ or something similar to that, it won’t work. You’d have to have the right version too — Apple changes it’s kernel enough between major releases that a very old port may not work.
Many years ago, there was a project for device drivers to be portable across platforms. It was called Project UDI. The theory was to have a Device Driver Environment in your kernel. The APIs would be consistent across all OSes. Device drivers were source code compatible everywhere, and binary compatible (what you would like) across machines with the same ABI (x86, AMD64, etc). There was a port I remember for Darwin, but I think it was much more theoretical on MacOSX than anything.
The environment worked technically (it actually shipped as the native Device Driver Interface for UnixWare, with the old DDI a compatibility layer on top of UDI) but flopped for human/political reasons. Having SCO/Caldera as the main push for the project didn’t help much. For an OS with good driver support (say, Solaris, Windows) having those drivers is an advantage over kernels that don’t, so the only support would come by definition from OSes that didn’t have drivers, and not a lot of influence. Stallman didn’t like it much either — binary compatibility would make it less likely (he posited) to ship source for drivers.
iMac — How to make Ubuntu work properly with iMac graphics card
I recently installed Ubuntu 16.04 64-bit on my old mid-2010 iMac, but quickly ran into some issues. When installing, the screen would go black after the grub interface, unless I added «nomodeset» to the boot commands. Now Ubuntu 16.04 is installed, but the screen will stay black or freeze on the purple start up screen unless I have «nomodeset» enabled. While it is currently in a working state, it isn’t using the GPU for graphics acceleration. I know the graphics power of this Mac is already poor, but I intend to install Steam on Ubuntu to play some basic 3D games, so I need graphics acceleration to work. I am struggling to find an answer to this problem online. While I’ve since lost the webpage, I read somewhere that the issue may have something to do with how Ubuntu wants to take over the graphics driver on the kernel in order to reduce flickering during boot, which isn’t compatable with iMacs. I am open to installing an older version of Ubuntu if necessary. Graphics card: Radeon HD 4670 CPU: Intel i3-540 Output from command «/usr/lib/nux/unity_support_test -p»:
OpenGL vendor string: VMware, Inc. OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 4.0, 128 bits) OpenGL version string: 3.0 Mesa 17.0.7 Not software rendered: no Not blacklisted: yes GLX fbconfig: yes GLX texture from pixmap: yes GL npot or rect textures: yes GL vertex program: yes GL fragment program: yes GL vertex buffer object: yes GL framebuffer object: yes GL version is 1.4+: yes Unity 3D supported: no
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.10.0-42-generic.efi.signed root=UUID=883068b9-9317-47a9-98e6-202c75b7d2f2 ro quiet splash radeon.modeset=0 vt.handoff=7 [ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.10.0-42-generic.efi.signed root=UUID=883068b9-9317-47a9-98e6-202c75b7d2f2 ro quiet splash radeon.modeset=0 vt.handoff=7 [ 1.381779] [drm] Initialized [ 1.412144] [drm:radeon_init [radeon]] *ERROR* No UMS support in radeon module! [ 10.490259] [drm:radeon_init [radeon]] *ERROR* No UMS support in radeon module!
What would happen if I force installed a Linux driver into Mac OS X?
So, recently I got a Mac system and I was planning to put in an Intel WiFi card (as an upgrade for its current card). Now, as we know, Apple and Intel do not get along WiFi-wise. However, this same card works in Linux. What would happen if I were to force the Intel drivers for the Linux kernel into Mac OS X? Would it work? Would there be severe instability or data loss? Is it even possible?
Pretty much the same as would happen if you forced the Windows drivers into OS X. The kernel API’s are different and it will not work.
What does «force the Intel drivers» into OS X mean? Simply placing a file on the filesystem is the net result of any feasible action I can see. What would you actually do?
@bmike “What does «force the Intel drivers» into OS X mean?” Take the square peg of a non-compatible driver and stick it into the round hole of a system.
5 Answers 5
What would happen if I were to force the Intel drivers for the Linux kernel into Mac OS X? Would it work? Would there be severe instability or data loss? Is it even possible?
At best? 100% nothing. At worst? Crash your whole system and make it unusable or even unbootable.
While Mac OS X and Linux are both different “flavors” of Unix, you can’t just grab parts from one OS and just install it into the other OS and expect them to work.
That said, if there is source code for the driver somewhere, you could potentially compile them for Mac OS X using the Xcode suite of development tools.
But that is one big if. The reality is compiling Linux application source code on a Mac OS X system from a Linux system is a crapshoot. Sometimes it works and you get to use nice Linux tools on a Mac OS X system. But sometimes it just won’t work. And that is at the application level. On the driver level it’s even less plausible or doable; and even if it was doable it would be difficult to do that at best.
That said, there seems to have been an open source effort to compile Linux Intel drivers for Mac OS X as seen here. But note that the versions of Mac OS X referred to are Mac OS X 10.4 and 10.5; nothing more modern.
Nothing would happen, because they would not work (kernel modules). MacOS and Linux have 2 completly different kernels. It’s like trying to put engine from one car brand to another: it will not work because all the connections/specifications are totally different.
Besides, there is no lsmod/insmod/modbrobe/rmmod commands in Mac OS X.
Now, if you try binary drivers that would be like — pardon my ‘car’ comparisons — getting some materials for a car seat (according to specs for brand A) and trying to build (compile) the car seat for brand B. If the two car brands are compatible in area of car seats, than you would probably make it and it might actually work. But if you try to build race car seat from materials for 20 year old car, you’re gonna have a rough ride, if not crash and injure yourself.
Maybe it’s not the worst either, because there are projects that allow to run Windows drivers on Linux by using an adaptation layer ( ndiswrapper anyone?). So while it surely won’t work out of the box, theoretically it may be possible for some power user to adapt a driver to a different operating system. Anyway, OP is better off buying another WiFi card.
«If you try to force a linux kernel module into OSX, you’re gunna have a bad time.» youtube.com/watch?v=6Ls5j5iz2eA
As already posted: it is not possible.
First of all, there is no such thing as ‘force install’. There is nothing to install, and even if there was something to install there is no ‘forcing’ it. Installation can have different meanings but these two are the ones relevant to your question:
- Installation meaning installing a Mac OS X package using OS X’s installer. This is a package containing the files to be installed and instructions for the installer system so it knows where to put what, and how to do it.
- Installation meaning getting a driver for a piece of hardware loaded in to the kernel. OS X works by using so called kernel extensions (.kext files, or officially, ‘packages’ because that is what they are) to add functionality to the kernel. A driver is such an addition, and the functionality being the ability to drive a piece of hardware.
Both cases are very operating system bound. This means that you cannot ‘install’ something without matching points 1 and 2. While you could technically skip point 1 by manually using the ‘kextload’ program to load a file as a kernel extension you would not be able to match point 2: only kernel extensions can be loaded in to the kernel. Kernel extensions have to match the ABI and API of the kernel. Those two acronyms (feel free the look them up, their full name and meaning are not relevant to the answer) are comparable to matching electrical outlets to electrical plugs. They are interfaces.
If you were to try to mix and match binary files (because that is what kernel extensions, modules and drivers are) it would not work because they are not compatible with the kernel and in some cases the processor that needs to execute the code. This compatibility with the kernel is where we arrive at the ABI and API part: those interfaces are like gas, water and electrical connections. Let’s say Windows is gas, Linux is electricity and OS X is water. If you were to try and plug in a Linux electrical plug in to OS X’s water faucet, you will not get anything to work. Water doesn’t flow trough an electrical plug, and an electrical plug doesn’t get any electricity from water.
If you were to try to load a linux driver (which is called a kernel module) in to the OS X kernel, by using kextload from a command line on OS X, it would simply tell you that it doesn’t know what to do with the file you supplied. There is no forcing there, it simply cannot do anything with that file, just like you cannot force a light bulb to work from your water tap at home.
As for your problem: what are you trying to achieve? If you have a problem with your wireless connection, the problem is usually with the network or the environment. If you are missing certain features such as different frequencies or newer wireless protocols, you could try to simply install a better supported card. There are lists on the internet of natively supported wireless cards that will work just fine. Intel is not one of them.
I hope this helps you and makes things as clear as possible.