7

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?

  • 2
    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. – Thorbjørn Ravn Andersen Jan 27 '15 at 23:19
  • 1
    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 Jan 28 '15 at 14:43
  • @bmike Use (the nonexistent) modprobe or a similar tool. – Kaz Wolfe Jan 28 '15 at 18:50
  • @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. – JakeGould Jan 28 '15 at 20:41
  • 1
    @JakeGould Kind of like The Elegant Gentleman's Guide to Knife Fighting? – bmike Jan 29 '15 at 2:45
13

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.

10

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.

  • 13
    The car engine simile isn't very good, because hot rodders actually do that all the time. – cjm Jan 27 '15 at 15:34
  • 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. – antonone Jan 28 '15 at 12:31
  • "If you try to force a linux kernel module into OSX, you're gunna have a bad time." youtube.com/watch?v=6Ls5j5iz2eA – Ehryk Jan 28 '15 at 15:15
  • Also, there is a modprobe equivilent in OS X: kextload – Josh Jan 31 '15 at 15:51
8

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:

  1. 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.

  2. 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.

7

No, it's not possible, any more than you can run any other Linux binaries in OS X (without using a virtual machine).

  • 1
    If anything, it's less possible. Linux userspace binaries that restrict themselves to POSIX should be able to run on MacOSX with just a custom loader and a thin translation layer. Linux drivers (kernelspace binaries) are tightly bound to the kernel, so much so that they often won't run on other versions of the Linux kernel, much less the MacOSX kernel. – Mark Jan 27 '15 at 22:29
1

As a side note, if you have some USB devices that only supply Linux driver but no OS X driver, you may consider using the device by running Linux in a virtual machine (VirtualBox?) then forward the USB connection from your Mac to the Linux VM.

Then if you need to use some GUI tools, you may also setup X forwarding to your OS X desktop using XQuartz.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .