|
|
How to compile a driver for Mac OS X 10.1?
|
|
|
|
Addicted to MacNN
Join Date: Sep 2000
Status:
Offline
|
|
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Mar 2001
Location: Houston, TX
Status:
Offline
|
|
You can get this from Apple's cvs repository too. You have to agree to the APSL and register, but then grab the tarball, open the file Apple3Com3C90x.pbproj in Project Builder & click on the hammer to build. Well, hopefully: I'm under 10.2.4 and my build failed (whereas I can build the USBAudio kext with no troubles), but you said you're running 10.1, so good luck.
--Josh
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Sep 2000
Status:
Offline
|
|
It built ok for me...
I put it in the extensions directory...
No success
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Mar 2001
Location: Houston, TX
Status:
Offline
|
|
Originally posted by macvillage.net:
It built ok for me...
I put it in the extensions directory...
No success
I assume you rebooted (or loaded the extension manually) after putting it in /System/Library/Extensions...does it show as being loaded with kmodstat? Does it have correct ownership and perms (root:wheel, 755)?
--Josh
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Sep 2000
Status:
Offline
|
|
permissions are right AFAIK.
Here is what kmodstat gave:
[localhost:/Volumes/Users/robert] root# kmodstat
Id Refs Address Size Wired Name (Version) <Linked Against>
1 1 0x0 0x0 0x0 com.apple.kernel (5.5)
2 5 0x0 0x0 0x0 com.apple.kernel.bsd (5.5)
3 21 0x0 0x0 0x0 com.apple.kernel.iokit (5.5)
4 20 0x0 0x0 0x0 com.apple.kernel.libkern (5.5)
5 13 0x0 0x0 0x0 com.apple.kernel.mach (5.5)
6 2 0x0 0x0 0x0 com.apple.iokit.IOADBFamily (1.1)
7 1 0x0 0x0 0x0 com.apple.iokit.IONVRAMFamily (1.1)
8 1 0x0 0x0 0x0 com.apple.iokit.IOSystemManagementFamily (1.1)
9 1 0x0 0x0 0x0 com.apple.iokit.ApplePlatformFamily (1.0)
10 1 0x0 0x0 0x0 com.apple.driver.AppleNMI (1.0)
13 1 0xd262000 0x17000 0x16000 com.apple.iokit.IOHIDSystem (1.1.1) <3>
14 5 0xd29e000 0x8000 0x7000 com.apple.iokit.IOPCIFamily (1.1) <3 4>
15 2 0xd32d000 0x17000 0x16000 com.apple.iokit.IOGraphicsFamily (1.1.7) <14 3 4>
18 0 0xd3d7000 0x3000 0x2000 com.apple.driver.AppleGracklePCI (1.1) <14 3 4>
19 0 0xd402000 0x5000 0x4000 com.apple.platform.AppleHeathrow (1.1d1) <3 4 5>
20 1 0xd4a0000 0x5000 0x4000 com.apple.iokit.IOSCSIFamily (1.0.6) <3 4 5>
21 0 0xd4c7000 0x6000 0x5000 com.acard.driver.ACard62xxM (1.1) <14 20 3 4 5>
22 1 0xd545000 0x14000 0x13000 com.apple.iokit.IONDRVSupport (1.1.7) <15 14 3 4>
23 0 0xd56e000 0x7000 0x6000 com.apple.driver.AppleMesh (1.1.1) <3 4 5>
25 2 0xd5d2000 0xf000 0xe000 com.apple.iokit.IOATAFamily (1.5.1f1) <3 4>
26 0 0xd60b000 0x3000 0x2000 com.apple.driver.HeathrowATA (1.0.7f2) <25 3 4>
27 0 0xd623000 0x4000 0x3000 com.apple.driver.AppleVIA (1.1) <3 4 5>
28 4 0xd670000 0x10000 0xf000 com.apple.iokit.IOSCSIArchitectureModelFamily (1.1.5) <3 4 5>
29 0 0xd6b9000 0x5000 0x4000 com.apple.iokit.IOATAPIProtocolTransport (1.1.1) <25 28 3 4 5>
30 4 0xd71f000 0x16000 0x15000 com.apple.iokit.IOStorageFamily (1.1.2) <2 3 4>
32 0 0xd7a3000 0x3000 0x2000 com.apple.driver.AppleADBKeyboard (1.0.1d1) <6 13 4 5 3>
33 2 0xd7f7000 0xb000 0xa000 com.apple.iokit.IOCDStorageFamily (1.1.3) <30 5 2 3 4>
34 1 0xd85c000 0x6000 0x5000 com.apple.iokit.IODVDStorageFamily (1.1) <33 30 5 2 3 4>
36 0 0xd8ef000 0x3000 0x2000 com.apple.iokit.IOSCSIParallelInterfaceProtocolTra nsport (1.1.2) <28 3 4 5>
38 1 0xd9a0000 0xd000 0xc000 com.apple.iokit.IOSCSIBlockCommandsDevice (1.1.5) <28 30 5 2 3 4>
40 1 0xd1b2000 0x1a000 0x19000 com.apple.iokit.IONetworkingFamily (1.1)
41 0 0xd182000 0x8000 0x7000 com.apple.driver.AppleBMacEthernet (1.1) <40>
42 1 0xd19e000 0xa000 0x9000 com.apple.iokit.IOSerialFamily (5.5.0d15)
43 0 0xd1cc000 0xb000 0xa000 com.apple.driver.AppleSCCSerial (1.2.2) <42>
44 2 0xd200000 0x1b000 0x1a000 com.apple.iokit.IOAudioFamily (1.2.1b1)
45 1 0xd196000 0x6000 0x5000 com.apple.driver.AppleDBDMAAudio (1.7.4d8) <44>
46 0 0xd1d7000 0x4000 0x3000 com.apple.driver.AppleOWScreamerAudio (1.7.4d6) <44 45>
48 0 0xd21b000 0x16000 0x15000 com.apple.iokit.IOSCSIMultimediaCommandsDevice (1.1.5) <30 33 34 28 38>
49 0 0xd231000 0x18000 0x17000 com.apple.ATIRagePro (1.1) <14 15 22>
53 0 0xd39c000 0x6000 0x5000 com.apple.nke.SharedIP (1.1.4)
54 0 0xd397000 0x4000 0x3000 com.apple.nke.IPFirewall (1.1)
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Sep 2000
Status:
Offline
|
|
Ok, tried loading it manually verbose... here is what I got:
[localhost:/tmp] root# sudo kextload -v Apple3Com3C90x.kext
Examining: Apple3Com3C90x.kext
Module 'com.apple.iokit.IOPCIFamily' is already loaded; continuing.
Module 'com.apple.iokit.IONetworkingFamily' is already loaded; continuing.
Loading module: com.apple.driver.Apple3Com3C90x.
Error loading module 'com.apple.driver.Apple3Com3C90x': no memory.
Error loading module: no memory.
Done.[/quote]
How can it say no memory? I got about 256MB on this box....102MB free... should be fine.... a kernel extension isn't that big is it?
Here is built and ready to go though... just doesn't work for some reason.
ftp://ftp.macvillage.net/dev/driver.tar.gz
(
Last edited by macvillage.net; Apr 6, 2003 at 10:38 AM.
)
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Mar 2001
Location: Houston, TX
Status:
Offline
|
|
Originally posted by macvillage.net:
Ok, tried loading it manually verbose... here is what I got: <snip results>
How can it say no memory? I got about 256MB on this box....102MB free... should be fine.... a kernel extension isn't that big is it?
Here is built and ready to go though... just doesn't work for some reason.
ftp://ftp.macvillage.net/dev/driver.tar.gz
I downloaded it, and tried to load in troubleshooting mode (-t -n) and got the following error:
kernel extension Apple3Com3C90x.kext/ has problems:
Validation failures
{
"Kext claims an executable file but it doesn't exist" = true
}
That's a problem...looking in the kext bundle, in the Contents folder there should be a MacOS folder containing the actual "meat" of the extension; in this case, it should be a file called Apple3Com3C90x. There is no such folder or file in your bundle, hence the message, I believe. I don't know what's up, since I can't compile it myself. At this point, I think you're looking at
- Hoping someone else who knows more about kext dev than I do stumbles into this thread
- Go read the darwin mail lists to see if you can figure out what the story on this kext is (maybe it's just not done?)
- Yell "F*ck it!" and go spend $10 on a RealTek based card.
Good luck, post if you figure anything more out.
--Josh
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Sep 2000
Status:
Offline
|
|
Well FWIW... here is the build log:
/usr/bin/jam -d1 JAMBASE=/Developer/Makefiles/pbx_jamfiles/ProjectBuilderJambase JAMFILE=- build ACTION=build _DEFAULT_GCC_VERSION=2.95.2 _GCC3_IS_IN_OFFICIAL_LOCATION=YES BUILD_STYLE=Development CPP_HEADERMAP_FILE=/Volumes/Users/robert/Apple3Com3C90x-3/build/Apple3Com3C90x.build/Apple3Com3C90x.build/Apple3Com3C90x.hmap SRCROOT=/Volumes/Users/robert/Apple3Com3C90x-3 OBJROOT=/Volumes/Users/robert/Apple3Com3C90x-3/build SYMROOT=/Volumes/Users/robert/Apple3Com3C90x-3/build DSTROOT=/tmp/Apple3Com3C90x.dst
...updating 12 target(s)...
PhaseScriptExecution <Execution>/Volumes/Users/robert/Apple3Com3C90x-3/build/Apple3Com3C90x.build/Apple3Com3C90x.build/BPTag000-script.sh
=== Script ===
#!/bin/sh
script="${SYSTEM_DEVELOPER_DIR}/ProjectBuilder Extras/Kernel Extension Support/KEXTPreprocess";
if [ -x "$script" ]; then
. "$script"
fi
--- Output ---
=== Exit code: 0 ===
BuildPhase <Script>Apple3Com3C90x.kext
Completed phase <Script> for <Script>Apple3Com3C90x.kext
BuildPhase <CopyHeaders>Apple3Com3C90x.kext
Completed phase <CopyHeaders> for <CopyHeaders>Apple3Com3C90x.kext
Cp /Volumes/Users/robert/Apple3Com3C90x-3/build/Apple3Com3C90x.kext/Contents/Info.plist
Cp /Volumes/Users/robert/Apple3Com3C90x-3/build/Apple3Com3C90x.kext/Contents/PkgInfo
BuildPhase <CopyResources>Apple3Com3C90x.kext
Completed phase <CopyResources> for <CopyResources>Apple3Com3C90x.kext
BuildPhase <DeriveAndCompileSources>Apple3Com3C90x.kext
Completed phase <DeriveAndCompileSources> for <DeriveAndCompileSources>Apple3Com3C90x.kext
BuildPhase <LinkWithFrameworksAndLibraries>Apple3Com3C90x.kex t
Completed phase <LinkWithFrameworksAndLibraries> for <LinkWithFrameworksAndLibraries>Apple3Com3C90x.kex t
BuildPhase <RezResourceManagerFiles>Apple3Com3C90x.kext
Completed phase <RezResourceManagerFiles> for <RezResourceManagerFiles>Apple3Com3C90x.kext
PhaseScriptExecution <Execution>/Volumes/Users/robert/Apple3Com3C90x-3/build/Apple3Com3C90x.build/Apple3Com3C90x.build/BPTag006-script.sh
=== Script ===
#!/bin/sh
script="${SYSTEM_DEVELOPER_DIR}/ProjectBuilder Extras/Kernel Extension Support/KEXTPostprocess";
if [ -x "$script" ]; then
. "$script"
fi
--- Output ---
=== Exit code: 0 ===
BuildPhase <Script2>Apple3Com3C90x.kext
Completed phase <Script2> for <Script2>Apple3Com3C90x.kext
Touch /Volumes/Users/robert/Apple3Com3C90x-3/build/Apple3Com3C90x.kext
...updated 12 target(s)...
Looks like the problem is here:
script="${SYSTEM_DEVELOPER_DIR}/ProjectBuilder Extras/Kernel Extension Support/KEXTPreprocess";
can't find that file... now where can I get it?
It's a matter of principle, more than anything else at this point.
I just want to get my 3Com Nic card going. It's actually a good card... just can't get this working.
Let me look a bit deeper.
The comments on all the files in CVS state :
Import of Apple3Com3C90x-3 from Apple
so I would think it's complete and stable.
(
Last edited by macvillage.net; Apr 6, 2003 at 04:57 PM.
)
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Sep 2000
Status:
Offline
|
|
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Mar 2001
Location: Provo, UT
Status:
Offline
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|