说明:
本人笔记本显卡为Gefore 8400 GS, 以太网卡为Yukon 88E8039.
1. 启用原生显卡驱动
笔记本网卡可以通过修改 DSDT 实现,具体操作:
查找Device (PGEP),或者查找0x00010000
然后添加Method, 修改后代码段如下:
Device (PEGP)
{
Name (_ADR, 0x00010000)
Device (VGA)
{
Name (_ADR, 0x00)
/***********Code added********************/
Name (_SUN, 0x01)
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x18)
{
"AAPL,slot-name",
Buffer (0x07)
{
"Slot-1"
},
"device_type",
Buffer (0x0C)
{
"NVDA,Parent"
},
"model",
Buffer (0x17)
{
"NVIDIA Geforce 8400 GS"
},
"NVCAP",
Buffer (0x14)
{
/* 0000 */ 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00,
/* 0008 */ 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A,
/* 0010 */ 0x00, 0x00, 0x00, 0x00
},
"rom-revision",
Buffer (0x06)
{
"3173a"
},
"VRAM,totalsize",
Buffer (0x04)
{
0x00, 0x00, 0x00, 0x04
},
"@0,compatible",
Buffer (0x0B)
{
"NVDA,NVMac"
},
"@0,device_type",
Buffer (0x08)
{
"display"
},
"@0,name",
Buffer (0x0F)
{
"NVDA,Display-A"
},
"@1,compatible",
Buffer (0x0B)
{
"NVDA,NVMac"
},
"@1,device_type",
Buffer (0x08)
{
"display"
},
"@1,name",
Buffer (0x0F)
{
"NVDA,Display-B"
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
/***********Code added********************/
注意,代码段要添加在Device (VGA)下面!!
另外,这段代码用到DTGP 方法,将DTGP的代码添加到dsdt.dsl文件第一个Method之前,添加后代码段如下:
DefinitionBlock ("dsdt.aml", "DSDT", 2, "INTEL ", "CRESTLNE", 0x06040000)
{
External (CFGD)
External (PDC1)
External (PDC0)
External (/_PR_.CPU0._PPC)
External (/_SB_.PCI0.LPCB.EC0_.RMC3)
Mutex (MUTX, 0x00)
OperationRegion (PORT, SystemIO, 0x80, 0x01)
Field (PORT, ByteAcc, NoLock, Preserve)
{
P80H, 8
}
/***********Method added******************/
Method (DTGP, 5, NotSerialized)
{
If (LEqual (Arg0, Buffer (0x10)
{
/* 0000 */ 0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44,
/* 0008 */ 0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B
}))
{
If (LEqual (Arg1, One))
{
If (LEqual (Arg2, Zero))
{
Store (Buffer (One)
{
0x03
}, Arg4)
Return (One)
}
If (LEqual (Arg2, One))
{
Return (One)
}
}
}
Store (Buffer (One)
{
0x00
}, Arg4)
Return (Zero)
}
/*****************************************/
我所添加的代码,都用/**************************/标示出来了.
将dsl文件编译成DSDT.aml文件,放到C盘Darwin文件夹下(我用BootThink引导),开机即可.
2.启用原生网卡驱动
Mac 原生就有Yukon的驱动,但是因为驱动中的info.plist文件所制定的网卡型号不对,所以不能正确启用,我们只需将info.plist中的网卡型号修改为自己Yukon网卡的型号(我的机器是8039),然后重新启用这个驱动就OK了.具体操作方法如下:
2.1 修改info.plist
找到/System/Library/Extensions/IONetworkingFamily.kext/Contents/PlugIns/AppleYukon2.kext/Contents/info.plist
将里面
</dict>
<key>Yukon-88E8053</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.iokit.AppleYukon2</string>
<key>EnableLowPwr</key>
<integer>1</integer>
<key>IOClass</key>
<string>yukon2osx</string>
<key>IOPCIPrimaryMatch</key>
<string>0x436211ab</string>
<key>IOProviderClass</key>
<string>IOPCIDevice</string>
<key>MACNumber</key>
<integer>1</integer>
<key>Model</key>
<string>Yukon Gigabit Adapter 88E8053 Singleport Copper SA</string>
的8053(共两处)改为8039
4362改成4353(此处是自己网卡的ID号 可以在WIN系统下查看硬件属性)
当然,修改这个文件也有多种方法,最容易的应该是将文件copy到"个人"文件夹下,修改后再覆盖回去
我用最笨的方法,直接把kext文件夹拷贝到Windows Fat32分区,然后windows下修改好info.plist后,又把整个kext文件覆盖回去了.
2.2更改权限,启用网卡
下面是更改网卡权限,以及启用驱动,主要参考:http://www.insanelymac.com/forum/lofiversion/index.php/t96959.html,命令照抄.
打开终端(应用程序->实用工具->终端)
sudo -s (获得root权限)
cd /System/Library/Extensions/IONetworkingFamily.kext/Contents/PlugIns/AppleYukon2.kext/Contents
chown -R root:wheel /System/Library/Extensions
chmod -R 755 /System/Library/Extensions/IONetworkingFamily.kext
cd /System/Library/Extensions/IONetworkingFamily.kext/
cd Contents
cd PlugIns
kextload AppleYukon2.kext ( load the driver )
然后是清空kext cache:
rm /System/Library/Extensions.mkext (Leopard 10.6.5已经没有Extensions.mkext文件了,所以无需此操作)
kextcache -system-cache (Leopard 10.6.5 中kextchache 的-k参数已经不再使用,应该用-system-chache)
然后在"系统偏好设置"->"网络"中就可以看到"以太网"的选项了,证明网卡驱动安装成功.
3.声卡驱动
本人使用http://www.pcbeta.com/viewthread-591769.html 提到的解决方案,谢谢该帖作者提供的AppleHDA.
下载原帖作者的AppleHDA,复制到/System/Library/Extensions/,然后安装(参照网卡安装方法)
之后,按作者所说修改dsl文件,我的文件修改后代码段如下
Device (HDEF)
{
Name (_ADR, 0x001B0000)
OperationRegion (HDAR, PCI_Config, 0x4C, 0x10)
Field (HDAR, WordAcc, NoLock, Preserve)
{
DCKA, 1,
Offset (0x01),
DCKM, 1,
, 6,
DCKS, 1,
Offset (0x08),
, 15,
PMES, 1
}
/***************Add by Guang Audio Kext************/
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x08)
{
"codec-id",
Buffer (0x04)
{
0x51,0x50,0xf1,0x14
},
"layout-id",
Buffer (0x04)
{
0x0c, 0x00, 0x00, 0x00
},
"device-type",
Buffer (0x11)
{
"Cx20561"
},
"PinConfigurations",
Buffer (0x00)
{ }
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
/***************Audio Kext************/
Name (_PRW, Package (0x02)
{
0x0D,
0x04
})
}