Jump to content
InsanelyMac Forum
  • Announcements

    • Allan

      Solution to create a topic or post.   04/24/2018

      Hello guys. The majority of you are having issues to create a topic or post here. This are a problem with our current theme InsanelyMac.  Now the theme will be the Default IPS. Sorry for any inconvenience.
lagnat

Using Darwin Airport Driver With Osx86 10.4.1

Recommended Posts

This is a relatively complex HOWTO for patching the Darwin Airport driver to work on oxs86.

 

N O T E: You shouldn't even attempt this unless you are already comfortable in Terminal.

 

This is known to work on a dell D600 with a Broadcom BCM4306.

 

EDIT: I have another d600 that didn't work at first. The problem ended up being a BIOS setting. Go into the BIOS and alt-p until you get to the page with the wireless settings. One of the settings turns the card on and off.. sorry, I can't remember exactly what it says and I don't have the machine with me now. The text to the right explains that even if it's off, the OS can still turn it on but that doesn't seem to be the case with osx. Enable the card in the BIOS and try again. If this works for you, please make a note of the exact setting and let me know.

 

EDIT: There is probably a pre-patched driver posted later in this thread.

 

You'll need:

o Darwin install CD

o MacOS x86 with gcc installed. I used gcc4.

 

1. Insert Darwin CD

2. Run Terminal.app

3. Make a working directory

$ mkdir work

$ cd work

4. Untar the driver from the Darwin CD

$ bunzip2 -c /Volumes/Darwin8_i386/System/Installation/BinaryDrivers_i386/AirPortDriver2-350.5.tar.bz2 | tar xvf -

5. Optional: Try loading the unpatched driver manually. It should fail.

$ sudo chown -R root:wheel System/Library/Extensions/AppleAirPort2.kext

$ sudo kextload System/Library/Extensions/AppleAirPort2.kext

ld(): Undefined symbols:

_OSDequeueAtomic

_OSEnqueueAtomic

...

6. Goto http://fxr.watson.org/fxr/source/libkern/g....c?v=OPENDARWIN

Copy and paste the missing functions into a new file. I called mine "foo.c".

7. Add the following include lines to the top of the file:

#include <libkern/OSTypes.h>

#include <libkern/OSAtomic.h>

#define NULL 0

 

The file should now look something like this

#include <libkern/OSTypes.h>

#include <libkern/OSAtomic.h>

#define NULL 0

 

void * OSDequeueAtomic(void ** inList, SInt32 inOffset)

{

( source code deleted )

}

 

void OSEnqueueAtomic(void ** inList, void * inNewLink, SInt32 inOffset)

{

( source code deleted )

}

8. Relink the driver with the new functions

$ gcc -o AppleAirPort2 foo.c System/Library/Extensions/AppleAirPort2.kext/Contents/MacOS/AppleAirPort2 -fasm-blocks -g -O0 -DJAGUAR -DDEBUG=1 -fmessage-length=0 -mfix-and-continue -fno-common -nostdinc -fno-builtin -finline -fno-keep-inline-functions -force_cpusubtype_ALL -fno-exceptions -msoft-float -static -DKERNEL -DKERNEL_PRIVATE -DDRIVER_PRIVATE -DAPPLE -DNeXT -I/System/Library/Frameworks/Kernel.framework/PrivateHeaders -I/System/Library/Frameworks/Kernel.framework/Headers -lkmod -lcc_kext -lcpp_kext -static -nostdlib -r

9. Move the patched driver into the work kext

$ sudo mv AppleAirPort2 System/Library/Extensions/AppleAirPort2.kext/Contents/MacOS/

9. Test the new driver. It should load and if your hardware is supported, you should see it show up in network prefs.

$ sudo chown -R root:wheel System/Library/Extensions/AppleAirPort2.kext

$ sudo kextload System/Library/Extensions/AppleAirPort2.kext

kextload: System/Library/Extensions/AppleAirPort2.kext loaded successfully

10. If all goes well, move the working kext into the system

$ sudo cp -r System/Library/Extensions/AppleAirPort2.kext /System/Library/Extensions

Share this post


Link to post
Share on other sites
Advertisement

What chipset is used in airports ?

 

I heard it's a broadcom one, can you confirm this and tell which specific model ?

 

Other wireless cards use the same chipset as airport so your method may work with them.

Share this post


Link to post
Share on other sites

A quick question... I just did the XCode install, but most things I try to compile error out with this "i686-apple-darwin8-gcc-4.0.0: spec failure: unrecognized spec option 'Q'". Any ideas here?

 

Was going to compile this and then bring the file home to test on the laptop. hehe

Share this post


Link to post
Share on other sites
A quick question...  I just did the XCode install, but most things I try to compile error out with this "i686-apple-darwin8-gcc-4.0.0: spec failure: unrecognized spec option 'Q'".  Any ideas here?

 

Was going to compile this and then bring the file home to test on the laptop. hehe

 

I got the same error but I didn't investigate it since it didn't seem to cause any harm.

Share this post


Link to post
Share on other sites

Ahh, ok. I was worried, since fink actually errors out on gzip or something during its CVS source install.

 

THis isn't actually compiling for me either, at least no file appears where I am typing the command.

 

Here is the complete error:

i686-apple-darwin8-gcc-4.0.0: spec failure: unrecognized spec option 'Q'
foo.c: In function 'OSDequeueAtomic':
foo.c:10: error: 'NULL' undeclared (first use in this function)
foo.c:10: error: (Each undeclared identifier is reported only once
foo.c:10: error: for each function it appears in.)

 

Thanks, btw. I've not done much (any) compiling in OSX or Darwin, I'm only used to some in Linux.

Share this post


Link to post
Share on other sites
Ahh, ok.  I was worried, since fink actually errors out on gzip or something during its CVS source install.

 

THis isn't actually compiling for me either, at least no file appears where I am typing the command.

 

Here is the complete error:

i686-apple-darwin8-gcc-4.0.0: spec failure: unrecognized spec option 'Q'
foo.c: In function 'OSDequeueAtomic':
foo.c:10: error: 'NULL' undeclared (first use in this function)
foo.c:10: error: (Each undeclared identifier is reported only once
foo.c:10: error: for each function it appears in.)

 

Thanks, btw.  I've not done much (any) compiling in OSX or Darwin, I'm only used to some in Linux.

 

Oh dammit.. replace the NULL with a zero (0). I'll fix my post.

Share this post


Link to post
Share on other sites

Nevermind, you have to make sure foo.c also has this in it at the top:

 

enum {

false = 0,

true = 1

};

 

#define NULL 0L

 

EDIT: You beat me to it. hehe Thanks a lot for all the help. :P

Share this post


Link to post
Share on other sites

just wondering how many have gotten their wireless cards to work using this method? what chipsets were your wireless cards based on?

Share this post


Link to post
Share on other sites

This is only going to work on cards that use the same Broadcom chipset that an airpot card uses I think. One such card is the Linksys WPC54G anyway (at least it shows up as a normal airport card in a mac laptop).

 

I can't test this out at home until I get there, but I've compiled it for now. I think some of us are going to have PCMCIA problems that will prevent any card from working, unless you have a lucky motherboard chipset like lagnat.

Share this post


Link to post
Share on other sites
This is only going to work on cards that use the same Broadcom chipset that an airpot card uses I think.  One such card is the Linksys WPC54G anyway (at least it shows up as a normal airport card in a mac laptop).

 

I can't test this out at home until I get there, but I've compiled it for now.  I think some of us are going to have PCMCIA problems that will prevent any card from working, unless you have a lucky motherboard chipset like lagnat.

 

Wireless cards with ralink chipsets work. My ralink based card is a D-Link DWL-G122(B1) USB dongle and it works. Here is a link to that forum topic: Wireless Cards in OSX

Share this post


Link to post
Share on other sites

This may be of use:

http://www.osxhax.com/archives/000060.html

 

I think I have rev 1 wpc54g, but I can't check for another 2 hours or so when I get home. LOL. And, again, this driver won't help w/Atheros stuff I'm pretty sure. My current laptop has some 855GM chipset I think, but I get one with a 915PM in a week, so between the two of them, one has to have supported PCMCIA chipset I'd think, too.

Share this post


Link to post
Share on other sites

Okay, I have a Broadcom wireless adapter built-in to my laptop, and I've followed your directions exactly. But after entering in..

 

gcc -o AppleAirPort2 foo.c System/Library/Extensions/AppleAirPort2.kext/Contents/MacOS/AppleAirPort2 -fasm-blocks -g -O0 -DJAGUAR -DDEBUG=1 -fmessage-length=0 -mfix-and-continue -fno-common -nostdinc -fno-builtin -finline -fno-keep-inline-functions -force_cpusubtype_ALL -fno-exceptions -msoft-float -static -DKERNEL -DKERNEL_PRIVATE -DDRIVER_PRIVATE -DAPPLE -DNeXT -I/System/Library/Frameworks/Kernel.framework/PrivateHeaders -I/System/Library/Frameworks/Kernel.framework/Headers -lkmod -lcc_kext -lcpp_kext -static -nostdlib -r

 

I get the following error....

 

cc1: error: invalid option `fix-and-continue'

 

Any clue on how to fix this? The only thing I could think of is because my GCC version is 3.3. Could that be the problem? If so, how do you update it? I went to the GCC website and didn't see any info at all for OSx86 systems.

Share this post


Link to post
Share on other sites

Yes, set it to use GCC 4.0 I think it is done by typing 'sudo gcc_select 4.0'. At least I compiled it with GCC 4. (xcode 2.1 of course, just google for xcode download, but you'll need the 'freebie' ADC membership to get it, like a 600MB download)

Share this post


Link to post
Share on other sites

hi,

I have a intel pro/wireless 2100 this manipulation working or not???

 

:D

I hope!!!

 

or it's only for broadcom hardware??

Share this post


Link to post
Share on other sites
Yes, set it to use GCC 4.0  I think it is done by typing 'sudo gcc_select 4.0'.  At least I compiled it with GCC 4. (xcode 2.1 of course, just google for xcode download, but you'll need the 'freebie' ADC membership to get it, like a 600MB download)

 

Thank you so much! I typed that in, followed the rest of the intructions, and bang! I have built-in wireless internet! Woo-hoo!!

 

Funny thing is, I didn't have to download Xcode, I just typed in what you said "sudo gcc-select 4.0" and it worked without downloading anything else. (maybe it's already included with the deadmoo image, just not selected by default?)

Share this post


Link to post
Share on other sites

This sounds like great news..and just before I went out to buy that belkin usb adapter! Just one quick inquiry though, does this mean i will need to download the darwin x86 install CD first? I was under the impression that Mac x86 came with darwin pre-installed.

Share this post


Link to post
Share on other sites

My laptop (HP Compaq NC6000) isn't initialising PCMCIA properly. <_ the kext will load but since my pcmcia isn working it doesn help.>

 

For those who get it working, what PCMCIA chipset do you have? (check in windows device manager or perhaps just in system info in OS X).

 

And again, this is just BROADCOM (which Airport happens to use). Nothing else will be helped by this.

Share this post


Link to post
Share on other sites
This sounds like great news..and just before I went out to buy that belkin usb adapter! Just one quick inquiry though, does this mean i will need to download the darwin x86 install CD first? I was under the impression that Mac x86 came with darwin pre-installed.

 

Yeah, I downloaded that 8.0.1 CD.

Share this post


Link to post
Share on other sites

great...downloading now. If there's any way that you could post that modified version of the file we need lagnat, that would be much appreciated. I'll always be worried i'm missing some code or something

Share this post


Link to post
Share on other sites

I've said quite a few times it won't work with anything but the BROADCOM chipset that the Airport and other cards have. No chance in hell of Intel stuff working, sorry.

Share this post


Link to post
Share on other sites

cyrana, I've got the broadcom chipset on my Dell, and I really would like to get wireless working. Is there any way you could post the finished file we need to update our drivers? I would really appreciate it if you've got it handy. Thanks in advance!

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.



×