免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
123
最近访问板块 发新帖
楼主: zeissoctopus
打印 上一主题 下一主题

[FreeBSD] 折騰整晚,成功把 FreeBSD 9.1-RELEASE 安裝入舊 Macbook 小白 [复制链接]

论坛徽章:
89
水瓶座
日期:2014-04-01 08:53:31天蝎座
日期:2014-04-01 08:53:53天秤座
日期:2014-04-01 08:54:02射手座
日期:2014-04-01 08:54:15子鼠
日期:2014-04-01 08:55:35辰龙
日期:2014-04-01 08:56:36未羊
日期:2014-04-01 08:56:27戌狗
日期:2014-04-01 08:56:13亥猪
日期:2014-04-01 08:56:02亥猪
日期:2014-04-08 08:38:58程序设计版块每日发帖之星
日期:2016-01-05 06:20:00程序设计版块每日发帖之星
日期:2016-01-07 06:20:00
21 [报告]
发表于 2013-01-10 13:37 |只看该作者
贴纸很牛逼。 :wink:

论坛徽章:
0
22 [报告]
发表于 2013-01-10 13:43 |只看该作者
fender0107401 发表于 2013-01-10 13:37
贴纸很牛逼。


貼紙可以到 www.freebsdmall.com 購買,有 3 款選擇,價格每張 0.5 美元至 1.99 美元。寄香港的運費不貴。想信寄至祖國也不會貴。

www.freebsdmall.com 會捐錢給 FreeBSD 基金會的。

论坛徽章:
0
23 [报告]
发表于 2013-01-11 19:24 |只看该作者
FreeBSD 9.1-RELEASE 內的 asmc 模組不支援我的 Macbook 3,1 。

因此我嘗試找源碼,改改它,結果成功了。

用以下補丁修改 /usr/src/sys/dev/asmc/asmc.c 和 /usr/src/sys/dev/asmc/asmcvar.h
補丁碼

  1. --- /usr/src/sys/dev/asmc/asmcvar.h.original    2013-01-11 09:36:53.000000000 +0000
  2. +++ /usr/src/sys/dev/asmc/asmcvar.h     2013-01-11 10:21:02.000000000 +0000
  3. @@ -141,10 +141,22 @@
  4. #define ASMC_MB_TEMPDESCS      { "Enclosure Bottomside", \
  5.                                   "Northbridge Point 1", \
  6.                                   "Northbridge Point 2", "Heatsink 1", \
  7.                                   "Heatsink 2", "Memory Bank A", }

  8. +#define ASMC_MB31_TEMPS         { "TB0T", "TN0P", "Th0H", "Th1H", \
  9. +                                  "TM0P", NULL }
  10. +
  11. +#define ASMC_MB31_TEMPNAMES     { "enclosure", "northbridge1", \
  12. +                                  "heatsink1", "heatsink2",    \
  13. +                                  "memory", }
  14. +
  15. +#define ASMC_MB31_TEMPDESCS     { "Enclosure Bottomside", \
  16. +                                  "Northbridge Point 1",  \
  17. +                                  "Heatsink 1", "Heatsink2", \
  18. +                                  "Memory Bank A", }
  19. +
  20. #define ASMC_MBP_TEMPS         { "TB0T", "Th0H", "Th1H", "Tm0P", \
  21.                                   "TG0H", "TG0P", "TG0T", NULL }

  22. #define ASMC_MBP_TEMPNAMES     { "enclosure", "heatsink1", \
  23.                                   "heatsink2", "memory", "graphics", \


  24. --- /usr/src/sys/dev/asmc/asmc.c.original       2013-01-11 05:26:22.000000000 +0000
  25. +++ /usr/src/sys/dev/asmc/asmc.c        2013-01-11 09:51:01.000000000 +0000
  26. @@ -153,10 +153,16 @@
  27.           "MacBook2,1", "Apple SMC MacBook Core 2 Duo",
  28.           ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, NULL, NULL, NULL,
  29.           ASMC_MB_TEMPS, ASMC_MB_TEMPNAMES, ASMC_MB_TEMPDESCS
  30.         },

  31. +        {
  32. +          "MacBook3,1", "Apple SMC MacBook Core 2 Duo",
  33. +          ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, NULL, NULL, NULL,
  34. +          ASMC_MB31_TEMPS, ASMC_MB31_TEMPNAMES, ASMC_MB31_TEMPDESCS
  35. +        },
  36. +
  37.         {
  38.           "MacBookPro1,1", "Apple SMC MacBook Pro Core Duo (15-inch)",
  39.           ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, ASMC_LIGHT_FUNCS,
  40.           ASMC_MBP_TEMPS, ASMC_MBP_TEMPNAMES, ASMC_MBP_TEMPDESCS
  41.         },
复制代码


然後重新編譯和安裝 kernel 一次,結果新 kernel 的 asmc 模式在我的 Macbook 3,1 正常運作,現在我可以透過 asmc 觀查硬件溫度和有硬盤防震功能。

  1. sysctl -a | grep asmc
  2. dev.asmc.0.%desc: Apple SMC MacBook Core 2 Duo
  3. dev.asmc.0.%driver: asmc
  4. dev.asmc.0.%location: handle=\_SB_.PCI0.LPCB.SMC_
  5. dev.asmc.0.%pnpinfo: _HID=APP0001 _UID=0
  6. dev.asmc.0.%parent: acpi0
  7. dev.asmc.0.fan.0.speed: 1805
  8. dev.asmc.0.fan.0.safespeed: 0
  9. dev.asmc.0.fan.0.minspeed: 1800
  10. dev.asmc.0.fan.0.maxspeed: 6200
  11. dev.asmc.0.fan.0.targetspeed: 1800
  12. dev.asmc.0.temp.enclosure: 29
  13. dev.asmc.0.temp.northbridge1: 51
  14. dev.asmc.0.temp.heatsink1: 53
  15. dev.asmc.0.temp.heatsink2: 53
  16. dev.asmc.0.temp.memory: 52
  17. dev.asmc.0.sms.x: -25
  18. dev.asmc.0.sms.y: 48
  19. dev.asmc.0.sms.z: 265
复制代码

评分

参与人数 1可用积分 +5 收起 理由
ulovko + 5 很给力!

查看全部评分

论坛徽章:
12
寅虎
日期:2013-12-04 20:37:4915-16赛季CBA联赛之广东
日期:2017-08-22 19:23:1215-16赛季CBA联赛之上海
日期:2016-06-18 23:05:05操作系统版块每日发帖之星
日期:2016-06-06 06:20:00操作系统版块每日发帖之星
日期:2016-06-05 06:20:00操作系统版块每日发帖之星
日期:2016-06-03 06:20:002015年辞旧岁徽章
日期:2015-03-03 16:54:152015年亚洲杯之巴勒斯坦
日期:2015-02-10 21:38:08卯兔
日期:2014-10-31 20:42:23申猴
日期:2014-06-11 17:15:10处女座
日期:2014-05-22 09:00:1815-16赛季CBA联赛之广夏
日期:2017-09-25 23:37:46
24 [报告]
发表于 2013-01-11 23:51 |只看该作者
fender0107401 发表于 2013-01-10 13:36
我在thinkpad上也用过,不过不知道是不是所有的本子都能用这个。


哈,坚定了我在未来某一天把我的thinkpad上直接装fb的决心。

论坛徽章:
0
25 [报告]
发表于 2013-01-12 10:55 |只看该作者
配置適合 Macbook 3,1 的核心


  1. #===============================================================================
  2. # 配置檔案識別名稱
  3. #===============================================================================
  4. ident           MACBOOK31

  5. #===============================================================================
  6. # 架構是 HAMMER 即 amd64
  7. #===============================================================================
  8. cpu             HAMMER

  9. #===============================================================================
  10. # 編譯選項:啟動 Kernel DTrace
  11. #===============================================================================
  12. makeoptions     DEBUG="-g"              # Build kernel with gdb(1) debug symbols
  13. makeoptions     WITH_CTF=1              # Build kernel support Dtrace
  14. #options        INCLUDE_CONFIG_FILE     # Include this file in kernel

  15. #===============================================================================
  16. # 系統排程器選項
  17. #===============================================================================
  18. options         SCHED_ULE               # ULE scheduler
  19. options         PREEMPTION              # Enable kernel thread preemption

  20. #===============================================================================
  21. # 網絡通信協議選項
  22. #===============================================================================
  23. options         SCTP                    # Stream Control Transmission Protocol
  24. options         INET                    # InterNETworking
  25. options         INET6                   # IPv6 communications protocols
  26. device          gif                     # IPv6 and IPv4 tunneling
  27. device          faith                   # IPv6-to-IPv4 relaying (translation)

  28. #===============================================================================
  29. # NETGRAPH 子系統支援
  30. #===============================================================================
  31. options         NETGRAPH

  32. #===============================================================================
  33. # PCI 滙流排選項
  34. #===============================================================================
  35. device          pci

  36. #===============================================================================
  37. # GPT 支援
  38. #===============================================================================
  39. options         GEOM_PART_GPT           # GUID Partition Tables.

  40. #===============================================================================
  41. # 檔案系統選項
  42. #===============================================================================
  43. options         FFS                     # Berkeley Fast Filesystem
  44. options         UFS_ACL                 # Support for access control lists
  45. options         UFS_EXTATTR
  46. options         UFS_EXTATTR_AUTOSTART
  47. options         UFS_DIRHASH             # Improve performance on big directories
  48. options         UFS_GJOURNAL            # Enable gjournal-based UFS journaling
  49. options         QUOTA                   # enable disk quotas
  50. options         SUIDDIR
  51. options         MD_ROOT                 # MD is a potential root device
  52. options         MSDOSFS                 # MSDOS Filesystem
  53. options         NULLFS                  # NULL filesystem
  54. options         UDF                     # Universal Disk Format
  55. options         CD9660                  # ISO 9660 Filesystem
  56. options         SMBFS                   # SMB/CIFS Filesystem
  57. options         NETSMB                  # SMB/CIFS requester
  58. options         LIBMCHAIN               # mchain
  59. options         LIBICONV                # kernel side iconv library
  60. options         CD9660_ICONV            # Optional character code conversion
  61. options         MSDOSFS_ICONV           # Optional character code conversion
  62. options         UDF_ICONV               # Optional character code conversion
  63. options         FDESCFS                 # File descriptor filesystem
  64. options         PROCFS                  # Process filesystem (requires PSEUDOFS)
  65. options         PSEUDOFS                # Pseudo-filesystem framework
  66. options         VFS_AIO

  67. #===============================================================================
  68. # Capsicum 沙盒支援
  69. #===============================================================================
  70. options         CAPABILITIES            # fine-grained rights on file descriptors
  71. options         CAPABILITY_MODE         # sandboxes with no global namespace access

  72. #===============================================================================
  73. # 兼容支援選項,包括 Linux 32bit 支援
  74. #===============================================================================
  75. options         COMPAT_43TTY            # BSD 4.3 TTY compat (sgtty)
  76. options         COMPAT_FREEBSD32        # Compatible with i386 binaries
  77. options         COMPAT_LINUX32          # Linux 32bit
  78. options         P1003_1B_SEMAPHORES     # POSIX-style semaphores
  79. options     _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions

  80. #===============================================================================
  81. # SYSV IPC 選項
  82. #===============================================================================
  83. options         SYSVSHM                 # SYSV-style shared memory
  84. options         SYSVMSG                 # SYSV-style message queues
  85. options         SYSVSEM                 # SYSV-style semaphores

  86. #===============================================================================
  87. # 保安架構選項
  88. #===============================================================================
  89. options         AUDIT                   # Security event auditing
  90. options         MAC                     # TrustedBSD MAC Framework

  91. #===============================================================================
  92. # 核心除錯器及 DTrace 支援
  93. #===============================================================================
  94. options         DDB_CTF                 # kernel ELF linker loads CTF data
  95. options         KDTRACE_FRAME           # Ensure frames are compiled in
  96. options         KDTRACE_HOOKS           # Kernel DTrace hooks
  97. options         KDB                     # Kernel debugger related code
  98. options         KDB_TRACE               # Print a stack trace for a panic
  99. options         KTRACE                  # ktrace(1) support

  100. #===============================================================================
  101. # 其他核心選項
  102. #===============================================================================
  103. options         FLOWTABLE               # per-cpu routing cache
  104. options         STACK                   # stack(9) support
  105. options         PRINTF_BUFR_SIZE=128    # Prevent printf output being interspersed.
  106. options         KBD_INSTALL_CDEV        # install a CDEV entry in /dev
  107. options         HWPMC_HOOKS             # Necessary kernel hooks for hwpmc(4)

  108. #===============================================================================
  109. # Intel CPU 選項
  110. #===============================================================================
  111. options         SMP                     # Symmetric MultiProcessor Kernel
  112. device          coretemp
  113. device          cpufreq

  114. #===============================================================================
  115. # ACPI 選項
  116. #===============================================================================
  117. device          acpi
  118. device          acpi_video
  119. device          asmc

  120. #===============================================================================
  121. # SATA + CAM 選項
  122. #===============================================================================
  123. device          ahci
  124. device          ata
  125. options         ATA_CAM
  126. options         ATA_STATIC_ID

  127. #===============================================================================
  128. # SCSI 選項
  129. #===============================================================================
  130. device          scbus                   # SCSI bus (required for SCSI)
  131. device          ch                      # SCSI media changers
  132. device          ada                     # SATA harddisk drive
  133. device          da                      # Direct Access (disks)
  134. device          cd                      # CD
  135. device          pass                    # Passthrough device (direct SCSI access)
  136. device          ses                     # SCSI Environmental Services (and SAF-TE)
  137. options         SCSI_DELAY=5000         # Delay (in ms) before probing SCSI

  138. #===============================================================================
  139. # VGA, sc search USB keyboard
  140. #===============================================================================
  141. device                vga             # VGA video card driver
  142. device                agp             # AGP bus
  143. device                sc

  144. #===============================================================================
  145. # Serial Port
  146. #===============================================================================
  147. device                uart              # Generic UART driver

  148. #===============================================================================
  149. # 因特網介面支援及驅動程式
  150. #===============================================================================
  151. device                miibus               
  152. device                msk               
  153. device                ether

  154. #===============================================================================
  155. # WiFi 無線介面支援及驅動程式
  156. #===============================================================================
  157. device                wlan              # 802.11 support
  158. options         IEEE80211_DEBUG         # enable debug msgs
  159. options         IEEE80211_AMPDU_AGE     # age frames in AMPDU reorder q's
  160. options         IEEE80211_SUPPORT_MESH  # enable 802.11s draft support
  161. device                wlan_wep          # 802.11 WEP support
  162. device                wlan_ccmp         # 802.11 CCMP support
  163. device                wlan_tkip         # 802.11 TKIP support
  164. device                wlan_amrr         # AMRR transmit rate control algorithm
  165. device                wlan_xauth
  166. device                run
  167. device                runfw

  168. #===============================================================================
  169. # 虛擬網絡設備
  170. #===============================================================================
  171. device                lagg              # lagg interface
  172. device                loop              # Network loopback
  173. device                tun               # Packet tunnel.
  174. device                bpf               # Berkeley packet filter

  175. #===============================================================================
  176. # 其他虛擬設備
  177. #===============================================================================
  178. device                random            # Entropy device
  179. device                pty               # BSD-style compatibility pseudo ttys
  180. device                md                # Memory "disks"
  181. device                firmware          # firmware assist module

  182. #===============================================================================
  183. # USB 支援選項
  184. #===============================================================================
  185. options               USB_DEBUG         # enable debug msgs
  186. device                uhci              # UHCI PCI->USB interface
  187. device                ohci              # OHCI PCI->USB interface
  188. device                ehci              # EHCI PCI->USB interface (USB 2.0)
  189. device                usb               # USB Bus (required)
  190. device                udbp              # USB Double Bulk Pipe devices
  191. device                uhid              # "Human Interface Devices"
  192. device                ukbd              # Keyboard
  193. device                ulpt              # Printer
  194. device                umass             # Disks/Mass storage - Requires scbus and da
  195. device                ums               # Mouse
  196. device                uark              # Technologies ARK3116 based serial adapters
  197. device                ubsa              # Belkin F5U103 and compatible serial adapters
  198. device                uftdi             # For FTDI usb serial adapters
  199. device                uipaq             # Some WinCE based devices
  200. device                uplcom            # Prolific PL-2303 serial adapters
  201. device                uslcom            # SI Labs CP2101/CP2102 serial adapters
  202. device                uvisor            # Visor and Palm devices
  203. device                uvscom            # USB serial support for DDI pocket's PHS
  204. device                atp               # Apple Touch pad

  205. #===============================================================================
  206. # 音效支援選項
  207. #===============================================================================
  208. device                sound             # soundcard support
  209. device                snd_hda           #

  210. #===============================================================================
  211. # FireWire 支援
  212. #===============================================================================
  213. device          firewire        # FireWire bus code
  214. device          fwe             # Ethernet over FireWire (non-standard!)
  215. device          fwip            # IP over FireWire (RFC 2734,3146)
  216. device          dcons           # Dumb console driver
  217. device          dcons_crom      # Configuration ROM for dcons
复制代码

论坛徽章:
0
26 [报告]
发表于 2013-01-18 13:28 |只看该作者
希望能分享下你的全过程哇。:wink:

论坛徽章:
0
27 [报告]
发表于 2013-01-20 14:34 |只看该作者
M_O_Bz 发表于 2013-01-18 13:28
希望能分享下你的全过程哇。


未完成,可以到小弟小站這裡查閱

论坛徽章:
0
28 [报告]
发表于 2013-01-20 19:07 |只看该作者
求详细教程啊,如果可以的话,我直接把我的Macbook Air也装上Unix了

论坛徽章:
0
29 [报告]
发表于 2013-01-20 19:08 |只看该作者
fender0107401 发表于 2013-01-10 13:36
我在thinkpad上也用过,不过不知道是不是所有的本子都能用这个。


版主,请问FreeBSD对Thinkpad T410支持的怎么样,你知道吗?

论坛徽章:
89
水瓶座
日期:2014-04-01 08:53:31天蝎座
日期:2014-04-01 08:53:53天秤座
日期:2014-04-01 08:54:02射手座
日期:2014-04-01 08:54:15子鼠
日期:2014-04-01 08:55:35辰龙
日期:2014-04-01 08:56:36未羊
日期:2014-04-01 08:56:27戌狗
日期:2014-04-01 08:56:13亥猪
日期:2014-04-01 08:56:02亥猪
日期:2014-04-08 08:38:58程序设计版块每日发帖之星
日期:2016-01-05 06:20:00程序设计版块每日发帖之星
日期:2016-01-07 06:20:00
30 [报告]
发表于 2013-01-20 20:07 |只看该作者
spluto 发表于 2013-01-20 19:08
版主,请问FreeBSD对Thinkpad T410支持的怎么样,你知道吗?


具体情况谁也没法保证,必须试过才知道。

但是,我感觉基本上没有什么问题。

不过,你的无线网卡可能是个悲剧。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP